Skip to contents

Calculate a mediation analysis for an SEM based on a cSEM model.

Usage

# S3 method for class 'cSEMResults'
rmedsem(
  mod,
  indep,
  med,
  dep,
  approach = c("bk", "zlc"),
  p.threshold = 0.05,
  effect.size = c("RIT", "RID")
)

Arguments

mod

A fitted SEM model (cSEM).

indep

A string indicating the name of the independent variable in the model.

med

A string indicating the name of the mediator variable in the model.

dep

A string indicating the name of the dependent variable in the model.

approach

either 'bk' or 'zlc' or both c("bk", "zlc") (default)

p.threshold

A double giving the p-value for determining whether a path is significant or not

effect.size

calculate different effect-sizes; one or more of "RIT", "RID"

Value

A rmedsem structure containing the results from the analysis