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
)
An S3 list object with the following components:
\(N\) empirically normalized sample weights.
Percentage sample effective sample size (ESS) for the pseudo-population.
Vector of factor levels representing the study memberships. Takes values in {1, ..., J}.
Vector of factor levels representing the group memberships. Takes values in {1, ..., K}.
Covariate matrix of \(N\) rows and \(p\) columns.
Pseudo-population method, i.e., weighting method. Take values in FLEXOR
, IC
, or IGO
.
Relevant only for FLEXOR method: a fixed user-specified probability vector \(\theta\).
Relevant only for FLEXOR method: number of random starting points of \(\gamma\) in the two-step iterative procedure. Default is 40.
Relevant only for FLEXOR method: Lower bound for each \(\gamma_s\) in the two-step iterative procedure. Default is 0.001.
Relevant only for FLEXOR method: Upper bound for each \(\gamma_s\) in the two-step iterative procedure. Default is 0.999.
Seed for random number generation. Default is NULL
.
Logical; Relevant only for FLEXOR method: if TRUE
(default), displays progress messages during computation to the console. Set to FALSE
to suppress these messages.
data(demo)
balancing.weights(S, Z, X, method = "IC", naturalGroupProp)
Run the code above in your browser using DataLab