get_SL_fn: Get the Super Learner function given a library of...

View source: R/doubly_robust.R

get_SL_fnR Documentation

Get the Super Learner function given a library of SuperLearner algorithms.

Description

Get the Super Learner function given a library of SuperLearner algorithms.

Usage

get_SL_fn(
  SL.library = c("SL.earth", "SL.gam", "SL.glm", "SL.glmnet", "SL.glm.interaction",
    "SL.ranger"),
  family = gaussian()
)

Arguments

SL.library

Character vector containing SuperLearner algorithm names.

family

The family for the algorithm. If estimating the propensity score, set 'family = binomial', but if estimating the regression function, set 'family = gaussian()'.

Value

Function which takes three arguments 'y', 'X', and 'newX', the training outcome, training covariates, and evaluation covariates, respectively. This function takes 'y' and 'X' to train the algorithm and uses the 'SuperLearner' library to predict the outcome for the covariates 'newX'.


WannabeSmith/sequential.causal documentation built on Sept. 12, 2023, 3:10 p.m.