Test.Clayton | R Documentation |
Perform a goodness-of-fit test for the Clayton copula based on Emura, Lin and Wang (2010). The test is asymptotically equivalent to the test of Shih (1998).
Test.Clayton(x.obs,y.obs,dx,dy,lower=0.001,upper=50,U.plot=TRUE)
x.obs |
censored times for X |
y.obs |
censored times for Y |
dx |
censoring indicators for X |
dy |
censoring indicators for Y |
lower |
lower bound for the association parameter |
upper |
upper bound for the association parameter |
U.plot |
if TRUE, draw the plot of U_1(theta) |
See the references.
theta1 |
association parameter by the pseudo-likelihood estimator |
theta2 |
association parameter by the unweighted estimator |
Stat |
log(theta1)-log(theta2) |
Z |
Z-value of the goodness-of-fit for the Clayton copula |
P |
P-value of the goodness-of-fit for the Clayton copula |
Takeshi Emura
Emura T, Lin CW, Wang W (2010) A goodness-of-fit test for Archimedean copula models in the presence of right censoring, Compt Stat Data Anal 54: 3033-43
Shih JH (1998) A goodness-of-fit test for association in a bivariate survival model. Biometrika 85: 189-200
n=20 theta_true=2 ## association parameter ## r1_true=2 ## hazard for X r2_true=2 ## hazard for Y set.seed(1) V1=runif(n) V2=runif(n) X=-1/r1_true*log(1-V1) W=(1-V1)^(-theta_true) Y=1/theta_true/r2_true*log( 1-W+W*(1-V2)^(-theta_true/(theta_true+1)) ) C=runif(n,min=0,max=5) x.obs=pmin(X,C) y.obs=pmin(Y,C) dx=X<=C dy=Y<=C Test.Clayton(x.obs,y.obs,dx,dy)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.