fit_nuisance_d: Fit estimated efficient influence function conditioning on W,...

View source: R/fit_mechanisms.R

fit_nuisance_dR Documentation

Fit estimated efficient influence function conditioning on W, A, Z, R, Y

Description

This function estimates the conditional efficient influence function, setting the treatment to a* and conditioning on W, A, Z, R, and Y. It is used to adjust the full-data efficient influence function to account for two-phase sampling.

Usage

fit_nuisance_d(
  train_data,
  valid_data,
  contrast,
  learners,
  b_out,
  g_out,
  h_out,
  q_out,
  r_out,
  u_out,
  v_out,
  m_names,
  w_names
)

Arguments

train_data

A data.table containing observed data, with columns in the order specified by the NPSEM (Y, M, R, Z, A, W), with column names set appropriately based on the input data. Such a structure is a convenience utility to passing data around to the various core estimation routines and is automatically generated by medoutcon.

valid_data

A holdout data set, with columns exactly matching those appearing in the preceding argument data, to be used for estimation via cross-fitting. Not optional for this nuisance parameter.

contrast

A numeric double indicating the two values of the intervention A to be compared. The default value of c(0, 1) assumes a binary intervention node A.

learners

Stack, or other learner class (inheriting from Lrnr_base), containing a set of learners from sl3, to be used in fitting a model for this nuisance parameter.

b_out

Output from the internal function for fitting the outcome regression fit_out_mech.

g_out

Output from the internal function for fitting the treatment mechanism without conditioning on mediators fit_treat_mech.

h_out

Output from the internal function for fitting the treatment mechanism conditioning on the mediators fit_treat_mech.

q_out

Output from the internal function for fitting the mechanism of the intermediate confounder while conditioning on the mediators, i.e., fit_moc_mech, setting type = "q".

r_out

Output from the internal function for fitting the mechanism of the intermediate confounder without conditioning on mediators, i.e., fit_moc_mech, setting type = "r".

u_out

Output from the internal function for fitting the pseudo-outcome regression conditioning on mediator-outcome confounder , i.e., fit_nuisance_u.

v_out

Output from the internal function for fitting the pseudo-outcome regression conditioning on treatment and baseline i.e., fit_nuisance_v.

m_names

A character vector of the names of the columns that correspond to mediators (M). The input for this argument is automatically generated by a call to the wrapper function medoutcon.

w_names

A character vector of the names of the columns that correspond to baseline covariates (W). The input for this argument is automatically generated by medoutcon.


nhejazi/medoutcon documentation built on July 16, 2025, 5:38 p.m.