# Example of QC-PM in Well-Being analysis
# model with three LVs and reflective indicators
# load library and dataset province
library(qcpm)
data(province)
# Define the model using laavan sintax. Use a set of regression formulas defining
# firstly the structural model and then the measurement model
model <- "
ECOW ~ EDU
HEALTH ~ EDU + ECOW
# Reflective measurement model
EDU =~ EDU1 + EDU2 + EDU3 + EDU4 + EDU5 + EDU6 + EDU7
ECOW =~ ECOW1 + ECOW2 + ECOW3 + ECOW4 + ECOW5 + ECOW6
HEALTH =~ HEALTH1 + HEALTH2 + HEALTH3
"
# Apply qcpm
well.qcpm = qcpm(model,province)
reliability(well.qcpm)
Run the code above in your browser using DataLab