Perform quantile regression (Nelsen, 2006, pp. 217--218) using a copula by numerical derivatives of the copula (derCOPinv2
). If \(X\) and \(Y\) are random variables having quantile functions \(x(F)\) and \(y(G)\) and letting \(x=\tilde{x}(y)\) denote a solution to \(\mathrm{Pr}[X \le x\mid Y = y] = F\), where \(F\) is a nonexceedance probability. Then the curve \(x=\tilde{x}(y)\) is the quantile regression curve of \(U\) or \(X\) with respect to \(V\) or \(Y\), respectively. If \(F=1/2\), then median regression is performed (med.regressCOP2
). Using copulas, the quantile regression is expressed as
$$\mathrm{Pr}[X \le x\mid Y = y] = \mathrm{Pr}[U \le F(x) \mid V = F] = \mathrm{Pr}[U \le u\mid V = F] = \frac{\delta \mathbf{C}(u,v)}{\delta v}\mbox{,}$$
where \(v = G(y)\) and \(u = F(x)\). The general algorithm is
Set \(\delta \mathbf{C}(u,v)/\delta v = F\),
Solve the regression curve \(u = \tilde{u}(v)\) (provided by derCOPinv2
), and
Replace \(u\) by \(x(u)\) and \(v\) by \(y(v)\).
The last step is optional as step two produces the regression in probability space, which might be desired, and step 3 actually transforms the probability regressions into the quantiles of the respective random variables.
qua.regressCOP2(f=0.5, v=seq(0.01,0.99, by=0.01), cop=NULL, para=NULL, ...)
An R
data.frame
of the regressed probabilities of \(U\) and \(V=v\) is returned.
A single value of nonexceedance probability \(F\) to perform regression at and defaults to median regression \(F=1/2\);
Nonexceedance probability \(v\) in the \(Y\) direction;
A copula function;
Vector of parameters or other data structure, if needed, to pass to the copula; and
Additional arguments to pass.
W.H. Asquith
Nelsen, R.B., 2006, An introduction to copulas: New York, Springer, 269 p.
med.regressCOP2
, derCOPinv2