giniCOP(cop=PSP) # 0.3819757
giniCOP( cop=PSP, by.concordance=TRUE) # Q(C,M) + Q(C,W) = 0.3820045
# use convex combination ---triggers integration warning but returns anyway
cxpara <- list(alpha=1/2, cop1=M, cop2=W) # parameters for convex2COP()
2*tauCOP(cop=PSP, cop2=convex2COP, para2=cxpara) # 2*Q(C,A) = 0.3819807
# where the later issued warnings on the integration
n <- 2000; UV <- simCOP(n=n, cop=N4212cop, para=9.3, graphics=FALSE)
giniCOP(para=UV, as.sample=TRUE) # 0.9475900 (sample version)
giniCOP(cop=N4212cop, para=9.3) # 0.9479528 (copula integration)
giniCOP(cop=N4212cop, para=9.3, by.concordance=TRUE) # 0.9480267 (concordance function)
# where the later issued warnings on the integration
# The canoncial example of theoretical and sample estimators of bivariate
# association for the package: Blomqvist Beta, Spearman Footrule, Gini Gamma,
# Hoeffding Phi, Kendall Tau, Spearman Rho, and Schweizer-Wolff Sigma
# and comparison to L-correlation via lmomco::lcomoms2().
n <- 9000; set.seed(56)
para <- list(cop1=PLACKETTcop, cop2=PLACKETTcop, para1=1.45, para2=21.9,
alpha=0.41, beta=0.08)
D <- simCOP(n=n, cop=composite2COP, para=para, cex=0.5, col=rgb(0,0,0,0.2), pch=16)
blomCOP(cop=composite2COP, para=para) # 0.4037908 (theoretical)
blomCOP(para=D, as.sample=TRUE) # 0.4008889 (sample)
footCOP(cop=composite2COP, para=para) # 0.3721555 (theoretical)
footCOP(para=D, as.sample=TRUE) # 0.3703623 (sample)
giniCOP(cop=composite2COP, para=para) # 0.4334687 (theoretical)
giniCOP(para=D, as.sample=TRUE) # 0.4311698 (sample)
tauCOP(cop=composite2COP, para=para) # 0.3806909 (theoretical)
tauCOP(para=D, as.sample=TRUE) # 0.3788139 (sample)
rhoCOP(cop=composite2COP, para=para) # 0.5257662 (theoretical)
rhoCOP(para=D, as.sample=TRUE) # 0.5242380 (sample)
lmomco::lcomoms2(D)$T2 # 1 # 0.5242388 (sample matrix)
# 0.5245154 1
hoefCOP(cop=composite2COP, para=para) # 0.5082776 (theoretical)
hoefCOP(para=D[sample(1:n, n/5),],
as.sample=TRUE) # 0.5033842 (re-sample)
#hoefCOP(para=D, as.sample=TRUE) # major CPU hog, n too big
# because the Ds are already "probabilities" just resample
wolfCOP(cop=composite2COP, para=para) # 0.5257662 (theoretical)
#wolfCOP(para=D, as.sample=TRUE) # major CPU hog, n too big
wolfCOP(para=D[sample(1:n, n/5),],
as.sample=TRUE) # 0.5338009 (re-sample)
Run the code above in your browser using DataLab