# NOT RUN {
nuskewCOP(cop=GHcop,para=c(1.43,1/2,1))*(6/96) # 0.005886 (Joe, 2014, p. 184; 0.0059)
# }
# NOT RUN {
joeskewCOP( cop=GHcop, para=c(8, .7, .5)) # -0.1523491
joeskewCOP( cop=GHcop, para=c(8, .5, .7)) # +0.1523472
# 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
# }
# NOT RUN {
# }
# NOT RUN {
para=c(19,0.3,0.8); set.seed(341)
nuskew <- nuskewCOP( cop=GHcop, para=para) # 0.3057744
UV <- simCOP(n=10000, cop=GHcop, para=para) # a large simulation
mean((UV$U - UV$V)^3)/(6/96) # 0.3127398
# Two other definitions of skewness follow and are not numerically the same.
uvskew(u=UV$U, v=UV$V, umv=TRUE) # 0.3738987 (see documentation uvskew)
uvskew(u=UV$U, v=UV$V, umv=FALSE) # 0.3592739 ( 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=300, and the
# t-test will (should) result in acceptance of the NULL hypothesis.
S <- replicate(60, nuskewCOP(para=simCOP(n=300, cop=GHcop, para=para,
graphics=FALSE), as.sample=TRUE))
t.test(S, mu=nuskew)
#t = 0.004633, df = 59, p-value = 0.9963
#alternative hypothesis: true mean is not equal to 0.3057744
#95 percent confidence interval:
# 0.2854282 0.3262150
#sample estimates:
#mean of x
#0.3058216
# }
# NOT RUN {
# }
# NOT RUN {
# Let us run a large ensemble of copula properties that use the whole copula
# (not tail properties). We composite a Plackett with a Gumbel-Hougaard for
# which the over all association (correlation) sign is negative, but amongst
# these statistics with nuskew and nustar at the bottom, there are various
# quantities that can be extracted. These could be used for fitting.
set.seed(873)
para <- list(cop1=PLcop, cop2=GHcop, alpha=0.6, beta=0.9,
para1=.005, para2=c(8.3,0.25,0.7))
UV <- simCOP(1000, cop=composite2COP, para=para) # just to show
blomCOP(composite2COP, para) # -0.4078657
footCOP(composite2COP, para) # -0.2854227
hoefCOP(composite2COP, para) # +0.5713775
lcomCOP(composite2COP, para)$lcomUV[3] # +0.1816084
lcomCOP(composite2COP, para)$lcomVU[3] # +0.1279844
rhoCOP(composite2COP, para) # -0.5688417
rhobevCOP(composite2COP, para) # -0.2005210
tauCOP(composite2COP, para) # -0.4514693
wolfCOP(composite2COP, para) # +0.5691933
nustarCOP(composite2COP, para) # -0.5172434
nuskewCOP(composite2COP, para) # +0.0714987
# }
Run the code above in your browser using DataLab