# Load libraries
library(seminr)
library(seminrExtras)
# Create measurement model ----
corp_rep_mm <- constructs(
composite("QUAL", multi_items("qual_", 1:8), weights = mode_B),
composite("PERF", multi_items("perf_", 1:5), weights = mode_B),
composite("CSOR", multi_items("csor_", 1:5), weights = mode_B),
composite("ATTR", multi_items("attr_", 1:3), weights = mode_B),
composite("COMP", multi_items("comp_", 1:3)),
composite("LIKE", multi_items("like_", 1:3))
)
# Create structural model ----
corp_rep_sm <- relationships(
paths(from = c("QUAL", "PERF", "CSOR", "ATTR"), to = c("COMP", "LIKE"))
)
# Estimate the model ----
corp_rep_pls_model <- estimate_pls(
data = corp_rep_data,
measurement_model = corp_rep_mm,
structural_model = corp_rep_sm,
missing = mean_replacement,
missing_value = "-99")
# Assess the base model ----
congruence_test(seminr_model = corp_rep_pls_model,
nboot = 20,
seed = 123,
alpha = 0.05,
threshold = 1)
Run the code above in your browser using DataLab