This function estimates causal effects based on the specified pseudo-population method. The FLEXOR method involves an iterative two-step procedure.
causal.estimate(
S,
Z,
X,
Y,
B = 100,
method,
naturalGroupProp = NULL,
num.random = 40,
gammaMin = 0.001,
gammaMax = (1 - 0.001),
seed = NULL,
verbose = TRUE
)
An S3 list object with the following components:
Percentage sample effective sample size (ESS) of the pseudo-population.
An array of dimension \(3 \times K \times L\), containing:
Estimated means, standard deviations (SDs), and medians (dimension 1),
For \(K\) groups (dimension 2),
And \(L\) counterfactual outcomes (dimension 3).
Estimated mean group differences for \(L\) outcomes.
An array of dimension \(3 \times K \times L \times B\), containing:
moments.ar
of the \(b\)th bootstrap sample (dimensions 1–3),
For \(B\) bootstrap samples (dimension 4).
A matrix of dimension \(L \times B\) containing:
otherFeatures.v
of the \(b\)th bootstrap sample (dimension 1),
For \(B\) bootstrap samples (dimension 2).
A vector of length \(B\)
Pseudo-population method, i.e., weighting method.
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.
Matrix of \(L\) outcomes, with dimensions \(N \times L\).
Number of bootstrap samples for variance estimation. Default is 100.
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; if TRUE
(default), displays progress messages during computation to the console. Set to FALSE
to suppress these messages.
data(demo)
set.seed(1)
causal.estimate(S, Z, X, Y, B = 5, method = "IC", naturalGroupProp)
Run the code above in your browser using DataLab