| estimate_mu | R Documentation |
This function trains conditional mean of primary outcome models for treated and control groups
using SuperLearner, applying cross-validation to compute out-of-fold estimates.
estimate_mu(
Y,
A,
X,
folds,
SL.library = c("SL.glm", "SL.mean"),
V = 2L,
threshold = 0.01
)
Y |
A numeric vector or matrix of length n representing primary outcomes (in |
A |
A binary vector or matrix of length n indicating treatment assignment (0 or 1). |
X |
A matrix or data frame of covariates of size n x d (input data in |
folds |
A list of cross-validation folds (e.g., a list of indices for each fold). |
SL.library |
Vector of libraries for training SuperLearner (c("SL.glm", "SL.mean") by default). |
V |
Number of folds inside the SuperLearner (2L by default). |
threshold |
A numeric scalar that sets the minimum allowed value for upper and lower bound estimations (1e-2 by default). Constrains estimation to |
A fold-specific function predicting primary outcome (Y) given treatment (A) and covariates (X)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.