simulateIndirectEffect {petersenlab}R Documentation

Simulate Indirect Effect.

Description

Simulate indirect effect from mediation analyses.

Usage

simulateIndirectEffect(
  N = NA,
  x = NA,
  m = NA,
  XcorM = NA,
  McorY = NA,
  corTotal = NA,
  proportionMediated = NA,
  seed = NA
)

Arguments

N

Sample size.

x

Vector for the predictor variable.

m

Vector for the mediating variable.

XcorM

Coefficient of the correlation between the predictor variable and mediating variable.

McorY

Coefficient of the correlation between the mediating variable and outcome variable.

corTotal

Size of total effect.

proportionMediated

The proportion of the total effect that is mediated.

seed

Seed for replicability.

Details

Co-created by Robert G. Moulder Jr. and Isaac T. Petersen

Value

See Also

Other simulation: complement(), simulateAUC()

Examples

#INSERT

[Package petersenlab version 1.0.0 Index]