| SumStat_sga | R Documentation |
SumStat_sga is used to generate distributional plots of the estimated propensity scores and balance
diagnostics after propensity score weighting.
SumStat_sga( subgroup = NULL, xname = NULL, ps.formula = NULL, ps.estimate = NULL, trtgrp = NULL, zname = NULL, yname = NULL, data = NULL, weight = "overlap", method = "glm" )
subgroup |
a vector to specify name of subgroup variables by column index or column names |
xname |
an optional character vector specifying the name of the covariates (confounders) in |
ps.formula |
an object of class |
ps.estimate |
an optional matrix or data frame containing estimated (generalized) propensity scores for each observation. Typically, this is an N by J matrix, where N is the number of observations and J is the total number of treatment levels. Preferably, the column names of this matrix should match the names of treatment level, if column names are missing or there is a mismatch, the column names would be assigned according to the alphabatic order of treatment levels. A vector of propensity score estimates is also allowed in |
trtgrp |
an optional character defining the "treated" population for estimating the average treatment effect among the treated (ATT). Only necessary if |
zname |
an optional character specifying the name of the treatment variable in |
yname |
an optional vector of characters including the names of outcome in |
data |
an optional data frame containing the variables in the propensity score model. If not found in data, the variables are taken from |
weight |
a character or vector of characters including the types of weights to be used. |
method |
a character to specify the method for propensity model. When |
A typical form for ps.formula is treatment ~ terms where treatment is the treatment
variable (identical to the variable name used to specify zname) and terms is a series of terms
which specifies a linear predictor for treatment. ps.formula specifies logistic or more flexible
models for estimating the propensity scores, when ps.estimate is NULL.
When comparing two treatments, ps.estimate can either be a vector or a two-column matrix of estimated
propensity scores. If a vector is supplied, it is assumed to be the propensity scores to receive the treatment, and
the treatment group corresponds to the last group in the alphabetic order, unless otherwise specified by trtgrp.
In general, ps.estimate should have column names that indicate the level of the treatment variable,
which should match the levels given in Z.
If column names are empty or there is a mismatch, the column names will be created following
the alphabetic order of values in Z, and the rightmost column of ps.estimate is assumed
to be the treatment group, when estimating ATT. trtgrp can also be used to specify the treatment
group for estimating ATT.
The argument zname and/or yname is required when ps.estimate
is not NULL.
Current version of PSweight_sga allows for three types of propensity score weights used to estimate ATE, ATT and
ATO. These weights are members of larger class of balancing weights defined in Li, Morgan, and Zaslavsky (2018). The overlap weights can also be considered as
a data-driven continuous trimming strategy without specifying trimming rules, see Li, Thomas and Li (2019).
Additional details on balancing weights and generalized overlap weights for multiple treatment groups are provided in
Li and Li (2019).
The variance will be calculated by nonparametric bootstrap, with R bootstrap
replications. The default of R is 50.
SumStat_sga returns a SumStat_sga object including a list of the following value:
treatment group, propensity scores, propensity score weights, effective sample sizes,
and balance statistics.
trtgrpa character indicating the treatment group.
propensitya data frame of estimated propensity scores.
ps.weighta data frame of propensity score weights.
ASDa table including absolute standardized mean differences in the overall sample and subgroups after weighting.
ASD_bsa table including absolute standardized mean differences in the overall sample and subgroups before weighting.
vifa vector indicating the approximated variance inflation in the overall sample and subgroups after weighting, see Yang et al. (2021)
nsubga vector indicating the subgroup sample sizes.
essa table of effective sample sizes. This serves as a conservative measure to characterize the variance inflation or precision loss due to weighting, see Yang et al. (2021).
subgoupa vector indicating name of the specified subgroups.
methoda character indicating the propensity score method used.
nonzero_coefa vector indicating the terms selected by LASSO. Only available when method is LASSO.
Yang, S., Lorenzi, E., Papadogeorgou, G., Wojdyla, D. M., Li, F., & Thomas, L. E. (2021). Propensity score weighting for causal subgroup analysis. Statistics in medicine, 40(19), 4294-4309.
Li, F., Morgan, K. L., Zaslavsky, A. M. (2018). Balancing covariates via propensity score weighting. Journal of the American Statistical Association, 113(521), 390-400.
Li, F., Thomas, L. E., Li, F. (2019). Addressing extreme propensity scores via the overlap weights. American Journal of Epidemiology, 188(1), 250-257.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.