Learn R Programming

copBasic (version 2.0.1)

joeskewCOP: The Joe's Nu-Skew or Nu-Skew-Star of a Copula

Description

Compute the measure of permutation asymmetry named for the copBasic package as Joe's Nu-Skew $\nu_\mathbf{C}$ of a copula according to Joe (2014, p. 66) by $$\nu_\mathbf{C} = 3\mathrm{E}[UV^2 - U^2V] = 6\int\!\!\int_{\mathcal{I}^2} (v-u)\mathbf{C}(u,v)\, \mathrm{d}u\mathrm{d}v\mbox{.}$$ This definition is the type="nu" for the function. Permutation asymmetry can be thought of as bivariate skewness, which is a more recognizable term/concept to many readers.

Numerical results indicate $\nu_\mathbf{W} \approx 0$ (W), $\nu^\star_\mathbf{\Pi} = 0$ (P), $\nu_\mathbf{M} \approx 0$ (M), $\nu^\star_\mathbf{PL} \approx 0$ for all $\Theta$ (PLACKETTcop), and the $\nu^\star_\mathbf{GH} = 0$ (GHcop). Copulas with mirror symmetry across the 1:1 line have $\nu_\mathbf{C} = 0$. Asymmetric copulas do exist. Consider an asymmetric Gumbel-Hougaard $\mathbf{GH}$ with $\Theta_p = (5,0.8,p)$ optimize(function(p) { joeskewCOP(cop=GHcop, para=c(5,0.8, p), type="nu") }, c(0,0.99) )$minimum UV <- simCOP(n=1000, cop=GHcop, c(5,0.8, 0.2836)) # inspect the graphics then minimization yields $\nu_{\mathbf{GH}(5, 0.8, 0.2836)}(u,v) = -0.0175$.

Another defintion supported here is for type="nustar" and is computed by $$\nu^\star_\mathbf{C} = 6\int\!\!\int_{\mathcal{I}^2} (v+u-1)\mathbf{C}(u,v)\, \mathrm{d}u\mathrm{d}v - \frac{1}{2}\mbox{.}$$ For the copBasic package, $\nu^\star$ is named as Joe's Nu-Skew-Star.

Numerical results indicate $\nu^\star_\mathbf{W} \approx 0$ (W), $\nu^\star_\mathbf{\Pi} = 0$ (P), $\nu^\star_\mathbf{M} \approx 0$ (M), $\nu^\star_\mathbf{PL} \approx 0$ for all $\Theta$ (PLACKETTcop), and for comparison the $\nu^\star_{\mathbf{GH}(1.646)}(u,v) = 0.01173$ (GHcop), which is the maximum attained by the symmetrical $\mathbf{GH}$ copula for $\Theta = 1.646$: optimize(function(p) { -1 * joeskewCOP(cop=GHcop, para=p, type="nustar")}, c(1,40) )$minimum

Lastly, the uvlmoms function provides for a quantile-based measure of bivariate skewness based on the difference $U - V$ that also is discussed by Joe (2014, p. 66).

Usage

joeskewCOP(cop=NULL, para=NULL, type=c("nu", "nustar"), as.sample=FALSE,
                                                brute=FALSE, delta=0.002, ...)

nuskewCOP(cop=NULL, para=NULL, as.sample=FALSE, brute=FALSE, delta=0.002, ...) nustarCOP(cop=NULL, para=NULL, as.sample=FALSE, brute=FALSE, delta=0.002, ...)

Arguments

cop
A copula function;
para
Vector of parameters or other data structure, if needed, to pass to the copula;
type
The type of metric to compute;
brute
Should brute force be used instead of two nested integrate() functions in Rto perform the double integration;
delta
The $\mathrm{d}u$ and $\mathrm{d}v$ for the brute force integration using brute;
as.sample
A logical controlling whether an optional Rdata.frame in para is used to compute the $\hat\nu$ (see Note). If set to -1, then the message concerning CPU effort will be surpressed; and
...
Additional arguments to pass.

