Thank you for your comment, Mauricio! Your example was very helpful.
Hopefully, the R documentation for probe2WayMC() will update to make its applicaitons clearer (i.e., to probe observed interacitons as well).
I have already posted my question, but I cannot see it (anyway sorry in advance for double posting).
I have a below model, with predictor being observed and outcome latent variable and I would like to do single slopes analysis. I followed the code in this thread; however, I get the following error: “Error in varEst[targetcol, targetcol] : subscript out of bounds”. I read this is error due paths from the predictors to the outcome using a label, yet I do not have labels – so not sure how to solve it.
Thanks!
Best,
Anne
model_sem <- HYGG =~ hyg_1 + hyg_2 + hyg_3 + hyg_4 + hyg_5 + hyg_6
HYGG ~ pos_emo_country + trustgov + pos_emo_country:
hyg_2 ~~ hyg_3'
model_sem.fit <- cfa(model_sem,data = mydata, missing="fiml.x",fixed.x=F)
summary(model_sem.fit, fit.measures = TRUE, standardized=T,rsquare=T)
values_probe1 <- c(mean(mydata$trustgov) - sd(mydata$trustgov),