Learn R Programming

mzipmed (version 1.4.0)

zioutlmmedint: Mediation Analysis for Zero-Inflated Count Outcomes using MZIP with Exposure-Mediator Interactions

Description

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

Usage

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

Value

The function will return a list of 34 elements. MZIP is the results of regressing the mediator+exposure+confounder on the outcome using MZIP. To assess interaction effect individually look in the glm statement at the 4th parameter estimate

LM is the results of regressing the exposure and confounders on the mediator using linear regression

RRCDE is the controlled direct effect incidence rate ratio

RRNDE is the natural direct effect incidence rate ratio

RRNIE is the indirect effect incidence rate ratio.

PM is the proportion mediated

logRRCDEse is the standard error for the controlled direct effect log rate ratio

RRCDEci is the 95% confidence interval for the controlled direct effect rate raito

logRRNDEse is the standard error for the natural direct effect log rate ratio

RRNDEci is the 95% confidence interval for the natural direct effect rate ratio

logRRNIEse is the standard error for the indirect effect log rate ratio

RRNIEci is the 95% confidence interval for the indirect effect rate ratio

Intref is the Interactive Reference effect (not a ratio)

Intrefse is the standard error for Intref

IntrefCI is the CI for Intref

RRPIE is the pure indirect effect incidence rate ratio

logRRPIEse is the standard error of PIE log rate ratio

RRPIECI is the CI for PIE rate ratio

Intmed is the interactive mediation effect (not a ratio)

Intmedse is the error associated with Intmed

IntmedCI is the CI for Intmed

RRTE is the total effect incidence rate ratio

logRRTEse is the error of the total effect log rate ratio

RRTECI is the CI for the total effect rate 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

Arguments

outcome

is the zero-inflated count outcome variable

mediator

is the continuous 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)

n

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

M

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

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.

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

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 outcome model.

Examples

Run this code
zimout=zioutlmmedint(outcome=mzipmed_data$ziY1,mediator=mzipmed_data$lmM,
             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)

Run the code above in your browser using DataLab