Error in lavaan::lavaan ERROR: missing observed variables in dataset: TR EW SRI VPM DELY

240 Views Asked by At

I'm trying to use a confirmatory factor analysis (CFA) in R studio. From what I have read online that CFA can be conducted in both categorical and continues variables. However the error message persists for all the continues variable. The code used is provided below

##CFA modelling
PSLmodel <- 'Geo =~ TR + PCI + EW
Traf =~ SRI + VPM
Colg =~ DELY + LUP'

##Model Fitting
fit <- cfa(PSLmodel, data=inputs_vehprop, std.lv=TRUE, estimator = "MLM")

I was expecting a CFA model with three latent variables. But stuck at this error.

0

There are 0 best solutions below