estimate_initial_likelihood: Function to compute initial estimates of nuisance functions.

View source: R/estimate_likelihood.R

estimate_initial_likelihoodR Documentation

Function to compute initial estimates of nuisance functions.

Description

Function to compute initial estimates of nuisance functions.

Usage

estimate_initial_likelihood(
  W,
  A,
  Y,
  weights = NULL,
  sl3_Learner_pA1W,
  sl3_Learner_EYAW,
  folds = 10,
  outcome_type = NULL
)

Arguments

W

A column-named matrix of baseline variables.

A

A binary vector with values in 0,1 encoding the treatment assignment.

Y

A numeric vector storing the outcome values.

sl3_Learner_pA1W

A sl3_Learner object from the tlverse/sl3 R github package that specifies the machine-learning algorithm for learning the propensity score 'P(A = 1 | W)'

sl3_Learner_EYAW

A sl3_Learner object from the tlverse/sl3 R github package that specifies the machine-learning algorithm for learning the outcome conditional mean 'E[Y | A, W]'. NOTE: the treatment arms are pooled in the regression. See the preprocessing sl3_Learner Lrnr_stratified if you wish to stratify the estimation by treatment.

folds

A number representing the number of folds to use in cross-fitting or a fold object from the package tlverse/origami. This parameter will be passed to internal sl3_Task objects that are fed to the codesl3_Learners.


Larsvanderlaan/npcausalML documentation built on July 30, 2023, 4:32 p.m.