Package 'survSens'

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

Help Index


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)

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 d == 0 denotes right censoring, d==1 denotes event of interest, d==2 denotes competing risk.

Z

indicator of treatment.

X

pre-treatment covariates that will be included in the model as measured confounders.

method

needs to be one of "stoEM_reg", "stoEM_IPW" and "EM_reg".

zetaT

range of coefficient of UU in the event of interest response model.

zetat2

value of coefficient of UU in the competing risk response model

zetaZ

range of coefficient of UU in the treatment model.

theta

marginal probability of U=1U=1.

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 UU from the conditional distribution of UU given observed response, treatment and covariates or the Expectation-Maximization algorithm. We assume UU is following Bernoulli(π)Bernoulli(\pi) (default 0.5). Given ZZ, XX and UU, the hazard rate of the jth type of failure is modeled using the Cox proportional hazards (PH) regression:

λj(tZ,X,U)=λj0(t)exp(τjZ+Xβj+ζjU).\lambda_j (t | Z, X, U) = \lambda_{j0} (t) exp( \tau_j Z + X' \beta_j + \zeta_j U).

Given XX and UU, ZZ follows a generalized linear model:

P(Z=1X,U)=Φ(Xβz+ζzU).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)

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 survSensitivity or comprSensitivity.

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)

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 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 d == 0 denotes right censoring.

Z

indicator of treatment.

X

pre-treatment covariates that will be included in the model as measured confounders.

method

needs to be one of "stoEM_reg", "stoEM_IPW", and "EM_reg".

zetaT

range of coefficient of UU in the response model.

zetaZ

range of coefficient of UU in the treatment model.

theta

marginal probability of U=1U=1.

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 UU from the conditional distribution of UU given observed response, treatment and covariates or the Expectation-Maximization algorithm. We assume UU is following Bernoulli(π)Bernoulli(\pi) (default 0.5). Given ZZ, XX and UU, the hazard rate is modeled using the Cox proportional hazards (PH) regression:

λ(tZ,X,U)=λ0(t)exp(τZ+Xβ+ζU).\lambda (t | Z, X, U) = \lambda_{0} (t) exp(\tau Z + X ' \beta + \zeta U).

Given XX and UU, ZZ follows a generalized linear model:

P(Z=1X,U)=Φ(Xβz+ζzU).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)

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)