I am developing a questionnaire based on the Big-5, anslysis in R. I have looked at a possible method factor for negatively keyed items in a separate CFA model and analysis – and for one factor there does seem to be an impact. I have now been requested to add it into an ESEM analysis. I am using esemComp which writes syntax for a targetted rotation that is used in the lavaan CFA process.
I am not sure if I just specify a factor for the rotation matrix including all the negatively keyed items, in addition to the currently specified five factors. All items are scores on a 1-5 Likert scale. I have selected 30 items for this model. The code shown runs without error, it is adding the method factor that is the issue.
Asistance hugely appreciated.
#30 items are being renamed sequentially
names(esemdata) <- paste0("x", sprintf("%02d", c(1:30)))
names(esemdata)
target_rot <- make_target(30, mainloadings = list(A = 1:6, C = 7:12, E = 13:18, N = 19:24, O = 25:30)) ## Do I add here “mf = 3,6,7,9,14,19…..”? It will have variables from across all five factors
#Run model
esem_target_efa <- esem_efa(esemdata, nfactors =5,
target = target_rot, fm = 'ml')
#Referents and syntax
referents <- find_referents(esem_target_efa,factor_names = c("A","C","E","N","O"))
esem_syntax <- syntax_composer(esem_target_efa, referents)
writeLines(esem_syntax) # The method factor will need to be included in this syntax
#Fit the ESEM model (using robust ML)
esem_fit <- cfa(model = esem_syntax,
data = esemdata, std.lv=T, estimator = "MLM")
summary(esem_fit, fit.measures = T, standardized = T, rsquare = TRUE)
MastersPsychStudent is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.