| get.pointEst {causalCmprsk} | R Documentation |
Returns point estimates and conf.level% confidence intervals corresponding to a specific time point
Description
The confidence interval returned by this function corresponds to the value conf.level passed to the function
fit.cox or fit.nonpar. The first input argument cmprsk.obj is a result corresponding to conf.level.
Usage
get.pointEst(cmprsk.obj, timepoint)
Arguments
cmprsk.obj |
a |
timepoint |
a scalar value of the time point of interest |
Value
A list with the following fields:
time | |
| a scalar timepoint passed into the function | |
trt.0 | |
a list of estimates of the absolute counterfactual parameters
corresponding to A=0 and the type of event E. trt.0 has the number of
fields as the number of different types of events in the data set.
For each type of event there is a list of estimates: |
|
CumHaza point estimate of the cumulative hazardCumHaz.CI.La bootstrap-based quantile estimate of a lower bound of aconf.level% confidence interval for the cumulative hazardCumHaz.CI.Ua bootstrap-based quantile estimate of an upper bound of aconf.level% confidence interval for the cumulative hazardCIFa point estimate of the cumulative incidence functionCIF.CI.La bootstrap-based quantile estimate of a lower bound of aconf.level% confidence interval for the cumulative incidence functionCIF.CI.Ua bootstrap-based quantile estimate of an upper bound of aconf.level% confidence interval for the cumulative incidence functionRMTa point estimate of the restricted mean timeRMT.CI.La bootstrap-based quantile estimate of a lower bound of aconf.level% confidence interval for the restricted mean timeRMT.CI.Ua bootstrap-based quantile estimate of an upper bound of aconf.level% confidence interval for the restricted mean time
trt.1 | |
a list of estimates of the absolute counterfactual parameters
corresponding to A=1 and the type of event E. trt.1 has the number of
fields as the number of different types of events in the data set.
For each type of event there is a list of estimates: |
|
CumHaza point estimate of the cumulative hazardCumHaz.CI.La bootstrap-based quantile estimate of a lower bound of aconf.level% confidence interval for the cumulative hazardCumHaz.CI.Ua bootstrap-based quantile estimate of an upper bound of aconf.level% confidence interval for the cumulative hazardCIFa point estimate of the cumulative incidence functionCIF.CI.La bootstrap-based quantile estimate of a lower bound of aconf.level% confidence interval for the cumulative incidence functionCIF.CI.Ua bootstrap-based quantile estimate of an upper bound of aconf.level% confidence interval for the cumulative incidence functionRMTa point estimate of the restricted mean timeRMT.CI.La bootstrap-based quantile estimate of a lower bound of aconf.level% confidence interval for the restricted mean timeRMT.CI.Ua bootstrap-based quantile estimate of an upper bound of aconf.level% confidence interval for the restricted mean time
trt.eff | |
a list of estimates of the treatment effect measures
corresponding to the type of event E. trt.eff has the number of
fields as the number of different types of events in the data set.
For each type of event there is a list of estimates: |
log.CumHazRa point estimate of the log of the ratio of hazards between two treatment armslog.CumHazR.CI.La bootstrap-based quantile estimate of a lower bound of aconf.level% confidence interval for the log of the ratio of hazards between two treatment armslog.CumHazR.CI.Ua bootstrap-based quantile estimate of an upper bound of aconf.level% confidence interval for the log of the ratio of hazards between two treatment armsRDa point estimate of the risk difference between two treatment armsRD.CI.La bootstrap-based quantile estimate of a lower bound of aconf.level% confidence interval for the risk difference between two treatment armsRD.CI.Ua bootstrap-based quantile estimate of an upper bound of aconf.level% confidence interval for the risk difference between two treatment armsRRa point estimate of the risk ratio between two treatment armsRR.CI.La bootstrap-based quantile estimate of a lower bound of aconf.level% confidence interval for the risk ratio between two treatment armsRR.CI.Ua bootstrap-based quantile estimate of an upper bound of aconf.level% confidence interval for the risk ratio between two treatment armsATE.RMTa point estimate of the restricted mean time difference between two treatment armsATE.RMT.CI.La bootstrap-based quantile estimate of a lower bound of aconf.level% confidence interval for the restricted mean time difference between two treatment armsATE.RMT.CI.Ua bootstrap-based quantile estimate of an upper bound of aconf.level% confidence interval for the restricted mean time difference between two treatment arms
See Also
fit.cox, fit.nonpar, causalCmprsk
Examples
# create a data set
n <- 1000
set.seed(7)
c1 <- runif(n)
c2 <- as.numeric(runif(n)< 0.2)
set.seed(77)
cf.m.T1 <- rweibull(n, shape=1, scale=exp(-(-1 + 2*c1)))
cf.m.T2 <- rweibull(n, shape=1, scale=exp(-(1 + 1*c2)))
cf.m.T <- pmin( cf.m.T1, cf.m.T2)
cf.m.E <- rep(0, n)
cf.m.E[cf.m.T1<=cf.m.T2] <- 1
cf.m.E[cf.m.T2<cf.m.T1] <- 2
set.seed(77)
cf.s.T1 <- rweibull(n, shape=1, scale=exp(-1*c1 ))
cf.s.T2 <- rweibull(n, shape=1, scale=exp(-2*c2))
cf.s.T <- pmin( cf.s.T1, cf.s.T2)
cf.s.E <- rep(0, n)
cf.s.E[cf.s.T1<=cf.s.T2] <- 1
cf.s.E[cf.s.T2<cf.s.T1] <- 2
exp.z <- exp(0.5 + 1*c1 - 1*c2)
pr <- exp.z/(1+exp.z)
TRT <- ifelse(runif(n)< pr, 1, 0)
X <- ifelse(TRT==1, cf.m.T, cf.s.T)
E <- ifelse(TRT==1, cf.m.E, cf.s.E)
covs.names <- c("c1", "c2")
data <- data.frame(X=X, E=E, TRT=TRT, c1=c1, c2=c2)
form.txt <- paste0("TRT", " ~ ", paste0(c("c1", "c2"), collapse = "+"))
trt.formula <- as.formula(form.txt)
wei <- get.weights(formula=trt.formula, data=data, wtype = "overlap")
hist(wei$ps[data$TRT==1], col="red", breaks = seq(0,1,0.05))
par(new=TRUE)
hist(wei$ps[data$TRT==0], col="blue", breaks = seq(0,1,0.05))
# Nonparametric estimation:
res.ATE <- fit.nonpar(df=data, X="X", E="E", trt.formula=trt.formula, wtype="stab.ATE")
nonpar.pe <- get.pointEst(res.ATE, 0.5)
nonpar.pe$trt.eff[[1]]$RD
# Cox-based estimation:
res.cox.ATE <- fit.cox(df=data, X="X", E="E", trt.formula=trt.formula, wtype="stab.ATE")
cox.pe <- get.pointEst(res.cox.ATE, 0.5)
cox.pe$trt.eff[[1]]$RD
# please see our package vignette for practical examples