# NOT RUN {
## Take a look at the dataset
#?threecommonfactors
## Specify the (correct) model
model <- "
# Structural model
eta2 ~ eta1
eta3 ~ eta1 + eta2
# (Reflective) measurement model
eta1 =~ y11 + y12 + y13
eta2 =~ y21 + y22 + y23
eta3 =~ y31 + y32 + y33
"
## Estimate
res <- csem(threecommonfactors, model, .resample_method = "bootstrap", .R = 40)
## Postestimation
res_summarize <- summarize(res)
res_summarize
# Extract e.g. the loadings
res_summarize$Estimates$Loading_estimates
## By default only the 95% percentile confidence interval is printed. User
## can have several confidence interval computed, however, only the first
## will be printed.
res_summarize <- summarize(res, .ci = c("CI_standard_t", "CI_percentile"),
.alpha = c(0.05, 0.01))
res_summarize
# Extract the loading including both confidence intervals
res_summarize$Estimates$Path_estimates
# }
Run the code above in your browser using DataLab