calc.effects {sensmediation} | R Documentation |
Function for estimation of natural direct and indirect effects and sensitivity analysis for unobserved mediator-outcome confounding
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
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 |
type |
the type of confounding for which the sensitivity analysis is to be performed. |
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 |
alt.decomposition |
logical indicating whether alternative definitions of the direct and indirect effects should be used (for more information, see |
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 |
out.model |
If |
Value
A list with elements:
effects |
A list with elements |
std.errs |
A list with elements |
betas |
list of the estimated mediator model parameters over
Components that are not included in the input mediator model are set to 0. |
thetas |
list of the estimated outcome model parameters over
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 |
sigma.thetabeta |
a list with the joint covariance matrix of the outcome and mediator model parameters for each value of |
covariates |
list of the covariate values that the effects are conditioned on. |
Author(s)
Anita Lindmark