causal.estimate | R Documentation |
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
)
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 |
Y |
Matrix of |
B |
Number of bootstrap samples for variance estimation. Default is 100. |
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; if |
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
containing percentage sample ESS for B
bootstrap samples.
Pseudo-population method, i.e., weighting method.
data(demo)
set.seed(1)
causal.estimate(S, Z, X, Y, B = 5, method = "IC", naturalGroupProp)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.