balancing.weights {WMAP} | R Documentation |
Compute balancing weights using FLEXOR or other methods
Description
This function calculates balancing weights based on the specified pseudo-population method.
Usage
balancing.weights(
S,
Z,
X,
method,
naturalGroupProp,
num.random = 40,
gammaMin = 0.001,
gammaMax = (1 - 0.001),
seed = NULL,
verbose = TRUE
)
Arguments
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 |
Value
An S3 list object with the following components:
- wt.v
N
empirically normalized sample weights.- percentESS
Percentage sample effective sample size (ESS) for the pseudo-population.
Examples
data(demo)
balancing.weights(S, Z, X, method = "IC", naturalGroupProp)