data(mobi)
# seminr syntax for creating measurement model
mobi_mm <- constructs(
composite("Image", multi_items("IMAG", 1:5)),
composite("Expectation", multi_items("CUEX", 1:3)),
composite("Value", multi_items("PERV", 1:2)),
composite("Satisfaction", multi_items("CUSA", 1:3)),
interaction_term(iv = "Image", moderator = "Expectation", method = two_stage)
)
# structural model: note that name of the interactions construct should be
# the names of its two main constructs joined by a '*' in between.
mobi_sm <- relationships(
paths(to = "Satisfaction",
from = c("Image", "Expectation", "Value",
"Image*Expectation"))
)
# PLS example:
mobi_pls <- estimate_pls(mobi, mobi_mm, mobi_sm)
summary(mobi_pls)
# CBSEM example:
mobi_cbsem <- estimate_cbsem(mobi, as.reflective(mobi_mm), mobi_sm)
summary(mobi_cbsem)
Run the code above in your browser using DataLab