partial_cv_preds {drtmle}R Documentation

Helper function to properly format partially cross-validated predictions from a fitted super learner.

Description

Helper function to properly format partially cross-validated predictions from a fitted super learner.

Usage

partial_cv_preds(fit_sl, a_0, W = NULL, family, include = NULL, easy = FALSE)

Arguments

fit_sl

A fitted SuperLearner object with control$saveCVFitLibrary = TRUE

a_0

Treatment level to set. If NULL, assume this function is being used to get partially cross-validated propensity score predictions.

W

A data.frame of named covariates.

family

Family of prediction model

include

A boolean vector indicating which observations were actually used to fit the regression.

easy

A boolean indicating whether the predictions can be computed the "easy" way, i.e., based just on the Z matrix from SuperLearner. This is possible for propensity score models when no missing data AND no stratification.


[Package drtmle version 1.1.2 Index]