Learn R Programming

copBasic (version 1.7.1)

PLACKETTpar: Estimate the Parameter of the Plackett Copula

Description

The parameter $\Theta$ of the Plackett copula (Nelsen, 2006, pp. 89--92) is related to Spearman's Rho ($\rho_S \ne 1$, see rhoCOP) $$\rho_S(\Theta) = \frac{\Theta + 1}{\Theta - 1} - \frac{2\Theta\log(\Theta)}{(\Theta - 1)^2}\mbox{.}$$ Alternatively the parameter can be estimated using a median-split estimator, which is best shown as an algorithm. First, compute the two medians: medx <- median(x); medy <- median(y) Second and third, compute the number of occurrences where both values are less than their medians and express that as a probability: k <- length(x[x < medx & y < medy]); m <- k/length(x) Finally the median-split estimator of $\Theta$ is computed by $$\Theta = \frac{4m^2}{(1-2m)^2}\mbox{.}$$ Nelsen (2006, p. 92) and Salvadori et al. (2007, p. 247) provide further details. The input values x and y are not used for the median-split estimator if Spearman's Rho is provided by rho.

Usage

PLACKETTpar(x, y, rho=NULL, byrho=FALSE, cor=NULL, ...)

Arguments

x
Vector of values for random variable $X$;
y
Vector of values for random variable $Y$;
rho
Spearman's Rho and byrho is set to TRUE automatically;
byrho
Should Spearman's Rho be used instead of the median-split estimator;
cor
A copBasic syntax for the correlation coefficient suitable for the copula---a synonym for rho; and
...
Additional arguments to pass.

Value

  • A value for the Plackett copula $\Theta$ is returned.

References

Fredricks, G.A, and Nelsen, R.B., 2007, On the relationship between Spearman's rho and Kendall's tau for pairs of continuous random variables: Journal of Statistical Planning and Inference, v. 137, pp. 2143--2150.

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

PLACKETTcop, PLACKETTsim, rhoCOP

Examples

Run this code
Q1 <- rnorm(1000); Q2 <- Q1+rnorm(1000)
PLACKETTpar(Q1,Q2)
PLACKETTpar(Q1,Q2, byrho=TRUE)
PLACKETTpar(rho= 0.76)
PLACKETTpar(rho=-0.76)
tauCOP(cop=PLACKETTcop, para=PLACKETTpar(rho=-0.15, by.rho=TRUE))
RHOS <- seq(0,1, by=0.002); TAUS <- rep(NA, length(RHOS))
for(i in 1:length(RHOS)) {
   theta <- PLACKETTpar2(rho=RHOS[i], by.rho=TRUE); tau <- NA
   try(tau <- tauCOP(cop=PLACKETTcop, para=theta), silent=TRUE)
   TAUS[i] <- ifelse(is.null(tau), NA, tau)
}
LM <- lm(TAUS~RHOS+I(RHOS^2)+I(RHOS^3)+I(RHOS^4)+I(RHOS^5)+I(RHOS^6)-1)
plot(RHOS,TAUS, type="l", xlab="abs(Spearman's Rho)", ylab="abs(Kendall's Tau)")
fv <- fitted.values(LM); n1 <- length(RHOS) - 5
fv1 <- fv[length(fv) - 1]; rh1  <- RHOS[n1]
fv2 <- fv[length(fv)    ]; rh2  <- RHOS[length(RHOS)]
m <- (1 - fv1)/(1 - rh1);  rhos <- RHOS[RHOS > rh1]
taus <- m*(rhos - rh1) + fv1; fvs <- c(fv[1:(length(fv)-1)], taus)
lines(RHOS,fvs, col=3)

Run the code above in your browser using DataLab