Title: | Analysis of Bivariate Survival Data Based on Copulas |
---|---|
Description: | Simulating bivariate survival data from copula models. Estimation of the association parameter in copula models. Two different ways to estimate the association parameter in copula models are implemented. A goodness-of-fit test for a given copula model is implemented. See Emura, Lin and Wang (2010) <doi:10.1016/j.csda.2010.03.013> for details. |
Authors: | Takeshi Emura [aut, cre] |
Maintainer: | Takeshi Emura <[email protected]> |
License: | GPL-2 |
Version: | 1.8 |
Built: | 2025-03-02 07:02:23 UTC |
Source: | CRAN |
Simulating bivariate survival data from copula models (Emura et al. 2019). Estimation of the association parameter in copula models. Two different ways to estimate the association parameter in copula models are implemented. A goodness-of-fit test for a given copula model is implemented. See Emura, Lin and Wang (2010) <doi:10.1016/j.csda.2010.03.013> for details. Also, Weibull regression is implemented (Section 2.6.3 of Emura et al. (2019)).
Details are seen from the references.
Takeshi Emura Maintainer: Takeshi Emura <[email protected]>
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
Emura T, Matsui S, Rondeau V (2019), Survival Analysis with Correlated Endpoints, Joint Frailty-Copula Models, JSS Research Series in Statistics, Springer
n pairs of (U,V) are generated from the BB1 copula. n paris of (X,Y) are generated from the corresponding bivariate survival model with the Weibull marginal distributions. The default parameters (scale1=scale2=shape1=shape2=1) give the unit exponential distributions.
simu.BB1(n,alpha,d=0,scale1=1,scale2=1,shape1=1,shape2=1,Print=FALSE)
simu.BB1(n,alpha,d=0,scale1=1,scale2=1,shape1=1,shape2=1,Print=FALSE)
n |
sample size |
alpha |
association (copula) parameter |
d |
BB1 copula's departure parameter from the Clayton (d=0 is the default) |
scale1 |
scale parameter for X |
scale2 |
scale parameter for Y |
shape1 |
shape parameter for X |
shape2 |
shape parameter for Y |
Print |
print Kendall's tau and means of X and Y if "TRUE" |
See Section 2.6 of Emura et al.(2019) for copulas and bivariate survival times.
U |
uniformly distributed on (0,1) |
V |
uniformly distributed on (0,1) |
X |
Weibull distributed (scale1, shape1) |
Y |
Weibull distributed (scale2, shape2) |
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
Emura T, Matsui S, Rondeau V (2019), Survival Analysis with Correlated Endpoints, Joint Frailty-Copula Models, JSS Research Series in Statistics, Springer
n=100 Dat=simu.BB1(n=n,alpha=1,d=2,scale1=1,scale2=2,shape1=0.5,shape2=2) plot(Dat[,"U"],Dat[,"V"]) cor(Dat[,"U"],Dat[,"V"],method="kendall") plot(Dat[,"X"],Dat[,"Y"]) cor(Dat[,"X"],Dat[,"Y"],method="kendall")
n=100 Dat=simu.BB1(n=n,alpha=1,d=2,scale1=1,scale2=2,shape1=0.5,shape2=2) plot(Dat[,"U"],Dat[,"V"]) cor(Dat[,"U"],Dat[,"V"],method="kendall") plot(Dat[,"X"],Dat[,"Y"]) cor(Dat[,"X"],Dat[,"Y"],method="kendall")
n pairs of (U,V) are generated from the CC copula. n paris of (X,Y) are generated from the corresponding bivariate survival model with the Weibull marginal distributions. The default parameters (scale1=scale2=shape1=shape2=1) give the unit exponential distributions.
simu.CC(n,alpha,scale1=1,scale2=1,shape1=1,shape2=1,Print=FALSE)
simu.CC(n,alpha,scale1=1,scale2=1,shape1=1,shape2=1,Print=FALSE)
n |
sample size |
alpha |
association (copula) parameter, -1<=alpha<=1 |
scale1 |
scale parameter for X |
scale2 |
scale parameter for Y |
shape1 |
shape parameter for X |
shape2 |
shape parameter for Y |
Print |
print Kendall's tau and means of X and Y if "TRUE" |
See Section 2.6 of Emura et al.(2019) for copulas and bivariate survival times.
U |
uniformly distributed on (0,1) |
V |
uniformly distributed on (0,1) |
X |
Weibull distributed (scale1, shape1) |
Y |
Weibull distributed (scale2, shape2) |
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
Emura T, Matsui S, Rondeau V (2019), Survival Analysis with Correlated Endpoints, Joint Frailty-Copula Models, JSS Research Series in Statistics, Springer
n=100 Dat=simu.CC(n=n,alpha=-1,scale1=1,scale2=2,shape1=0.5,shape2=2) plot(Dat[,"U"],Dat[,"V"]) cor(Dat[,"U"],Dat[,"V"],method="kendall") plot(Dat[,"X"],Dat[,"Y"]) cor(Dat[,"X"],Dat[,"Y"],method="kendall")
n=100 Dat=simu.CC(n=n,alpha=-1,scale1=1,scale2=2,shape1=0.5,shape2=2) plot(Dat[,"U"],Dat[,"V"]) cor(Dat[,"U"],Dat[,"V"],method="kendall") plot(Dat[,"X"],Dat[,"Y"]) cor(Dat[,"X"],Dat[,"Y"],method="kendall")
n pairs of (U,V) are generated from the Clayton copula. n paris of (X,Y) are generated from the corresponding bivariate survival model with the Weibull marginal distributions. The default parameters (scale1=scale2=shape1=shape2=1) give the unit exponential distributions.
simu.Clayton(n,alpha,scale1=1,scale2=1,shape1=1,shape2=1,Print=FALSE)
simu.Clayton(n,alpha,scale1=1,scale2=1,shape1=1,shape2=1,Print=FALSE)
n |
sample size |
alpha |
association (copula) parameter |
scale1 |
scale parameter for X |
scale2 |
scale parameter for Y |
shape1 |
shape parameter for X |
shape2 |
shape parameter for Y |
Print |
print Kendall's tau and means of X and Y if "TRUE" |
See Section 2.6 of Emura et al.(2019) for copulas and bivariate survival times.
U |
uniformly distributed on (0,1) |
V |
uniformly distributed on (0,1) |
X |
Weibull distributed (scale1, shape1) |
Y |
Weibull distributed (scale2, shape2) |
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
Emura T, Matsui S, Rondeau V (2019), Survival Analysis with Correlated Endpoints, Joint Frailty-Copula Models, JSS Research Series in Statistics, Springer
n=100 Dat=simu.Clayton(n=n,alpha=1,scale1=1,scale2=2,shape1=0.5,shape2=2) plot(Dat[,"U"],Dat[,"V"]) cor(Dat[,"U"],Dat[,"V"],method="kendall") plot(Dat[,"X"],Dat[,"Y"]) cor(Dat[,"X"],Dat[,"Y"],method="kendall")
n=100 Dat=simu.Clayton(n=n,alpha=1,scale1=1,scale2=2,shape1=0.5,shape2=2) plot(Dat[,"U"],Dat[,"V"]) cor(Dat[,"U"],Dat[,"V"],method="kendall") plot(Dat[,"X"],Dat[,"Y"]) cor(Dat[,"X"],Dat[,"Y"],method="kendall")
n pairs of (U,V) are generated from the FGM copula. n paris of (X,Y) are generated from the corresponding bivariate survival model with the Weibull marginal distributions. The default parameters (scale1=scale2=shape1=shape2=1) give the unit exponential distributions.
simu.FGM(n,alpha,scale1=1,scale2=1,shape1=1,shape2=1,Print=FALSE)
simu.FGM(n,alpha,scale1=1,scale2=1,shape1=1,shape2=1,Print=FALSE)
n |
sample size |
alpha |
association (copula) parameter; -1<=alpha<=1 |
scale1 |
scale parameter for X |
scale2 |
scale parameter for Y |
shape1 |
shape parameter for X |
shape2 |
shape parameter for Y |
Print |
print Kendall's tau and means of X and Y if "TRUE" |
See Section 2.6 of Emura et al.(2019) for copulas and bivariate survival times.
U |
uniformly distributed on (0,1) |
V |
uniformly distributed on (0,1) |
X |
Weibull distributed (scale1, shape1) |
Y |
Weibull distributed (scale2, shape2) |
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
Emura T, Matsui S, Rondeau V (2019), Survival Analysis with Correlated Endpoints, Joint Frailty-Copula Models, JSS Research Series in Statistics, Springer
n=100 Dat=simu.FGM(n=n,alpha=1,scale1=1,scale2=2,shape1=0.5,shape2=2) plot(Dat[,"U"],Dat[,"V"]) cor(Dat[,"U"],Dat[,"V"],method="kendall") plot(Dat[,"X"],Dat[,"Y"]) cor(Dat[,"X"],Dat[,"Y"],method="kendall")
n=100 Dat=simu.FGM(n=n,alpha=1,scale1=1,scale2=2,shape1=0.5,shape2=2) plot(Dat[,"U"],Dat[,"V"]) cor(Dat[,"U"],Dat[,"V"],method="kendall") plot(Dat[,"X"],Dat[,"Y"]) cor(Dat[,"X"],Dat[,"Y"],method="kendall")
n pairs of (U,V) are generated from the Frank copula. n paris of (X,Y) are generated from the corresponding bivariate survival model with the Weibull marginal distributions. The default parameters (scale1=scale2=shape1=shape2=1) give the unit exponential distributions.
simu.Frank(n,alpha,scale1=1,scale2=1,shape1=1,shape2=1,Print=FALSE)
simu.Frank(n,alpha,scale1=1,scale2=1,shape1=1,shape2=1,Print=FALSE)
n |
sample size |
alpha |
association (copula) parameter |
scale1 |
scale parameter for X |
scale2 |
scale parameter for Y |
shape1 |
shape parameter for X |
shape2 |
shape parameter for Y |
Print |
print Kendall's tau and means of X and Y if "TRUE" |
See Section 2.6 of Emura et al.(2019) for copulas and bivariate survival times.
U |
uniformly distributed on (0,1) |
V |
uniformly distributed on (0,1) |
X |
Weibull distributed (scale1, shape1) |
Y |
Weibull distributed (scale2, shape2) |
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
Emura T, Matsui S, Rondeau V (2019), Survival Analysis with Correlated Endpoints, Joint Frailty-Copula Models, JSS Research Series in Statistics, Springer
n=100 Dat=simu.Frank(n=n,alpha=10,scale1=1,scale2=2,shape1=0.5,shape2=2) plot(Dat[,"U"],Dat[,"V"]) cor(Dat[,"U"],Dat[,"V"],method="kendall") plot(Dat[,"X"],Dat[,"Y"]) cor(Dat[,"X"],Dat[,"Y"],method="kendall")
n=100 Dat=simu.Frank(n=n,alpha=10,scale1=1,scale2=2,shape1=0.5,shape2=2) plot(Dat[,"U"],Dat[,"V"]) cor(Dat[,"U"],Dat[,"V"],method="kendall") plot(Dat[,"X"],Dat[,"Y"]) cor(Dat[,"X"],Dat[,"Y"],method="kendall")
n pairs of (U,V) are generated from the GB copula. n paris of (X,Y) are generated from the corresponding bivariate survival model with the Weibull marginal distributions. The default parameters (scale1=scale2=shape1=shape2=1) give the unit exponential distributions.
simu.GB(n,alpha,scale1=1,scale2=1,shape1=1,shape2=1,Print=FALSE)
simu.GB(n,alpha,scale1=1,scale2=1,shape1=1,shape2=1,Print=FALSE)
n |
sample size |
alpha |
association (copula) parameter, 0<=alpha<=1 |
scale1 |
scale parameter for X |
scale2 |
scale parameter for Y |
shape1 |
shape parameter for X |
shape2 |
shape parameter for Y |
Print |
print Kendall's tau and means of X and Y if "TRUE" |
See Section 2.6 of Emura et al.(2019) for copulas and bivariate survival times.
U |
uniformly distributed on (0,1) |
V |
uniformly distributed on (0,1) |
X |
Weibull distributed (scale1, shape1) |
Y |
Weibull distributed (scale2, shape2) |
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
Emura T, Matsui S, Rondeau V (2019), Survival Analysis with Correlated Endpoints, Joint Frailty-Copula Models, JSS Research Series in Statistics, Springer
n=100 Dat=simu.GB(n=n,alpha=1,scale1=1,scale2=2,shape1=0.5,shape2=2) plot(Dat[,"U"],Dat[,"V"]) cor(Dat[,"U"],Dat[,"V"],method="kendall") plot(Dat[,"X"],Dat[,"Y"]) cor(Dat[,"X"],Dat[,"Y"],method="kendall")
n=100 Dat=simu.GB(n=n,alpha=1,scale1=1,scale2=2,shape1=0.5,shape2=2) plot(Dat[,"U"],Dat[,"V"]) cor(Dat[,"U"],Dat[,"V"],method="kendall") plot(Dat[,"X"],Dat[,"Y"]) cor(Dat[,"X"],Dat[,"Y"],method="kendall")
n pairs of (U,V) are generated from the Gumbel copula. n paris of (X,Y) are generated from the corresponding bivariate survival model with the Weibull marginal distributions. The default parameters (scale1=scale2=shape1=shape2=1) give the unit exponential distributions.
simu.Gumbel(n,alpha,scale1=1,scale2=1,shape1=1,shape2=1,Print=FALSE)
simu.Gumbel(n,alpha,scale1=1,scale2=1,shape1=1,shape2=1,Print=FALSE)
n |
sample size |
alpha |
association (copula) parameter |
scale1 |
scale parameter for X |
scale2 |
scale parameter for Y |
shape1 |
shape parameter for X |
shape2 |
shape parameter for Y |
Print |
print Kendall's tau and means of X and Y if "TRUE" |
See Section 2.6 of Emura et al.(2019) for copulas and bivariate survival times.
U |
uniformly distributed on (0,1) |
V |
uniformly distributed on (0,1) |
X |
Weibull distributed (scale1, shape1) |
Y |
Weibull distributed (scale2, shape2) |
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
Emura T, Matsui S, Rondeau V (2019), Survival Analysis with Correlated Endpoints, Joint Frailty-Copula Models, JSS Research Series in Statistics, Springer
n=100 Dat=simu.Gumbel(n=n,alpha=1,scale1=1,scale2=2,shape1=0.5,shape2=2) plot(Dat[,"U"],Dat[,"V"]) cor(Dat[,"U"],Dat[,"V"],method="kendall") plot(Dat[,"X"],Dat[,"Y"]) cor(Dat[,"X"],Dat[,"Y"],method="kendall")
n=100 Dat=simu.Gumbel(n=n,alpha=1,scale1=1,scale2=2,shape1=0.5,shape2=2) plot(Dat[,"U"],Dat[,"V"]) cor(Dat[,"U"],Dat[,"V"],method="kendall") plot(Dat[,"X"],Dat[,"Y"]) cor(Dat[,"X"],Dat[,"Y"],method="kendall")
n pairs of (U,V) are generated from the Joe copula. n paris of (X,Y) are generated from the corresponding bivariate survival model with the Weibull marginal distributions. The default parameters (scale1=scale2=shape1=shape2=1) give the unit exponential distributions.
simu.Joe(n,alpha,scale1=1,scale2=1,shape1=1,shape2=1,Print=FALSE)
simu.Joe(n,alpha,scale1=1,scale2=1,shape1=1,shape2=1,Print=FALSE)
n |
sample size |
alpha |
association (copula) parameter |
scale1 |
scale parameter for X |
scale2 |
scale parameter for Y |
shape1 |
shape parameter for X |
shape2 |
shape parameter for Y |
Print |
print Kendall's tau and means of X and Y if "TRUE" |
See Section 2.6 of Emura et al.(2019) for copulas and bivariate survival times.
U |
uniformly distributed on (0,1) |
V |
uniformly distributed on (0,1) |
X |
Weibull distributed (scale1, shape1) |
Y |
Weibull distributed (scale2, shape2) |
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
Emura T, Matsui S, Rondeau V (2019), Survival Analysis with Correlated Endpoints, Joint Frailty-Copula Models, JSS Research Series in Statistics, Springer
n=100 Dat=simu.Joe(n=n,alpha=1,scale1=1,scale2=2,shape1=0.5,shape2=2) plot(Dat[,"U"],Dat[,"V"]) cor(Dat[,"U"],Dat[,"V"],method="kendall") plot(Dat[,"X"],Dat[,"Y"]) cor(Dat[,"X"],Dat[,"Y"],method="kendall")
n=100 Dat=simu.Joe(n=n,alpha=1,scale1=1,scale2=2,shape1=0.5,shape2=2) plot(Dat[,"U"],Dat[,"V"]) cor(Dat[,"U"],Dat[,"V"],method="kendall") plot(Dat[,"X"],Dat[,"Y"]) cor(Dat[,"X"],Dat[,"Y"],method="kendall")
n pairs of (U,V) are generated from the t-copula. n paris of (X,Y) are generated from the corresponding bivariate survival model with the Weibull marginal distributions. The default parameters (scale1=scale2=shape1=shape2=1) give the unit exponential distributions.
simu.t(n,alpha,df=1,scale1=1,scale2=1,shape1=1,shape2=1,Print=FALSE)
simu.t(n,alpha,df=1,scale1=1,scale2=1,shape1=1,shape2=1,Print=FALSE)
n |
sample size |
alpha |
association (copula) parameter |
df |
degrees of freedom (d=1 is the default) |
scale1 |
scale parameter for X |
scale2 |
scale parameter for Y |
shape1 |
shape parameter for X |
shape2 |
shape parameter for Y |
Print |
print Kendall's tau and means of X and Y if "TRUE" |
See Section 2.6 of Emura et al.(2019) for copulas and bivariate survival times.
U |
uniformly distributed on (0,1) |
V |
uniformly distributed on (0,1) |
X |
Weibull distributed (scale1, shape1) |
Y |
Weibull distributed (scale2, shape2) |
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
Emura T, Matsui S, Rondeau V (2019), Survival Analysis with Correlated Endpoints, Joint Frailty-Copula Models, JSS Research Series in Statistics, Springer
n=100 Dat=simu.t(n=n,alpha=0.8,df=1,scale1=1,scale2=2,shape1=0.5,shape2=2,Print=TRUE) plot(Dat[,"U"],Dat[,"V"]) cor(Dat[,"U"],Dat[,"V"],method="kendall") plot(Dat[,"X"],Dat[,"Y"]) cor(Dat[,"X"],Dat[,"Y"],method="kendall")
n=100 Dat=simu.t(n=n,alpha=0.8,df=1,scale1=1,scale2=2,shape1=0.5,shape2=2,Print=TRUE) plot(Dat[,"U"],Dat[,"V"]) cor(Dat[,"U"],Dat[,"V"],method="kendall") plot(Dat[,"X"],Dat[,"Y"]) cor(Dat[,"X"],Dat[,"Y"],method="kendall")
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)
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)
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)
Perform a goodness-of-fit test for the Gumbel copula based on Emura, Lin and Wang (2010).
Test.Gumbel(x.obs,y.obs,dx,dy,lower=0.01,upper=50,U.plot=TRUE)
Test.Gumbel(x.obs,y.obs,dx,dy,lower=0.01,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) and U_2(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
x.obs=c(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15) y.obs=c(2,1,4,5,6,8,3,7,10,9,11,12,13,14,15) dx=c(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1) dy=c(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1) Test.Gumbel(x.obs,y.obs,dx,dy)
x.obs=c(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15) y.obs=c(2,1,4,5,6,8,3,7,10,9,11,12,13,14,15) dx=c(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1) dy=c(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1) Test.Gumbel(x.obs,y.obs,dx,dy)
Estimate the association parameter of the Clayton copula using bivariate survival data. The estimator was derived by Clayton (1978) and reformulated by Emura, Lin and Wang (2010).
U1.Clayton(x.obs,y.obs,dx,dy,lower=0.001,upper=50,U.plot=TRUE)
U1.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) |
Details are seen from the references.
theta |
association parameter |
tau |
Kendall's tau (=theta/(theta+2)) |
Takeshi Emura
Clayton DG (1978). A model for association in bivariate life tables and its application to epidemiological studies of familial tendency in chronic disease incidence. Biometrika 65: 141-51.
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
n=200 theta_true=2 ## association parameter ## r1_true=1 ## hazard for X r2_true=1 ## 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 U1.Clayton(x.obs,y.obs,dx,dy)
n=200 theta_true=2 ## association parameter ## r1_true=1 ## hazard for X r2_true=1 ## 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 U1.Clayton(x.obs,y.obs,dx,dy)
Estimate the association parameter of the Gumbel copula using bivariate survival data. The estimator was derived by Emura, Lin and Wang (2010).
U1.Gumbel(x.obs,y.obs,dx,dy,lower=0.01,upper=50,U.plot=TRUE)
U1.Gumbel(x.obs,y.obs,dx,dy,lower=0.01,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) |
Details are seen from the references.
theta |
association parameter |
tau |
Kendall's tau (=theta/(theta+2)) |
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
x.obs=c(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15) y.obs=c(2,1,4,5,6,8,3,7,10,9,11,12,13,14,15) dx=c(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1) dy=c(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1) U1.Gumbel(x.obs,y.obs,dx,dy)
x.obs=c(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15) y.obs=c(2,1,4,5,6,8,3,7,10,9,11,12,13,14,15) dx=c(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1) dy=c(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1) U1.Gumbel(x.obs,y.obs,dx,dy)
Estimate the association parameter of the Clayton copula using bivariate survival data. The estimator was defined as the unweighted estimator in Emura, Lin and Wang (2010).
U2.Clayton(x.obs,y.obs,dx,dy)
U2.Clayton(x.obs,y.obs,dx,dy)
x.obs |
censored times for X |
y.obs |
censored times for Y |
dx |
censoring indicators for X |
dy |
censoring indicators for Y |
Details are seen from the references.
theta |
association parameter |
tau |
Kendall's tau (=theta/(theta+2)) |
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
n=200 theta_true=2 ## association parameter ## r1_true=1 ## hazard for X r2_true=1 ## 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 U2.Clayton(x.obs,y.obs,dx,dy)
n=200 theta_true=2 ## association parameter ## r1_true=1 ## hazard for X r2_true=1 ## 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 U2.Clayton(x.obs,y.obs,dx,dy)
Estimate the association parameter of the Gumbel copula using bivariate survival data. The estimator was derived by Emura, Lin and Wang (2010).
U2.Gumbel(x.obs,y.obs,dx,dy,lower=0.01,upper=50,U.plot=TRUE)
U2.Gumbel(x.obs,y.obs,dx,dy,lower=0.01,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) |
Details are seen from the references.
theta |
association parameter |
tau |
Kendall's tau (=theta/(theta+1)) |
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
x.obs=c(1,2,3,4,5) y.obs=c(2,1,4,5,6) dx=c(1,1,1,1,1) dy=c(1,1,1,1,1) U2.Gumbel(x.obs,y.obs,dx,dy)
x.obs=c(1,2,3,4,5) y.obs=c(2,1,4,5,6) dx=c(1,1,1,1,1) dy=c(1,1,1,1,1) U2.Gumbel(x.obs,y.obs,dx,dy)
See Section 2.6.3 of Emura et al. (2019).
Weib.reg.BB1(x.obs,y.obs,dx,dy,zx,zy,convergence.par=FALSE)
Weib.reg.BB1(x.obs,y.obs,dx,dy,zx,zy,convergence.par=FALSE)
x.obs |
censored times for X |
y.obs |
censored times for Y |
dx |
censoring indicators for X |
dy |
censoring indicators for Y |
zx |
matrix of covariates for X |
zy |
matrix of covariates for Y |
convergence.par |
if TRUE, show the details |
Details are seen from the references.
beta_x |
regression coefficients for X |
beta_y |
regression coefficients for Y |
Takeshi Emura
Emura T, Matsui S, Rondeau V (2019), Survival Analysis with Correlated Endpoints, Joint Frailty-Copula Models, JSS Research Series in Statistics, Springer
#TBA
#TBA
See Section 2.6.3 of Emura et al. (2019).
Weib.reg.BB1.0(x.obs,y.obs,dx,dy,zx,zy,delta=0,convergence.par=FALSE)
Weib.reg.BB1.0(x.obs,y.obs,dx,dy,zx,zy,delta=0,convergence.par=FALSE)
x.obs |
censored times for X |
y.obs |
censored times for Y |
dx |
censoring indicators for X |
dy |
censoring indicators for Y |
zx |
matrix of covariates for X |
zy |
matrix of covariates for Y |
delta |
known copula parameter (d>=0) |
convergence.par |
if TRUE, show the details |
Details are seen from the references.
beta_x |
regression coefficients for X |
beta_y |
regression coefficients for Y |
Takeshi Emura
Emura T, Matsui S, Rondeau V (2019), Survival Analysis with Correlated Endpoints, Joint Frailty-Copula Models, JSS Research Series in Statistics, Springer
#TBA
#TBA
See Section 2.6.3 of Emura et al. (2019).
Weib.reg.Clayton(x.obs,y.obs,dx,dy,zx,zy,convergence.par=FALSE)
Weib.reg.Clayton(x.obs,y.obs,dx,dy,zx,zy,convergence.par=FALSE)
x.obs |
censored times for X |
y.obs |
censored times for Y |
dx |
censoring indicators for X |
dy |
censoring indicators for Y |
zx |
matrix of covariates for X |
zy |
matrix of covariates for Y |
convergence.par |
if TRUE, show the details |
Details are seen from the references.
beta_x |
regression coefficients for X |
beta_y |
regression coefficients for Y |
Takeshi Emura
Emura T, Matsui S, Rondeau V (2019), Survival Analysis with Correlated Endpoints, Joint Frailty-Copula Models, JSS Research Series in Statistics, Springer
#TBA
#TBA
See Section 2.6.3 of Emura et al. (2019).
Weib.reg.Frank(x.obs,y.obs,dx,dy,zx,zy,convergence.par=FALSE)
Weib.reg.Frank(x.obs,y.obs,dx,dy,zx,zy,convergence.par=FALSE)
x.obs |
censored times for X |
y.obs |
censored times for Y |
dx |
censoring indicators for X |
dy |
censoring indicators for Y |
zx |
matrix of covariates for X |
zy |
matrix of covariates for Y |
convergence.par |
if TRUE, show the details |
Details are seen from the references.
beta_x |
regression coefficients for X |
beta_y |
regression coefficients for Y |
Takeshi Emura
Emura T, Matsui S, Rondeau V (2019), Survival Analysis with Correlated Endpoints, Joint Frailty-Copula Models, JSS Research Series in Statistics, Springer
#TBA
#TBA
See Section 2.6.3 of Emura et al. (2019).
Weib.reg.Gumbel(x.obs,y.obs,dx,dy,zx,zy,convergence.par=FALSE)
Weib.reg.Gumbel(x.obs,y.obs,dx,dy,zx,zy,convergence.par=FALSE)
x.obs |
censored times for X |
y.obs |
censored times for Y |
dx |
censoring indicators for X |
dy |
censoring indicators for Y |
zx |
matrix of covariates for X |
zy |
matrix of covariates for Y |
convergence.par |
if TRUE, show the details |
Details are seen from the references.
beta_x |
regression coefficients for X |
beta_y |
regression coefficients for Y |
Takeshi Emura
Emura T, Matsui S, Rondeau V (2019), Survival Analysis with Correlated Endpoints, Joint Frailty-Copula Models, JSS Research Series in Statistics, Springer
#TBA
#TBA