partdevs {sensmediation} | R Documentation |
Implementations of the partial derivatives (gradients) of the expressions for the direct, indirect and total effects. Used to calculate standard errors (delta method).
Description
Functions implementing the partial derivatives (gradients) of the expressions for the direct, indirect and total effects. These are then used
to calculate standard errors of the effects using the delta method. Called by the stderrs
functions. The functions are named according to the convention
partdevs."mediator model type""outcome model type"
where b
stands for binary probit regression and
c
stands for linear regression.
Usage
partdevs.bb(beta0, beta1, beta2, beta3, theta0, theta1, theta2, theta3,
theta4, theta5, theta6, theta7, x.med, x.out, t.de, t.ie, exp.value,
control.value)
partdevs.bc(beta0, beta1, beta2, beta3, theta2, theta3, theta6, theta7,
x.med, x.out, t.de, t.ie, exp.value, control.value)
partdevs.cb(beta0, beta1, beta2, beta3, theta0, theta1, theta2, theta3,
theta4, theta5, theta6, theta7, sigma.eta, x.med, x.out, t.de, t.ie,
exp.value, control.value)
partdevs.cc(beta0, beta1, beta2, beta3, theta2, theta3, theta6, theta7,
exp.value, control.value, x.med, x.out, t.de, t.ie)
Arguments
beta0 , beta1 |
Vectors of mediator regression parameters (intercept and exposure) over |
beta2 , beta3 |
Matrices of mediator regression parameters (covariate main effects and exposure-covariate interactions) over |
theta0 , theta1 , theta2 , theta3 |
Vectors of outcome regression parameters (intercept, exposure, mediator, exposure-mediator interaction) over |
theta4 , theta5 , theta6 , theta7 |
Matrices of outcome regression parameters (covariate main effects, exposure-covariate, mediator-covariate and exposure-mediator-covariate interactions) over |
x.med |
Mediator covariate matrix for which to calculate standard errors |
x.out |
Outcome covariate matrix for which to calculate standard errors |
t.de , t.ie |
exposure values used to calculate the direct and indirect effects depending on the desired decomposition (see the Details section of |
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 |