stderrs {sensmediation}R Documentation

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

Description

Functions used to calculate standard errors of the direct, indirect and total effects using the delta method. Called by calc.effects. The functions are named according to the convention stderr."mediator model type""outcome model type" where b stands for binary probit regression and c stands for linear regression.

Usage

stderr.bb(Rho, betas, thetas, sigma.pars, x.med, x.out, alt.decomposition,
  exp.value, control.value)

stderr.bc(Rho, betas, thetas, sigma.pars, x.med, x.out, alt.decomposition,
  exp.value, control.value)

stderr.cb(Rho, betas, thetas, sigma.eta, sigma.pars, x.med, x.out,
  alt.decomposition, exp.value, control.value)

stderr.cc(Rho, betas, thetas, sigma.pars, x.med, x.out, alt.decomposition,
  exp.value, control.value)

Arguments

Rho

The sensitivity parameter vector.

betas

List of mediator regression parameters

thetas

List of outcome regression parameters

sigma.pars

List of covariance matrices for the mediator and outcome regression parameters

x.med

Mediator covariate matrix for which to calculate standard errors

x.out

Outcome covariate matrix for which to calculate standard errors

alt.decomposition

logical indicating whether or not alternative definitions of the direct and indirect effects should be used.

exp.value

value of the exposure variable used as the exposure condition.

control.value

value of the exposure variable used as the control (unexposed) condition.

sigma.eta

For a continuous mediator and binary outcome, matrix with the estimated residual standard deviation for the mediator model over the range of Rho.


[Package sensmediation version 0.3.0 Index]