lmoutzimedint {mzipmed}R Documentation

Mediation Analysis for Zero-Inflated Count Mediators using MZIP with Exposure-Mediator Interactions (Continuous Outcome)

Description

This function will do the same thing as the lmoutzimed function, but includes an exposure-mediator interaction. 4-way decomposition of total effect (Vanderweele) are included in the output.

Usage

lmoutzimedint(
  outcome,
  mediator,
  exposure,
  confounder = NULL,
  C = NULL,
  n = 1000,
  X = 1,
  Xstar = 0,
  M = NULL,
  error = "Delta",
  robust = FALSE,
  zioff = NULL,
  OFF = NULL
)

Arguments

outcome

is the continuous outcome variable

mediator

is the zero-inflated mediator variable, currently only 1 mediator variable is allowed

exposure

is the primary exposure being considered, only 1 is allowed

confounder

is a vector of confounder variables. If no confounder variables are needed then confounder is set to NULL. If more than 1 confounder is being considered then use the cbind function, e.g. cbind(var1,var2)

C

is a vector for theoretical values of each confounder. If left out the default will be set to the mean of each confounder giving marginal effects

n

is the number of repetitions for bootstrapping. Default is 1000. Setting n when using delta method errors will have no effect on output.

X

is the theoretical value for the exposure variable to be set at. The default is to 1

Xstar

is the theoretical value for the exposure variable to be compared to X. The default is 0, so direct, indirect, and proportion mediated values will be for a 1 unit increase in the exposure variable.

M

is a fixed value for the mediator, M. If M is not specified, M will be set to its mean value

error

='Delta' for delta method standard errors and ='Boot' for bootstrap. Default is delta method

robust

indicates if a robust covariance matrix should be used for MZIP in delta method derivations. Default is FALSE.

zioff

(optional) used to specify an offset variable within the MZIP mediator model. Note: Mediator/Offset is used in the outcome model

OFF

if an offset is specified a fixed value of the offset is required to compute CDE. By default it is the mean of the offset or 1 if no offset is specified.

Value

The function will return a list of 30 elements. LM is the results of regressing the mediator+exposure+confounder on the outcome using a linear model. To assess interaction effect individually look in the lm statement at the 4th parameter estimate
MZIP is the results of regressing the exposure and confounders on the mediator using the MZIP model
CDE is the controlled direct effect
NDE is the natural direct effect
NIE is the indirect effect.
PM is the proportion mediated
CDEse is the standard error for the controlled direct effect
CDEci is the 95% confidence interval for the controlled direct effect
NDEste is the standard error for the natural direct effect
NDEci is the 95% confidence interval for the natural direct effect
NIEse is the standard error for the indirect effect
NIEci is the 95% confidence interval for the indirect effect
Intref is the Interactive Reference effect
Intrefse is the standard error for Intref
IntrefCI is the CI for Intref
PIE is the pure indirect effect
PIEse is the standard error of PIE
PIECI is the CI for PIE
Intmed is the interactive mediation effect
Intmedse is the error associated with Intmed
IntmedCI is the CI for Intmed
TE is the total effect
TEse is the error of the total effect
TECI is the CI for the total effect
Int is the overall additive interaction effect
Intse is the standard error for the additive interaction
IntCI is the confidence interval for the interaction effect
PAINT is the proportion attributable to the interaction effect
PE is the proportion eliminated

Examples

   #Example with exposure-mediator interaction
   #This builds upon function without interaction
    zimmed=lmoutzimedint(outcome=mzipmed_data$lmY,mediator=mzipmed_data$ziM,
                  exposure=mzipmed_data$X,confounder=cbind(mzipmed_data$C1,
                  mzipmed_data$C2),error="Delta",robust=FALSE,X=1,Xstar=0,M=NULL,
                  C=NULL,zioff=NULL,OFF=NULL)

[Package mzipmed version 1.4.0 Index]