Skip to contents

Native stacking: fits a small library of propensity learners (logistic, logistic-with-interactions, and optionally GBM/ranger when installed), combines their cross-validated predictions by non-negative least squares on the CV log-loss surface (native NNLS via Lawson-Hanson active set), and converts the ensemble scores to estimand weights.

Usage

morie_weight_super(data, treatment, covariates, estimand = "ATE", n_folds = 5L)

Arguments

data

Data frame.

treatment

Binary treatment column (0/1).

covariates

Covariate column names.

estimand

"ATE" (default), "ATT", or "ATC".

n_folds

Cross-validation folds for the stacking weights.

Value

A morie_weight object; $learner_weights gives the ensemble coefficients.

References

van der Laan, Polley & Hubbard (2007).

Examples

d <- data.frame(t = rbinom(150, 1, 0.5), x1 = rnorm(150), x2 = rnorm(150))
morie_weight_super(d, "t", c("x1", "x2"))
#> morie_weight: SuperLearner (native NNLS stack) (estimand ATE)
#>   n = 150  ESS = 146.3  weight range [1.106, 3.901]