calc.effects: Function for estimation of natural direct and indirect...

Description Usage Arguments Value Author(s) See Also

Description

Function to estimate natural direct and indirect effect estimates and standard errors (using the delta method) based on parametric regression models and perform sensitivity analysis for unobserved confounding. Intended to be called through sensmediation (or more.effects), not on its own.

Usage

1
2
3
calc.effects(ML.object, type = "my", exp.name, med.name,
  covariates = NULL, alt.decomposition = FALSE, exp.value = 1,
  control.value = 0, med.model = NULL, out.model = NULL)

Arguments

ML.object

object from coefs.sensmed

type

the type of confounding for which the sensitivity analysis is to be performed. type = "my", the default, corresponds to unobserved mediator-outcome confounding, type = "zm" to exposure-mediator confounding and type = "zy" to exposure-outcome confounding.

exp.name

A character string indicating the name of the exposure variable used in the models.

med.name

A character string indicating the name of the mediator used in the models.

covariates

if conditional effects are to be estimated the list of covariate values. Covariates not specified are marginalized over. For more information, see sensmediation.

alt.decomposition

logical indicating whether alternative definitions of the direct and indirect effects should be used (for more information, see sensmediation).

exp.value

value of the exposure variable used as the exposure condition, default is 1.

control.value

value of the exposure variable used as the control (unexposed) condition, default is 0.

med.model

If type = "zy", fitted glm model object representing the mediator model at the basis of the estimation.

out.model

If type = "zm", fitted glm model object representing the outcome model at the basis of the estimation.

Value

A list with elements:

effects

A list with elements NIE and NDE, row matrices with the estimated NIE and NDE (or NIE* and NDE* if alt.decomposition = TRUE) for each value of the sensitivity parameter Rho.

std.errs

A list with elements se.nie and se.nde, row matrices with the estimated standard errors for the natural direct and indirect effects for the different values of the sensitivity parameter Rho.

betas

list of the estimated mediator model parameters over Rho, with

  • beta0 Intercept

  • beta1 Exposure

  • beta2 Covariates

  • beta3 Exposure-covariate interactions

Components that are not included in the input mediator model are set to 0.

thetas

list of the estimated outcome model parameters over Rho, with

  • theta0 Intercept

  • theta1 Exposure

  • theta2 Mediator

  • theta3 Exposure-mediator interaction

  • theta4 Covariates

  • theta5 Exposure-covariate interactions

  • theta6 Mediator-covariate interactions

  • theta7 Exposure-mediator-covariate interactions

Components that are not included in the input outcome model are set to 0.

part.deriv

List with the partial derivatives of the NDE (Lambda), NIE (Gamma) and TE (Eta) wrt the mediator and outcome model parameters for each value of Rho

sigma.thetabeta

a list with the joint covariance matrix of the outcome and mediator model parameters for each value of Rho. Note that the covariance matrix is constructed for all estimated parameters listed in betas and thetas but that components not included in the input mediator and outcome models are set to 0.

covariates

list of the covariate values that the effects are conditioned on.

Author(s)

Anita Lindmark

See Also

sensmediation


sensmediation documentation built on June 3, 2019, 9:02 a.m.