copBasic (version 2.1.5)

med.regressCOP: Perform Median Regression using a Copula by Numerical Derivative Method for V with respect to U

Description

Perform median regression (Nelsen, 2006, pp. 217--218) of a copula by inversion of numerical derivatives of the copula (derCOPinv). The documentation for qua.regressCOP provides mathematical details. The qua.regressCOP.draw supports so-called quantile regression along various probability levels (see Examples).

Usage

med.regressCOP(u=seq(0.01,0.99, by=0.01), cop=NULL, para=NULL, level=NA, ...)

Arguments

u

Nonexceedance probability \(u\) in the \(X\) direction;

cop

A copula function;

para

Vector of parameters or other data structure, if needed, to pass to the copula;

level

The level of the prediction interval to compute. For example, level=0.95 will compute the 95-percent prediction interval as will level=0.05 because internally a reflection check is made; and

...

Additional arguments to pass such qua.regressCOP and derCOPinv that are called in succession.

Value

An R data.frame of the median regressed probabilities of \(V\) and provided \(U\) values is returned. Note that if level is used then the column ordering of the returned data.frame changes---please access the columns by the named idiom. The lower and upper prediction interval is contained in the columns repectively titled Vlwr and Vupr to mimic nomenclature somewhat of function predict.lm() in R.

References

Nelsen, R.B., 2006, An introduction to copulas: New York, Springer, 269 p.

Salvadori, G., De Michele, C., Kottegoda, N.T., and Rosso, R., 2007, Extremes in Nature---An approach using copulas: Springer, 289 p.

See Also

med.regressCOP2, qua.regressCOP, qua.regressCOP.draw

Examples

Run this code
# NOT RUN {
# INDEPENDENCE YIELDS STRAIGHT LINES, RED IS THE MEDIAN REGRESSION
FF <- seq(0.1, 0.9, by=0.1)
plot(c(0,1),c(0,1), type="n", lwd=3,
     xlab="U, NONEXCEEDANCE PROBABILITY", ylab="V, NONEXCEEDANCE PROBABILITY")
# Draw the regression of V on U and then U on V (wrtV=TRUE)
qua.regressCOP.draw(f=FF, cop=P, para=NA, ploton=FALSE)
qua.regressCOP.draw(f=FF, cop=P, para=NA, ploton=FALSE, wrtV=TRUE, lty=2)#
# }
# NOT RUN {
# }
# NOT RUN {
# NEGATIVE PLACKETT THETA YIELDS CURVES DOWN TO RIGHT, RED IS THE MEDIAN REGRESSION
theta <- 0.5; FF <- seq(0.1, 0.9, by=0.1)
plot(c(0,1),c(0,1), type="n", lwd=3,
     xlab="U, NONEXCEEDANCE PROBABILITY", ylab="V, NONEXCEEDANCE PROBABILITY")
# Draw the regression of V on U and then U on V (wrtV=TRUE)
qua.regressCOP.draw(f=FF, cop=PLACKETTcop, ploton=FALSE, para=theta)
qua.regressCOP.draw(f=FF, cop=PLACKETTcop, ploton=FALSE, para=theta, wrtV=TRUE, lty=2)#
# }

Run the code above in your browser using DataLab