estimate_real_valued_mu: Estimate real-valued mu

View source: R/estimation.R

estimate_real_valued_muR Documentation

Estimate real-valued mu

Description

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.

Usage

estimate_real_valued_mu(
  Y,
  A,
  X,
  folds,
  SL.library = c("SL.glm", "SL.mean"),
  V = 2L
)

Arguments

Y

A numeric vector or matrix of length n representing primary outcomes (in R).

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 R).

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).

Value

A fold-specific function predicting primary outcome (Y) given treatment (A) and covariates (X)


PLUCR documentation built on March 30, 2026, 5:08 p.m.