This is the stepp model of survival data with competing risks.
1.1
class
Objects from the Class
Objects can be created by calls of the form new("stmodelCI", ...) or by
the constructor function stepp.CI.
Slots
coltrt:: Object of class "numeric"
the treatment variable
coltime:: Object of class "numeric"
the time to event variable
coltype:: Object of class "numeric"
variable with distinct codes for different causes of failure where coltype=0 for censored observations; coltype=1 for event of interest; coltype=2 for other causes of failure
trts:: Object of class "numeric"
a vector containing the codes for the 2 treatment groups, 1st and 2nd treatment groups, respectively
timePoint:: Object of class "numeric"
timepoint to estimate survival
Extends
Class "stmodel", directly.
Methods
estimate: signature(.Object = "stmodelCI"):
estimate the effect in absolute and relative scale of the overall and each subpopulation
print: signature(.Object = "stmodelCI"):
print the estimate, covariance matrices and statistics
test: signature(.Object = "stmodelCI"):
perform the permutation tests or GEE and obtain various statistics
Returns
The new method returns the stmodelCI object.
The estimate method returns a list with the following fields:
model: the stepp model - "CIe"
sObs1: a vector of effect estimates of all subpopulations based on the 1st treatment
sSE1: a vector of standard errors of effect estimates of all subpopulations based on the 1st treatment
oObs1: effect estimate of the entire population based on the 1st treatment
oSE1: the standard error of the effect estimate of the entire population based on the 1st treatment
sObs2: a vector of effect estimates of all subpopulations based on the 1st treatment
sSE2: a vector of standard errors of effect estimates of all subpopulations based on the 1st treatment
oObs2: effect estimate of the entire population based on the 1st treatment
oSE2: the standard error of the effect estimate of the entire population based on the 1st treatment
skmw: Wald's statistics for the effect estimate differences between the two treatments
logHR: a vector of log hazard ratio estimate of the subpopulations comparing 1st and 2nd treatments
logHRSE: a vector of standard error of the log hazard ratio estimate of the subpopulations comparing 1st and 2nd treatments
ologHR: the log hazard ratio estimate of the entire population comparing 1st and 2nd treatments
ologHRSE: the standard error of the log hazard ratio estimate of the entire population comparing 1st and 2nd treatments
logHRw: Wald's statistics for the log hazard ratio between the two treatments
The test method returns a list with the following fields:
model: the stepp model - "CIt"
sigma: the covariance matrix for subpopulations based on effect differences
hasigma: the homogeneous association covariance matrix for subpopulations based on effect differences
HRsigma: the covariance matrix for the subpopulations based on hazard ratio
haHRsigma: the homogeneous association covariance matrix for subpopulations based on hazard ratio
pvalue: the supremum pvalue based on effect difference
chi2pvalue: the chisquare pvalue based on effect difference
hapvalue: the homogeneous association pvalue based on effect difference
HRpvalue: the supremum pvalue based on hazard ratio
haHRpvalue: the homogeneous association pvalue based on hazard ratio
showClass("stmodelCI")##n <-1000# set the sample sizemu <-0# set the mean and sd of the covariatesigma <-1beta0 <- log(-log(0.5))# set the intercept for the log hazardbeta1 <--0.2# set the slope on the covariatebeta2 <-0.5# set the slope on the treatment indicatorbeta3 <-0.7# set the slope on the interactionprob2 <-0.2# set the proportion type 2 eventscprob <-0.3# set the proportion censoredset.seed(7775432)# set the random number seedcovariate <- rnorm(n,mean=mu,sd=sigma)# generate the covariate valuesTxassign <- rbinom(n,1,0.5)# generate the treatment indicatorx3 <- covariate*Txassign # compute interaction term# compute the hazard for type 1 eventlambda1 <- exp(beta0+beta1*covariate+beta2*Txassign+beta3*x3)lambda2 <- prob2*lambda1/(1-prob2)# compute the hazard for the type 2 event# compute the hazard for censoring timelambda0 <- cprob*(lambda1+lambda2)/(1-cprob)t1 <- rexp(n,rate=lambda1)# generate the survival time for type 1 eventt2 <- rexp(n,rate=lambda2)# generate the survival time for type 2 eventt0 <- rexp(n,rate=lambda0)# generate the censoring timetime <- pmin(t0,t1,t2)# compute the observed survival timetype <- rep(0,n)type[(t1 < t0)&(t1 < t2)]<-1type[(t2 < t0)&(t2 < t1)]<-2# create the stepp model object to analyze the data using Cumulative Incidence approachx <- new ("stmodelCI", coltrt=Txassign, trts=c(0,1), coltime=time, coltype=type, timePoint=1.0)