Package 'tmle3mediate'

Title: Targeted Learning for Causal Mediation Analysis
Description: Targeted maximum likelihood (TML) estimation of population-level causal effects in mediation analysis. The causal effects are defined by joint static or stochastic interventions applied to the exposure and the mediator. Targeted doubly robust estimators are provided for the classical natural direct and indirect effects, as well as the more recently developed population intervention direct and indirect effects.
Authors: Nima Hejazi [aut, cre, cph] , James Duncan [aut], David McCoy [aut], Mark van der Laan [ctb, ths]
Maintainer: Nima Hejazi <[email protected]>
License: GPL-3
Version: 0.0.3
Built: 2024-10-29 02:46:10 UTC
Source: https://github.com/tlverse/tmle3mediate

Help Index


Likelihood Factor for Incremental Propensity Score Interventions

Description

Likelihood Factor for Incremental Propensity Score Interventions

Format

R6Class object.

Value

LF_base object.

Constructor

define_lf(LF_ipsi, name, type = "density", likelihood_base, shift_param, treatment_task, control_task, ...)

name

A character, giving the name of the likelihood factor. Should match a node name in the nodes specified by the npsem slot of tmle3_Task.

likelihood_base

A trained Likelihood object, for use in generating a re-scaled likelihood factor.

shift_param

A numeric, specifying the magnitude of the desired incremental propensity score shift (a multiplier of the odds of receiving treatment).

treatment_task

A tmle3_Task object created by setting the intervention to the treatment condition: do(A = 1).

control_task

A tmle3_Task object created by setting the intervention to the control condition: do(A = 0).

...

Not currently used.

Fields

likelihood_base

A trained Likelihood object, for use in generating a re-scaled likelihood factor.

shift_param

A numeric, specifying the magnitude of the desired incremental propensity score shift (a multiplier of the odds of receiving treatment).

treatment_task

A tmle3_Task object created by setting the intervention to the treatment condition: do(A = 1).

control_task

A tmle3_Task object created by setting the intervention to the control condition: do(A = 0).

...

Additional arguments passed to the base class.

References

"Nonparametric Causal Effects Based on Incremental Propensity Score Interventions."

Kennedy, Edward H (2019). Journal of the American Statistical Association. https://doi.org/10.1080/01621459.2017.1422737

"Causal Mediation Analysis for Stochastic Interventions"

Díaz, Iván and Hejazi, Nima S (2020). Journal of the Royal Statistical Society, Series B. https://doi.org/10.1111/rssb.12362


Parameter for the Population Intervention (In)direct Effects

Description

Parameter definition class. See https://doi.org/10.1111/rssb.12362.

Format

R6Class object.

Value

Param_base object.

Constructor

define_param(Param_medshift, shift_param, ..., outcome_node)

observed_likelihood

A Likelihood corresponding to the observed likelihood.

shift_param

A numeric, specifying the magnitude of the desired incremental propensity score shift (a multiplier of the odds of receiving treatment).

...

Not currently used.

outcome_node

A character, giving the name of the node that should be treated as the outcome.

Fields

cf_likelihood

The counterfactual likelihood under the joint stochastic intervention on exposure and mediators.

lf_ipsi

Object derived from LF_base for assessing the joint intervention on exposure and mediators.

treatment_task

A tmle3_Task created by setting the intervention to the treatment condition: do(A = 1).

control_task

A tmle3_Task object created by setting the intervention to the control condition: do(A = 0).

shift_param

A numeric, specifying the magnitude of the desired incremental propensity score shift (a multiplier of the odds of receiving treatment).

See Also

Other Parameters: Param_NDE, Param_NIE


Parameter for the natural direct effect

Description

Parameter definition class. See https://www.ncbi.nlm.nih.gov/pubmed/22499725

Format

R6Class object.

Value

Param_base object

Constructor

define_param(Param_NDE, observed_likelihood, ..., outcome_node)

observed_likelihood

A Likelihood corresponding to the observed likelihood.

...

Not currently used.

outcome_node

A character, giving the name of the node that should be treated as the outcome.

Fields

cf_likelihood_treatment

The counterfactual likelihood for the treatment.

cf_likelihood_control

The counterfactual likelihood for the control.

treatment_task

tmle3_Task created by setting the intervention to the treatment condition: do(A = 1).

control_task

tmle3_Task created by setting the intervention to the control condition: do(A = 0).

See Also

Other Parameters: Param_NIE, Param_medshift


Parameter for the natural indirect effect

Description

Parameter definition class. See https://www.ncbi.nlm.nih.gov/pubmed/22499725

Format

R6Class object.

Value

Param_base object

Constructor

define_param(Param_NIE, observed_likelihood, ..., outcome_node)

observed_likelihood

A Likelihood corresponding to the observed likelihood.

...

Not currently used.

outcome_node

A character, giving the name of the node that should be treated as the outcome.

Fields

