modmedSummary: Summarize the moderated mediation

View source: R/modmedSummary.R

modmedSummaryR Documentation

Summarize the moderated mediation

Description

Summarize the moderated mediation

Usage

modmedSummary(
  semfit,
  mod = NULL,
  values = NULL,
  boot.ci.type = "perc",
  add.range = TRUE
)

Arguments

semfit

An object of class lavaan

mod

name of moderator

values

Optional. Numeric vector

boot.ci.type

Type of bootstrapping interval. Choices are c("norm","basic","perc",bca.simple")

add.range

logical Whether or not add range

Value

A data.frame and an object of class modmedSummary

Examples

require(lavaan)
labels=list(X="frame",M="justify",Y="donate",W="skeptic")
moderator=list(name="skeptic",site=list(c("a","c")))
model=tripleEquation(labels=labels,moderator=moderator)
cat(model)

semfit=sem(model,data=disaster,se="boot",bootstrap=100)
modmedSummary(semfit)
conditionalEffectPlot(semfit,data=disaster)
labels=list(X="dysfunc",M="negtone",Y="perform",W="negexp")
moderator=list(name="negexp",site=list("b"))
model=tripleEquation(labels=labels,moderator=moderator,data=teams,rangemode=2)
cat(model)
semfit=sem(model,data=teams,se="boot",bootstrap=100)
summary(semfit)
modmedSummary(semfit)
conditionalEffectPlot(semfit,data=teams)


processR documentation built on Jan. 23, 2023, 5:44 p.m.