Dear Alain,
You may speed up the analysis by using the sample covariance matrix based on
a listwise deletion:
cov.cfa <- cov(your.raw.data, use="complete.obs")
Since you have 36671 cases, the results should be similar to those based on
the raw data unless you have lots of missing data and/or the
Dear Alain,
As for the first error ("sample covariance can not be inverted"): Mike
is right: with only 10 observations and 16 variables, the ML estimation
of the sample cov produces a covariance matrix that is not positive
definite, and hence the inversion (deliberately) fails.
The lesson fo
Dear Alain,
There were 16 variables with 10 cases with missing values. The sample
covariance matrix is not positive definite. It has nothing to do with
lavaan. You need more cases before you can fit a CFA with 16 variables.
Regards,
Mike
--
--
Dear R-List,
(I am not sure whether this list is the right place for my question...)
I have a dataframe df.cfa
df.cfa<-data.frame(x1=c(5,4,1,5,5,NA,4,NA,NA,5),x2=c(2,3,3,3,NA,1,2,1,2,1),x3=c(5,3,4,1,5,5,5,5,5,5),x4=c(5,3,4,5,5,5,5,5,5,5),x5=c(5,4,3,3,4,4,4,5,NA,5),x6=c(3,5,2,1,4,NA,NA,5,3,4),x7=
4 matches
Mail list logo