View source: R/surv.factorial.R
surv.factorial | R Documentation |
Perform factorial survival analysis under dependent censoring under an assumed copula (Emura et al. 2024).
surv.factorial(t.vec,d.vec,group,copula,alpha,R=1000,t.upper=min(tapply(t.vec,group,max)),
C=NULL,S.plot=TRUE,mark.time=FALSE)
t.vec |
Vector of survival times (time to either death or censoring) |
d.vec |
Vector of censoring indicators, 1=death, 0=censoring |
group |
Vector of group indicators, 1, 2, ..., d |
copula |
Copula function: "CG.Clayton","CG.Gumbel" or "CG.Frank" |
alpha |
Copula parameter |
R |
The number of Monte Carlo simulations to find the critical value of the F-test |
t.upper |
Follow-up end (default is max(t.vec)) |
C |
Contrast matrix |
S.plot |
If TRUE, the survival curve is displayed |
mark.time |
If TRUE, then curves are marked at each censoring time |
Estimates of treatment effects and the test results are shown.
copula.parameter |
Copula parameter |
p |
Estimates of treatment effects |
Var |
Variance estimates |
F |
F-statistic |
c.simu |
Critical value via the simulation method |
c.anal |
Critical value via the analytical method |
P.value |
P-value of the F-test |
Takeshi Emura
Emura T, Ditzhaus M, Dobler D, Murotani K (2024), Factorial survival analysis for treatment effects under dependent censoring, Stat Methods Med Res 33(1):61-79.
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.