cf_likelihood_treatment

The counterfactual likelihood for the treatment.

cf_likelihood_control

The counterfactual likelihood for the control.

treatment_task

tmle3_Task created by setting the intervention to the treatment condition: do(A = 1).

control_task

tmle3_Task created by setting the intervention to the control condition: do(A = 0).

See Also

Other Parameters: Param_NDE, Param_medshift


TML Estimator for the Population Intervention (In)direct Effects

Description

O = (W, A, Z, Y) W = Covariates (possibly multivariate) A = Treatment (binary or categorical) Z = Mediators (binary or categorical; possibly multivariate) Y = Outcome (binary or bounded continuous)

Usage

tmle_medshift(
  shift_type = "ipsi",
  delta,
  e_learners,
  phi_learners,
  max_iter = 10000,
  step_size = 1e-06,
  ...
)

Arguments

shift_type

A character defining the type of shift to be applied to the exposure – an incremental propensity score intervention.

delta

A numeric, specifying the magnitude of the shift.

e_learners

A Stack (or other learner class that inherits from Lrnr_base), containing a single or set of instantiated learners from sl3, to be used in fitting a cleverly parameterized propensity score that conditions on the mediators, i.e., e=P(AZ,W)e = P(A \mid Z, W).

phi_learners

A Stack (or other learner class that inherits from Lrnr_base), containing a single or set of instantiated learners from sl3, to be used in a regression of a pseudo-outcome on the baseline covariates, i.e., phi(W)=E[m(A=1,Z,W)m(A=0,Z,W)W)]phi(W) = E[m(A = 1, Z, W) - m(A = 0, Z, W) | W)].

max_iter

A numeric setting the maximum iterations allowed in the targeting step based on universal least favorable submodels.

step_size

A numeric giving the step size (delta_epsilon in tmle3) to be used in the targeting step based on universal least favorable submodels.

...

Additional arguments (currently unused).


TML Estimator for the Natural Direct Effect

Description

O = (W, A, Z, Y) W = Covariates (possibly multivariate) A = Treatment (binary or categorical) Z = Mediators (binary or categorical; possibly multivariate) Y = Outcome (binary or bounded continuous)

Usage

tmle_NDE(e_learners, psi_Z_learners, max_iter = 10000, step_size = 1e-06, ...)

Arguments

e_learners

A Stack (or other learner class that inherits from Lrnr_base), containing a single or set of instantiated learners from sl3, to be used in fitting a cleverly parameterized propensity score that conditions on the mediators, i.e., e=P(AZ,W)e = P(A \mid Z, W).

psi_Z_learners

A Stack (or other learner class that inherits from Lrnr_base), containing a single or set of instantiated learners from sl3, to be used in a regression of a pseudo-outcome on the baseline covariates, i.e., psiZ(W)=E[m(A=1,Z,W)m(A=0,Z,W)A=0,W]psi_Z(W) = E[m(A = 1, Z, W) - m(A = 0, Z, W) \mid A = 0, W].

max_iter

A numeric setting the maximum iterations allowed in the targeting step based on universal least favorable submodels.

step_size

A numeric giving the step size (delta_epsilon in tmle3) to be used in the targeting step based on universal least favorable submodels.

...

Additional arguments (currently unused).


TML Estimator for the Natural Indirect Effect

Description

O = (W, A, Z, Y) W = Covariates (possibly multivariate) A = Treatment (binary or categorical) Z = Mediators (binary or categorical; possibly multivariate) Y = Outcome (binary or bounded continuous)

Usage

tmle_NIE(e_learners, psi_Z_learners, max_iter = 10000, step_size = 1e-06, ...)

Arguments

e_learners

A Stack (or other learner class that inherits from Lrnr_base), containing a single or set of instantiated learners from sl3, to be used in fitting a cleverly parameterized propensity score that conditions on the mediators, i.e., e=P(AZ,W)e = P(A \mid Z, W).

psi_Z_learners

A Stack (or other learner class that inherits from Lrnr_base), containing a single or set of instantiated learners from sl3, to be used in a regression of a pseudo-outcome on the baseline covariates, i.e., psiZ(W)=E[m(A=1,Z,W)m(A=0,Z,W)A=0,W]psi_Z(W) = E[m(A = 1, Z, W) - m(A = 0, Z, W) \mid A = 0, W].

max_iter

A numeric setting the maximum iterations allowed in the targeting step based on universal least favorable submodels.

step_size

A numeric giving the step size (delta_epsilon in tmle3) to be used in the targeting step based on universal least favorable submodels.

...

Additional arguments (currently unused).


TML Estimator for the Population Intervention (In)direct Effects

Description

TML Estimator for the Population Intervention (In)direct Effects


TML Estimator for the Natural Direct Effect

Description

TML Estimator for the Natural Direct Effect


TML Estimator for the Natural Indirect Effect

Description

TML Estimator for the Natural Indirect Effect