survSens

This package performs a dual-parameter sensitivity analysis of treatment effect to unmeasured confounding in observational studies with either survival or competing risks outcomes.

Release Note

12/27/2022 Version 1.1.0

Motivated by Cinelli, C., & Hazlett, C. (2020), we introduce partial RTU|X,Z2 and partial RZU|X2 to measure the dependency between the unmeasured confounder U and the outcome T, and between U and the treatment Z, respectively.

In the outcome model, suppose the full model TX+Z+U has a log likelihood l1, and the reduced model TX+Z has a log likelihood l0, with k events, we calculate partial RTU|X,Z2 similar to R2 in O’Quigley, J., Xu, R., & Stare, J. (2005) RTU|X,Z2=1e2(l1l0)/k.

In the treatment model, according to Cox, D. R., & Snell, E. J. (1989), the full model ZX+U has deviance DEV1, DEV1=2[zilog(p^i)+(1zi)log(1p^i)] where p^i=P(zi=1|xi,ui) and the reduced model ZX has deviance DEV0, DEV0=2[zilog(p^i)+(1zi)log(1p^i)] where p^i=P(zi=1|xi) then RZU|X2=1e(DEV1DEV0)/n.

The returned partial R2 has a sign, which indicates whether the association is positive or negative. Its absolute value is calculated as above.

04/29/2020 Version 0.1.0

Performs a dual-parameter sensitivity analysis of treatment effect to unmeasured confounding in observational studies with either survival or competing risks outcomes as described in Huang, R., Xu, R., & Dulai, P. S. (2020).

Install package from GitHub

if(!require(devtools))install.packages("devtools")
devtools::install_github("Rong0707/survSens")

Usage examples

For survival outcomes,

# Load the dataset included in the package.
data(survdata)
# Stochastic EM with regression
tau.res = survSensitivity(survdata$t, survdata$d, survdata$Z, survdata$X, "stoEM_reg", B = 5)
# EM with regression
tau.res = survSensitivity(survdata$t, survdata$d, survdata$Z, survdata$X, "EM_reg", Bem = 50)

# Contour plot with coefficients as axes.
plotsens(tau.res, coeff0 = 1.131)
# Contour plot with partial R-squared as axes.
plotsens(tau.res, coeff0 = 1.131, TRUE)

For competing risks outcomes,

# Load the dataset included in the package
data(comprdata)
# Stochastic EM with regression
tau.res = comprSensitivity(comprdata$t, comprdata$d, comprdata$Z, comprdata$X, "stoEM_reg", B = 5)
# EM with regression
tau.res = comprSensitivity(comprdata$t, comprdata$d, comprdata$Z, comprdata$X, "EM_reg", Bem = 50)

# Contour plot with coefficients as axes.
plotsens(tau.res$tau1, coeff0 = 1.244)
# Contour plot with partial R-squared as axes.
plotsens(tau.res$tau1, coeff0 = 1.244, TRUE)

Output consists of dataframe(s) for estimated treatment effect(s), as well as a contour plot for visualization.

Reference