Value

  • The value for $\nu_\mathbf{C}$ is returned.

concept

copula skew

Details

The implementation of joeskewCOP for copBasic provides second definition of asymmetry, but why? Consider the results that follow: joeskewCOP(cop=GHcop, para=c(5, 0.8, 0.2836)) # -0.01747565 joeskewCOP(cop=GHcop, para=c(5, 0.2836, 0.8 )) # 0.01747564 joeskewCOP(cop=GHcop, para=c(5, 0.8, 0.2836), type="nustar") # 0.00927368 joeskewCOP(cop=GHcop, para=c(5, 0.2836, 0.8 ), type="nustar") # 0.009273612 tauCOP( cop=GHcop, para=c(5, 0.2836, 0.8 )) # 0.2443013 The demonstration shows---at least for the symmetry (switchability) of the 2nd and 3rd parameters ($\pi_2$ and $\pi_3$) of the asymmetric $\mathbf{GH}$ copula---that the first definition $\nu$ is magnitude symmetric but carries a sign change. The demonstration show magnitude and sign stablity for $\nu^\star$, and ends with Kendall's Tau (tauCOP). Collectively, Kendall's Tau (or the other symmetric measures of association, e.g. blomCOP, footCOP, giniCOP, hoefCOP, rhoCOP, wolfCOP) when combined with $\nu$ and $\nu^\star$ might provide a framework for parameter optimization of the asymmetric $\mathbf{GH}$ copula (see below).

The asymmetric $\mathbf{GH}_{(5, 0.2836, 0.8)}$ is not radial (isCOP.radsym) or permutation (isCOP.permsym), but if $\pi_2 = \pi_3$ then the resulting $\mathbf{GH}$ copula is not radially symmetric but is permutation symmetric: isCOP.radsym( cop=GHcop, para=c(5, 0.2836, 0.8)) # FALSE isCOP.permsym(cop=GHcop, para=c(5, 0.2836, 0.8)) # FALSE isCOP.radsym( cop=GHcop, para=c(5, 0.8, 0.8)) # FALSE isCOP.permsym(cop=GHcop, para=c(5, 0.8, 0.8)) # TRUE

The use of $\nu_\mathbf{C}$ and $\nu^\star_\mathbf{C}$ with a measure of association is just suggested above for parameter optimization. Suppose we have a sample Spearman's Rho $\hat\rho = 1/3$, $\hat\nu = 6/1000$, and $\hat\nu^\star = 8/1000$ and the asymmetric $\mathbf{GH}$ coupla is to be fit. Parameter estimation for the asymmetric $\mathbf{GH}$ can be accomplished by the following code: "fitGHcop" <- function(hats, assocfunc=rhoCOP, init=NA, eps=1E-4, ...) { H <- GHcop # shorthand for the copula "objfunc" <- function(par) { par[1] <- ifelse(par[1] < 1, return(Inf), exp(par[1])) # edge check par[2:3] <- pnorm(par[2:3]) # detransform hp <- c(assocfunc(H, par), nuskewCOP(H, par), nustarCOP(H, par)) dv <- hats; dv[dv == 0] <- 1 # changing dv "adapts" the error to return(sqrt(sum(((hats-hp)/dv)^2))) # trap division by zero } # Theta=1 and Pi2 = Pi3 = 1/2 # as default initial estimates if(is.na(init)) init <- c(1, rep(1/2, times=2)) opt <- optim(init, objfunc, ...); par <- opt$par para <- c( exp(par[1]), pnorm(par[2:3]) ) names(para) <- c("Theta", "Pi2", "Pi3") fit <- c(assocfunc(H, para), nuskewCOP(H, para), nustarCOP(H, para)) txt <- c("AssocMeasure", "JoeNuSkew", "JoeNuSkewStar") names(fit) <- txt; names(hats) <- txt if(opt$value > eps) warning("inspect the fit") return(list(para=para, fit=fit, given=hats, optim=opt)) } Rho <- 1/3; Nu <- +6/1000; NuStar <- +8/1000 para <- fitGHcop(c(Rho, Nu, NuStar))$para densityCOPplot(cop=GHcop, para=para) # inspect the graphics

