psw.balance {PSW} | R Documentation |
Balance checking using standardized mean difference
Description
psw.balance
is used to compute the standardized mean difference (in percentage) for balance diagnosis.
Usage
psw.balance(data, form.ps, weight, V.name = NULL, K = 4)
Arguments
data |
data frame to be used. |
form.ps |
propensity score model. |
weight |
weighting method to be used. Available methods are |
V.name |
a vector of covariates on which standardized mean difference is computed. If |
K |
value of |
Value
A list of weighting method, fitted propensity score model, estimated propenstity scores, estimated propensity score weights, standardized mean difference before and after weighting adjustment.
weight |
weighting method. |
ps.model |
object returned by fitting the propensity score model using |
ps.hat |
estimated propensity score. |
W |
estimated propensity score weight. |
std.diff.before |
A data frame of weighed mean, variance, and standardized mean difference for covariates in |
std.diff.after |
A data frame of weighed mean, variance, and standardized mean difference for covariates in |
See Also
Examples
# Load the test data set
data(test_data);
# Propensity score model
form.ps <- "Z ~ X1 + X2 + X3 + X4";
# A vector of covariates
V.name <- c( "X1", "X2", "X3", "X4" );
tmp <- psw.balance( data = test_data, weight = "MW", form.ps = form.ps,
V.name = V.name );