library(survival)
data(cancer)
dat=subset(colon,etype==1)
## Treatment effects ##
t.vec=dat$time
d.vec=dat$status
trt=dat$rx
C12=matrix(c(1,-1,0),1,3,byrow=TRUE)
C13=matrix(c(1,0,-1),1,3,byrow=TRUE)
C23=matrix(c(0,1,-1),1,3,byrow=TRUE)
group=as.numeric(trt) # 1=Obs; 2=Lev; 3=Lev+5FU
# surv.factorial(t.vec,d.vec,group,alpha=2,copula=CG.Clayton)
# surv.factorial(t.vec,d.vec,group,alpha=2,copula=CG.Clayton,C=C12)
# surv.factorial(t.vec,d.vec,group,alpha=2,copula=CG.Clayton,C=C13)
# surv.factorial(t.vec,d.vec,group,alpha=2,copula=CG.Clayton,C=C23)
# alpha is a copula parameter
Run the code above in your browser using DataLab