Learn R Programming

processR (version 0.2.7)

modmedSummary: Summarize the moderated mediation

Description

Summarize the moderated mediation

Usage

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

Value

A data.frame and an object of class modmedSummary

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

Examples

Run this code
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)
# \donttest{
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)
# }

Run the code above in your browser using DataLab