Title: | Sensitivity Analysis with Time-to-Event Outcomes |
---|---|
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>. |
Authors: | Rong Huang, Ronghui (Lily) Xu |
Maintainer: | Rong Huang <[email protected]> |
License: | GPL-2 |
Version: | 1.1.0 |
Built: | 2024-11-26 03:21:18 UTC |
Source: | https://github.com/rong0707/survsens |
An example dataset with competing risks outcomes that can be used for comprSensitivity
.
data("comprdata")
data("comprdata")
The format is a list of 5, corresponding to t
, d
, Z
, X
, U
, respectively.
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.
data(comprdata)
data(comprdata)
comprSensitivity
performs a dual-parameter sensitivity analysis of treatment effect to unmeasured confounding in observational studies with competing risks outcomes.
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)
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)
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. |
This function performs a dual-parameter sensitivity analysis of treatment effect to unmeasured confounding by either drawing simulated potential confounders from the conditional distribution of
given observed response, treatment and covariates or the Expectation-Maximization algorithm. We assume
is following
(default 0.5). Given
,
and
, the hazard rate of the jth type of failure is modeled using the Cox proportional hazards (PH) regression:
Given and
,
follows a generalized linear model:
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. |
Rong Huang
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.
#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)
#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)
A contour plot of sensitivity analysis results.
plotsens(tau.res, coeff0, partialRsq = FALSE)
plotsens(tau.res, coeff0, partialRsq = FALSE)
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. |
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".
A contour plot corresponding to the output from either survSensitivity
or comprSensitivity.
Rong Huang
data(tau.res) #an example output plotsens(tau.res, coeff0 = 1.131)
data(tau.res) #an example output plotsens(tau.res, coeff0 = 1.131)
An example dataset with survival outcomes that can be used for survSensitivity
.
data("survdata")
data("survdata")
The format is a list of 5, corresponding to t
, d
, Z
, X
, U
, respectively.
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.
data(survdata)
data(survdata)
survSensitivity
performs a dual-parameter sensitivity analysis of treatment effect to unmeasured confounding in observational studies with survival outcomes.
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)
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)
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. |
This function performs a dual-parameter sensitivity analysis of treatment effect to unmeasured confounding by either drawing simulated potential confounders from the conditional distribution of
given observed response, treatment and covariates or the Expectation-Maximization algorithm. We assume
is following
(default 0.5). Given
,
and
, the hazard rate is modeled using the Cox proportional hazards (PH) regression:
Given and
,
follows a generalized linear model:
tau |
a data.frame with zetaz, zetat, tau1, tau1.se and t statistic. |
Rong Huang
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.
#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)
#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 output from survSensitivity
.
data("tau.res")
data("tau.res")
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.
data(tau.res)
data(tau.res)