So I'm trying to get Factor Scores after an SEM, and I want to test different scenarios for policy analysis.
Each scenario consists of setting all collected values of one of the latent variables (so all corresponding indicators) to the maximum level (5 on a likert scale) . When I do this, using lavPredict, I get the following:
model1 = '
model1.fit <- sem(model1, data = mydata, std.lv=TRUE, fixed.x=TRUE, ordered = names(mydata))
lavPredict(model1.fit, newdata = dataIAQ, label = TRUE)
Error in lav_data_full(data = data, group = group, cluster = cluster, :
lavaan ERROR: ordered variable(s) has/have only 1 level
Note that mydata is the original data collected, and dataIAQ is the one where I manually set the answers to 5.
Is there a way to fix this?