balancing.weights | R Documentation |
This function calculates balancing weights based on the specified pseudo-population method.
balancing.weights(
S,
Z,
X,
method,
naturalGroupProp,
num.random = 40,
gammaMin = 0.001,
gammaMax = (1 - 0.001),
seed = NULL,
verbose = TRUE
)
S |
Vector of factor levels representing the study memberships. Takes values in {1, ..., J}. |
Z |
Vector of factor levels representing the group memberships. Takes values in {1, ..., K}. |
X |
Covariate matrix of |
method |
Pseudo-population method, i.e., weighting method. Take values in |
naturalGroupProp |
Relevant only for FLEXOR method: a fixed user-specified probability vector |
num.random |
Relevant only for FLEXOR method: number of random starting points of |
gammaMin |
Relevant only for FLEXOR method: Lower bound for each |
gammaMax |
Relevant only for FLEXOR method: Upper bound for each |
seed |
Seed for random number generation. Default is |
verbose |
Logical; Relevant only for FLEXOR method: if |
An S3 list object with the following components:
N
empirically normalized sample weights.
Percentage sample effective sample size (ESS) for the pseudo-population.
data(demo)
balancing.weights(S, Z, X, method = "IC", naturalGroupProp)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.