This function decomposes the estimated selection bias to quantify what proportion of the estimated selection bias is explained by each observed confounder used in the propensity score model when estimating propensity score weighted treatment effects. The function offers two approaches - confounder inclusion or removal, and offers two estimation approaches - parametric or nonparametric.
sbdecomp(outcome, treatment, confounders, data=NULL, type = "inclusion", estimation
= "parametric", Bonly = T, balance = T, n.trees = 20000, interaction.depth = 4,
shrinkage = 0.005, verbose = FALSE, stop.method = c("es.max"), cv.folds = 0,
standard.error = F, boot.rep=500)
Continuous outcome; numeric vector or name of the variable in supplied data
Binary treatment indicator, 0 or 1; numeric vector or name of the variable in supplied data
a data frame of confounders with names or a vector containing the names of the confounders in supplied data (each confounder must be either numeric or factor)
data containing all variables; required if names provided in outcome, treatment, and/or confounders arguments above
The type of method for selection bias deocomposition; options are inclusion or removal, default is inclusion
The type of estimation that should be used; options are parametric (based on logistic regression) or nonparametric (based on generalized boosted models [GBM]), default is parametric
TRUE or FALSE; whether the user only wants the quantities B which are the proportions of the selection bias explained by each confounder, default is TRUE
TRUE or FALSE; whether the user wants balance information, default is TRUE
The n.trees for the nonparametric GBM approach, if using nonparametric estimation; default is 20000
The interaction depth for the nonparametric GBM approach, if using nonparametric estimation; default is 4
The shrinkage for the nonparametric GBM approach, if using nonparametric estimation; default is 0.005
TRUE or FALSE for the nonparametric GBM approach, if using nonparametric estimation; default is FALSE
The stopping method for the nonparametric GBM approach, if using nonparametric estimation; default is "es.max"
The cross-validation folds for the nonparametric GBM approach, if using nonparametric estimation; default is 0
TRUE or FALSE; whether the user wants standard error estimates for the resulting estimates, obtained using boostrapping; default is FALSE; note that if using nonparametric estimation, obtaining the standard error estimates will be very time-intensive
The number of bootstrap replications to be used when calculating the standard error; default is 500
A list is returned:
Estimated naive treatment effect
P-value for estimated naive treatment effect
95% confidence interval for estimated naive treatment effect
Estimated treatment effect after adjusting for all variables
P-value for estimated treatment effect after adjusting for all variables
95% confidence interval for estimated treatment effect after adjusting for all variables
The proportion of the selection bias explained by each variable
The estimated selection bias, only if Bonly = FALSE
The defined selection bias movement when including/removing a variable, only if Bonly = FALSE
The adjusted delta including only each variable or dropping each variable (depending on type), only if Bonly = FALSE
mean of the standardized effect size differences across all variables between the two groups; only if balance = TRUE
max of the standardized effect size differences across all variables between the two groups; only if balance = TRUE
mean of the standardized effect size differences across all variables between the two groups, after weighting with propensity score weights calculated using all variables; only if balance = TRUE
max of the standardized effect size differences across all variables between the two groups, after weighting with propensity score weights calculated using all variables; only if balance = TRUE
mean of the standardized effect size differences across all variables in the relevant propensity score model between the two groups, after weighting with relevant propensity score weights; if using type = "inclusion" and variable included is a factor, output will be the mean effect size difference across all levels; only if balance = TRUE
max of the standardized effect size differences across all variables in the relevant propensity score model between the two groups, after weighting with relevant propensity score weights; if using type = "inclusion" and variable included is a factor, output will be the max effect size difference across all levels; only if balance = TRUE
The estimated standard error for the estimated proportion of the selection bias explained by each variable; only if standard.error = TRUE
The estimated standard error for the estimated selection bias movement when including/removing a variable; only if standard.error = TRUE
Details can be found in: Parast, L and Griffin, BA (2020). "Quantifying the Bias due to Observed Individual Confounders in Causal Treatment Effect Estimates". Statistics in Medicine, In press. Please email parast@rand.org for a current version.
Parast, L and Griffin, BA (2020). "Quantifying the Bias due to Observed Individual Confounders in Causal Treatment Effect Estimates". Statistics in Medicine, 39(18): 2447- 2476.
# NOT RUN {
data(petsdata)
# }
# NOT RUN {
sbdecomp(outcome = petsdata$genhealth, treatment = petsdata$gotdog, confounders =
as.data.frame(petsdata[,c(2:13)]), type = "inclusion", estimation = "parametric",
balance = FALSE)
# }
# NOT RUN {
# }
# NOT RUN {
sbdecomp(outcome = petsdata$genhealth, treatment = petsdata$gotdog, confounders =
as.data.frame(petsdata[,c(2:13)]), type = "inclusion", estimation = "parametric",
Bonly =FALSE, balance = TRUE)
# }
# NOT RUN {
# }
# NOT RUN {
sbdecomp(outcome = "genhealth", treatment = "gotdog", confounders = c("age",
"ismale", "race_coll","hhsize","ownhome", "married", "ontanf", "hhincome",
"fulltime","spouse_fulltime" ,"liveinhouse", "ruralurban"), data = petsdata,
type = "inclusion", estimation = "parametric", Bonly =FALSE, balance = TRUE)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab