# NOT RUN {
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 constructs must be created after the measurement model is defined
mobi_xm <- interactions(
interaction_ortho("Image", "Expectation"),
interaction_ortho("Image", "Value")
)
# 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", "Image*Value"))
)
seminr_model <- estimate_pls(data = mobi,
measurement_model = mobi_mm,
interactions = mobi_xm,
structural_model = mobi_sm)
# Load data, assemble model, and bootstrap
boot_seminr_model <- bootstrap_model(seminr_model = seminr_model,
nboot = 50, cores = 2, seed = NULL)
summary(boot_seminr_model)
# }
Run the code above in your browser using DataLab