Type: | Package |
Title: | Sensitivity Analysis with Time-to-Event Outcomes |
Version: | 1.1.0 |
Date: | 2023-05-29 |
Author: | Rong Huang, Ronghui (Lily) Xu |
Maintainer: | Rong Huang <roh019@ucsd.edu> |
Description: | Performs a dual-parameter sensitivity analysis of treatment effect to unmeasured confounding in observational studies with either survival or competing risks outcomes. Huang, R., Xu, R. and Dulai, P.S.(2020) <doi:10.1002/sim.8672>. |
License: | GPL-2 |
Encoding: | UTF-8 |
LazyData: | true |
Depends: | R (≥ 3.5.0) |
Imports: | ggplot2, interp, metR, reshape2, survival |
NeedsCompilation: | no |
URL: | https://github.com/Rong0707/survSens |
Packaged: | 2023-05-30 19:52:19 UTC; rong |
Repository: | CRAN |
Date/Publication: | 2023-05-30 20:10:02 UTC |
Sensitivity analysis of treatment effect to unmeasured confounding with competing risks outcomes.
Description
comprSensitivity
performs a dual-parameter sensitivity analysis of treatment effect to unmeasured confounding in observational studies with competing risks outcomes.
Usage
comprSensitivity(t, d, Z, X, method, zetaT = seq(-2,2,by=0.5),
zetat2 = 0, zetaZ = seq(-2,2,by=0.5), theta = 0.5, B = 50, Bem = 200)
Arguments
t |
survival outcomes with competing risks. |
d |
indicator of occurrence of event, with |
Z |
indicator of treatment. |
X |
pre-treatment covariates that will be included in the model as measured confounders. |
method |
needs to be one of |
zetaT |
range of coefficient of |
zetat2 |
value of coefficient of |
zetaZ |
range of coefficient of |
theta |
marginal probability of |
B |
iteration in the stochastic EM algorithm. |
Bem |
iteration used to estimate the variance-covariance matrix in the EM algorithm. |
Details
This function performs a dual-parameter sensitivity analysis of treatment effect to unmeasured confounding by either drawing simulated potential confounders U
from the conditional distribution of U
given observed response, treatment and covariates or the Expectation-Maximization algorithm. We assume U
is following Bernoulli(\pi)
(default 0.5). Given Z
, X
and U
, the hazard rate of the jth type of failure is modeled using the Cox proportional hazards (PH) regression:
\lambda_j (t | Z, X, U) = \lambda_{j0} (t) exp( \tau_j Z + X' \beta_j + \zeta_j U).
Given X
and U
, Z
follows a generalized linear model:
P(Z=1 | X, U) = \Phi(X' \beta_z + \zeta_z U).
Value
tau1 |
a data.frame with zetaz, zetat1, zetat2, tau1, tau1.se and t statistic in the event of interest response model. |
tau2 |
a data.frame with zetaz, zetat, zetat2, tau2, tau2.se and t statistic in the competing risks response model. |
Author(s)
Rong Huang
References
Huang, R., Xu, R., & Dulai, P. S. (2019). Sensitivity Analysis of Treatment Effect to Unmeasured Confounding in Observational Studies with Survival and Competing Risks Outcomes. arXiv preprint arXiv:1908.01444.
Examples
#load the dataset included in the package
data(comprdata)
#stochastic EM with regression
tau.sto = comprSensitivity(comprdata$t, comprdata$d, comprdata$Z, comprdata$X,
"stoEM_reg", zetaT = 0.5, zetaZ = 0.5, B = 3)
#EM with regression
tau.em = comprSensitivity(comprdata$t, comprdata$d, comprdata$Z, comprdata$X,
"EM_reg", zetaT = 0.5, zetaZ = 0.5, Bem = 50)
An example dataset with competing risks outcomes.
Description
An example dataset with competing risks outcomes that can be used for comprSensitivity
.
Usage
data("comprdata")
Format
The format is a list of 5, corresponding to t
, d
, Z
, X
, U
, respectively.
References
Huang, R., Xu, R., & Dulai, P. S. (2019). Sensitivity Analysis of Treatment Effect to Unmeasured Confounding in Observational Studies with Survival and Competing Risks Outcomes. arXiv preprint arXiv:1908.01444.
Examples
data(comprdata)
A contour plot of sensitivity analysis results.
Description
A contour plot of sensitivity analysis results.
Usage
plotsens(tau.res, coeff0, partialRsq = FALSE)
Arguments
tau.res |
a data.frame that can be generated from either |
coeff0 |
the value of estimated treatment effect ignoring any confounding. |
partialRsq |
whether to use partial R^2 instead of coefficients in the contour plot. |
Details
This function gives a contour plot in order to visualize results from either survSensitivity
or comprSensitivity
. The name of sensitivity parameter in the treatment model needs to be "zetaz", the name of sensitivity parameter in the response model needs to be "zetat1", and the name of estimated treatment effect needs to be "tau1".
Value
A contour plot corresponding to the output from either survSensitivity
or comprSensitivity.
Author(s)
Rong Huang
Examples
data(tau.res) #an example output
plotsens(tau.res, coeff0 = 1.131)
Sensitivity analysis of treatment effect to unmeasured confounding with survival outcomes.
Description
survSensitivity
performs a dual-parameter sensitivity analysis of treatment effect to unmeasured confounding in observational studies with survival outcomes.
Usage
survSensitivity(t, d, Z, X, method, zetaT = seq(-2,2,by=0.5),
zetaZ = seq(-2,2,by=0.5), theta = 0.5, B = 50, Bem = 200)
Arguments
t |
survival outcomes. |
d |
indicator of occurrence of event, with |
Z |
indicator of treatment. |
X |
pre-treatment covariates that will be included in the model as measured confounders. |
method |
needs to be one of |
zetaT |
range of coefficient of |
zetaZ |
range of coefficient of |
theta |
marginal probability of |
B |
iteration in the stochastic EM algorithm. |
Bem |
iteration used to estimate the variance-covariance matrix in the EM algorithm. |
Details
This function performs a dual-parameter sensitivity analysis of treatment effect to unmeasured confounding by either drawing simulated potential confounders U
from the conditional distribution of U
given observed response, treatment and covariates or the Expectation-Maximization algorithm. We assume U
is following Bernoulli(\pi)
(default 0.5). Given Z
, X
and U
, the hazard rate is modeled using the Cox proportional hazards (PH) regression:
\lambda (t | Z, X, U) = \lambda_{0} (t) exp(\tau Z + X ' \beta + \zeta U).
Given X
and U
, Z
follows a generalized linear model:
P( Z=1 | X,U ) = \Phi(X' \beta_z + \zeta_z U).
Value
tau |
a data.frame with zetaz, zetat, tau1, tau1.se and t statistic. |
Author(s)
Rong Huang
References
Huang, R., Xu, R., & Dulai, P. S. (2019). Sensitivity Analysis of Treatment Effect to Unmeasured Confounding in Observational Studies with Survival and Competing Risks Outcomes. arXiv preprint arXiv:1908.01444.
Examples
#load the dataset included in the package.
data(survdata)
#stochastic EM with regression
tau.sto = survSensitivity(survdata$t, survdata$d, survdata$Z, survdata$X,
"stoEM_reg", zetaT = 0.5, zetaZ = 0.5, B = 3)
#EM with regression
tau.em = survSensitivity(survdata$t, survdata$d, survdata$Z, survdata$X,
"EM_reg", zetaT = 0.5, zetaZ = 0.5, Bem = 50)
An example dataset with survival outcomes.
Description
An example dataset with survival outcomes that can be used for survSensitivity
.
Usage
data("survdata")
Format
The format is a list of 5, corresponding to t
, d
, Z
, X
, U
, respectively.
References
Huang, R., Xu, R., & Dulai, P. S. (2019). Sensitivity Analysis of Treatment Effect to Unmeasured Confounding in Observational Studies with Survival and Competing Risks Outcomes. arXiv preprint arXiv:1908.01444.
Examples
data(survdata)
Sensitivity analysis output example
Description
An example output from survSensitivity
.
Usage
data("tau.res")
Format
A data frame with 81 observations on the following 7 variables.
zetaz
a numeric vector, corresponding to the sensitivity parameter in the treatment model.
zetat1
a numeric vector, corresponding to the sensitivity parameter in the response model.
tau1
a numeric vector, corresponding to the estimated treatment effect.
tau1.se
a numeric vector, corresponding to the standard error of the estimated treatment effect.
pR2z
a numeric vector, corresponding to the Rsquared in the treatment model.
pR2t1
a numeric vector, corresponding to the Rsquared in the response model.
t
a numeric vector, corresponding to the
t
statistic.
Examples
data(tau.res)