Learn R Programming

sensmediation (version 0.3.1)

Parametric Estimation and Sensitivity Analysis of Direct and Indirect Effects

Description

We implement functions to estimate and perform sensitivity analysis to unobserved confounding of direct and indirect effects introduced in Lindmark, de Luna and Eriksson (2018) and Lindmark (2022) . The estimation and sensitivity analysis are parametric, based on probit and/or linear regression models. Sensitivity analysis is implemented for unobserved confounding of the exposure-mediator, mediator-outcome and exposure-outcome relationships.

Copy Link

Version

Install

install.packages('sensmediation')

Monthly Downloads

157

Version

0.3.1

License

GPL-2

Maintainer

Anita Lindmark

Last Published

September 26th, 2024

Functions in sensmediation (0.3.1)

plot.effectsMed

Plot function for objects of class "effectsMed"
stderrs

Functions to calculate standard errors of the direct, indirect and total effects using the delta method.
summary.effectsMed

Summary function for objects of class "effectsMed"
sensmediation

Estimate natural direct and indirect effects based on parametric regression models and perform sensitivity analysis
more.effects

Estimate additional natural direct and indirect effects based on an "effectsMed" object
coefs.sensmed

ML estimation of regression parameters for calculation of direct and indirect effects under unobserved confounding
calc.effects

Function for estimation of natural direct and indirect effects and sensitivity analysis for unobserved mediator-outcome confounding
ML

Functions for ML estimation of regression parameters for sensitivity analysis
effects

Functions to calculate natural direct and indirect effects.
RSdata

Example data for the functions in sensmediation
LogL

Implementation of loglikelihood functions for ML estimation of regression parameters
hess

Analytic Hessians of the loglikelihood functions for ML estimation of regression parameters
grr

Analytic gradients of the loglikelihood functions for ML estimation of regression parameters
partdevs

Implementations of the partial derivatives (gradients) of the expressions for the direct, indirect and total effects. Used to calculate standard errors (delta method).