Learn R Programming

processR (version 0.2.3)

modmedSummary: 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 Wheter or not add range

Value

A data.frame and an object of class modmedSummary

Examples

Run this code
# NOT RUN {
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)
# }
# NOT RUN {
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