W
), $\mathbf{\Pi}$ (independence; P
), and $\mathbf{M}$ (M
). The copula is comprehensive because both $\mathbf{W}$ and $\mathbf{M}$ can be obtained. The parameters are readily estimated using Spearman's Rho ($\rho_\mathbf{C}$; rhoCOP
) and Kendall's Tau ($\tau_\mathbf{C}$; tauCOP
) byThe taildepCOP
). Lastly, Durante (2007, p. 257) reports that the
FRECHETcop(u,v, para=NULL, rho=NULL, tau=NULL, par2rhotau=FALSE, ...)
TRUE
will return an Rlist
of the $\rho$ and $\tau$ for the parameters; andpara
; however, if para=NULL
and rho
and tau
are set and compatible with the copula, then ${\rho_\mathbf{C}, \tau_\mathbf{C}} \rightarrow {\alpha, \beta}$ and an Rlist
is returned.For no other reason than that it can be done and makes a nice picture, loop through a nest of $\rho$ and $\tau$ for the
M
, P
, W
ppara <- c(0.25, 0.50)
fcop <- FRECHETcop(para=ppara, par2rhotau=TRUE)
RHO <- fcop$rho; TAU <- fcop$tau
level.curvesCOP(cop=FRECHETcop, para=ppara) # Durante (2007, Fig. C.27(b))
mtext("Frechet Family copula")
UV <- simCOP(n=50, cop=FRECHETcop, para=ppara, ploton=FALSE, points=FALSE)
tau <- cor(UV$U, UV$V, method="kendall" ) # sample Kendall's Tau
rho <- cor(UV$U, UV$V, method="spearman") # sample Spearman's Rho
spara <- FRECHETcop(rho=rho, tau=tau) # a fitted Frechet Family copula
spara <- spara$para
if(is.na(spara[1])) { # now a fittable combination is not guaranteed
warning("sample rho and tau do not provide valid parameters, ",
"try another simulation")
} else { # now if fit, draw some red-colored level curves for comparison
level.curvesCOP(cop=FRECHETcop, para=spara, ploton=FALSE, col=2)
}
Run the code above in your browser using DataLab