The initial parameter estimate has the value $\Theta = 1$, which is independence for the one parameter $\mathbf{GH}$. The two other parameters are set as $\pi_2 = \pi_3 = 1/2$ to be in the mid-point of their domain. The transformations using the log() $\leftrightarrow$ exp() and qnorm() $\leftrightarrow$ pnorm() functions in Rare used to keep the optimization in the parameter domain. The results produce a fitted copula of $\mathbf{GH}_{(3.865, 0.3634, 0.5197)}$.

Although with much brevity, the fitGHcop() function is an effective solution for the $\mathbf{GH}$. The function handles alternative measures of association, alternative initial parameters, honors the bounds of the three parameters, and can accommodate zero values for any of the statistics to fit---the question then is, does the $\mathbf{GH}$ truly itself have such solutions as suggested by the input target statistics? Certainly, $\nu = 0$ is possible because the estimated $\pi_\#$ are returned as equal if Nu = 0.

References

Joe, H., 2014, Dependence modeling with copulas: Boca Raton, CRC Press, 462 p.

See Also

uvskew, blomCOP, footCOP, giniCOP, hoefCOP, rhoCOP, tauCOP, wolfCOP

Examples

Run this code
nuskewCOP(cop=GHcop,para=c(1.43,1/2,1)) # 0.005886 (Joe, 2014, p. 184; 0.0059)

joeskewCOP(cop=GHcop, para=c(8,.7,.5)) # -0.009521820
joeskewCOP(cop=GHcop, para=c(8,.5,.7)) #  0.009521699
# UV <- simCOP(n=1000, cop=GHcop, para=c(8,.7,.5)) # see the switch in
# UV <- simCOP(n=1000, cop=GHcop, para=c(8,.5,.7)) # curvature

para=c(19,0.3,0.8); set.seed(341)
nuskew <- joeskewCOP( cop=GHcop, para=para) # 0.01911090
UV <- simCOP(n=10000, cop=GHcop, para=para) #   a large simulation
mean((UV$U - UV$V)^3)                       # 0.01954624
# Two other definitions of skewness follow and are not numerically the same.
uvskew(u=UV$U, v=UV$V, umv=TRUE)  # 0.3592739  (see documentation uvskew)
uvskew(u=UV$U, v=UV$V, umv=FALSE) # 0.3738987  ( or documentation uvlmoms)
# Yet another definition of skew, which requires large sample approximation
# using the L-comoments (3rd L-comoment is L-coskew).
lmomco::lcomoms2(UV)$T3 # L-coskew of the simulated values [1,2] and [2,1]
#             [,1]        [,2]
#[1,]  0.007398438  0.17076600
#[2,] -0.061060260 -0.00006613
# See the asymmetry in the two L-coskew values and consider this in light of
# the graphic produced by the simCOP() called for n=10,000. The T3[1,1] is
# the sampled L-skew (univariate) of the U margin and T3[2,2] is the same
# but for the V margin. Because the margins are uniform (ideally) then these
# for suitable large sample must be zero because the L-skew of the uniform
# distribution is by definition zero.
#
# Now let us check the sample estimator for sample of size n=200, and the
# t-test will result in acceptance of the NULL hypothesis.
S <- replicate(40, joeskewCOP(para=simCOP(n=200, cop=GHcop, para=para,
                                          graphics=FALSE), as.sample=TRUE))
t.test(S, mu=nuskew)
#         One Sample t-test
# t = -0.074863, df = 39, p-value = 0.9407
# alternative hypothesis: true mean is not equal to 0.0191109
# 95 percent confidence interval:
#  0.01713283    0.02094776
# sample estimates:
#  mean of x
#         0.0190403

Run the code above in your browser using DataLab