binoutzimedint {mzipmed}R Documentation

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

Description

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

Usage

binoutzimedint(
  outcome,
  mediator,
  exposure,
  confounder = NULL,
  C = NULL,
  n = 1000,
  X = 1,
  Xstar = 0,
  M = NULL,
  error = "Delta",
  robust = FALSE,
  zioff = NULL,
  rare = FALSE,
  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) use to specify an offset variable within the MZIP mediator model. Note: Mediator/Offset is used in the outcome model

rare

set to TRUE of the outcome is rare and a logistic-regression should be used instead. Default is FALSE using robust Poisson model

OFF

if an offset is specified a fixed value of the offset variable is required for derviation of effects. By default the mean is used.

Value

The function will return a list of 34 elements. GLM is the results of regressing the mediator+exposure+confounder on the outcome using a Poisson model with robust standard errors. To assess interaction effect individually look in the glm statement at the 4th parameter estimate
MZIP is the results of regressing the exposure and confounders on the mediator using the MZIP model
RRCDE is the controlled direct effect risk ratio
RRNDE is the natural direct effect risk ratio
RRNIE is the indirect effect risk ratio.
PM is the proportion mediated
logRRCDEse is the standard error for the controlled direct effect log risk ratio
RRCDEci is the 95% confidence interval for the controlled direct effect risk raito
logRRNDEse is the standard error for the natural direct effect log risk ratio
RRNDEci is the 95% confidence interval for the natural direct effect risk ratio
logRRNIEse is the standard error for the indirect effect log risk ratio
RRNIEci is the 95% confidence interval for the indirect effect risk ratio
Intref is the Interactive Reference effect (not a risk ratio)
Intrefse is the standard error for Intref
IntrefCI is the CI for Intref
RRPIE is the pure indirect effect risk ratio
logRRPIEse is the standard error of PIE log risk ratio
RRPIECI is the CI for PIE risk ratio
Intmed is the interactive mediation effect (not a risk ratio)
Intmedse is the error associated with Intmed
IntmedCI is the CI for Intmed
RRTE is the total effect risk ratio
logRRTEse is the error of the total effect log risk ratio
RRTECI is the CI for the total effect risk ratio
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
PACDE is the proportion of the total effect due to neither mediation nor interaction
PAIntref is the proportion of the total effect due to just interaction
PAIntmed is the proportion of the total effect attributable to the joint effect of mediation and interaction
PAPIE is the proportion of the total effect attributable to just mediation
terr is the total excess relative risk

Examples

   #Example with exposure-mediator interaction
   #This builds upon function without interaction
    zimmed=binoutzimedint(outcome=mzipmed_data$binY,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,rare=FALSE)

[Package mzipmed version 1.4.0 Index]