Nelsen explained in his 1999 book *An introduction to copulas* how to fit a (nonlinear) quantile regression model by means of a bivariate copula (pp. 175-176).

In short, Nelsen’s method for fitting a (nonlinear) quantile regression model is as follows:

- Take the partial derivative of the copula function
*C(u, v)*with respect to*u*, where*u*and*v*are both defined in [0, 1]. Denote this partial derivative by*c*, and note that_{u}(u, v)*c*._{u}(u, v) = P{V ≤ v | U = u} - For fitting the quantile regression model, set
*c*, where_{u}(u, v) = p*p*is defined in [0, 1]. - For regressing
*v*on*u*, evaluate*c*at_{u}(u, v)*u*, and subsequently solve*c*for_{u}(u, v) = p*v*(or, similarly, solve*0 = c*for_{u}(u, v) – p*v*). - Replace
*u*by*F*and_{x}^{-1}(u)*v*by*F*, where_{y}^{-1}(v)*F*and_{x}^{-1}(·)*F*are the quantile functions for_{y}^{-1}(·)*x*(=independent variable) and*y*(=dependent variable), respectively.

The following R code implements this copula method proposed by Nelsen for fitting a (nonlinear) quantile regression model. In addition, the R code may also compute confidence intervals for the fitted quantiles using a Monte-Carlo method. Continue reading R code for performing quantile regression using bivariate copulas