Reputation: 11
This is my code:
DATA <- read_excel("FINAL DATA.xlsx")
CFA1 <-'
F1 =~ Q1 + Q2 + Q3 + Q4
F2 =~ Q5 + Q6 + Q7 + Q8
F3 =~ Q9 + Q10 + Q11 + Q12
F4 =~ Q13 + Q14 + Q15 + Q16
M =~ 1*F1 + 1*F2 + 1*F3 + 1*F4
F1 ~~ F2
F1 ~~ F3
F1 ~~ F4
F2 ~~ F3
F2 ~~ F4
F3 ~~ F4
'
f1 <- sem(CFA1, data= PHD_FINAL_DATA, std.lv=TRUE, ordered=c("Q1","Q2","Q3","Q4",
"Q5","Q6","Q7","Q8",
"Q9","Q10","Q11","Q12",
"Q13","Q14","Q15","Q16"))
summary(f1, rsquare= TRUE, fit.measures=TRUE)
However, I'm getting this error code when I run the summary line:
Error in lav_object_summary(object = object, header = header, fit.measures = fit.measures, : unused argument (std.nox = std.nox)
Upvotes: 1
Views: 237
Reputation: 1018
The reprex below works with the latest version of lavaan
. Could you try it and see if it works for you? Otherwise, you might just need to update lavaan
to the latest version.
library(lavaan)
packageVersion("lavaan")
#> [1] '0.6.18'
HS.model <- ' visual =~ x1 + x2 + x3
textual =~ x4 + x5 + x6
speed =~ x7 + x8 + x9 '
fit <- sem(HS.model, data = HolzingerSwineford1939)
out <- summary(fit, rsquare= TRUE, fit.measures = TRUE)
Created on 2024-06-09 with reprex v2.1.0
To resolve your error, please install the latest version of blavaan
. The source of the issue is a bit complicated but you can refer to the GitHub issue opened on about this.
Edit: I have deleted the old answer since it is not relevant anymore.
Upvotes: 0