Learn R Programming

copBasic (version 1.5.1)

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

Description

Perform median regression of a copula by numerical derivatives of the copula. See the documentation for qua.regressCOP for mathematical details.

Usage

med.regressCOP(U=seq(  .Machine$double.eps^0.5,
                     1-.Machine$double.eps^0.5, by=0.01),
               cop=NULL, para=NULL, ...)

Arguments

U
A vector of $u$ nonexceedance probabilities,
cop
A copula function,
para
Vector of parameters or other data structure, if needed, to pass to the copula,
...
Additional arguments to pass.

Value

  • A data frame of the regressed probabilities of $V$ and provided $U$ values is returned.

References

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

See Also

qua.regressCOP

Examples

Run this code
theta <- 10
R <- med.regressCOP(cop=PLACKETTcop, para=c(theta))
plot(R$U,R$V, type="l", lwd=5, lty=2, xlim=c(0,1), ylim=c(0,1))
lines(R$U,(1+(theta-1)*R$U)/(theta+1), col=2)

theta <- 0.02
R <- med.regressCOP(cop=PLACKETTcop, para=c(theta))
lines(R$U,R$V, lwd=5, lty=2)
lines(R$U,(1+(theta-1)*R$U)/(theta+1), col=2)



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 (swap=TRUE)
qua.regressCOP.draw(F=seq(.1,.9,by=.1), cop=P, para=NA)
qua.regressCOP.draw(F=seq(.1,.9,by=.1), cop=P, para=NA,
                    swap=TRUE, lty=2)



theta <- 0.5
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 (swap=TRUE)
qua.regressCOP.draw(F=seq(.1,.9,by=.1), cop=PLACKETTcop, para=c(theta))
qua.regressCOP.draw(F=seq(.1,.9,by=.1), cop=PLACKETTcop, para=c(theta),
                    swap=TRUE, lty=2)

Run the code above in your browser using DataLab