Dear J?nis,

On Wed, 7 Aug 2013 12:36:11 +0300
 J?nis Mucenieks <[email protected]> wrote:
> Hello!
> I'm trying to do some confirmatory factor analysis with for ordered Likert
> scale items using sem and lavaan packages. So far I have read a lot and
> searched a lot but working example has so far eluded me. Can someone please
> take a look at the data and tell me if what I'm doing is correct (lavaan
> case) and where is the error (sem case)?
> 

. . .

> 
> cfaEI.sem.o <- sem(EI.model.sem.o, R.EI.data, nrow(EI.data))
> summary(cfaEI.sem.o)
> fscores(cfaEI.sem.o, EI.data)
> 
> Error (can't get fscrores):
> Error in colMeans(x, na.rm = TRUE) : 'x' must be numeric

fscores() can't handle ordinal data.

Also, though it's not relevant to this error, you could greatly simplify the 
model specification by using cfa() instead of specifyModel(). More generally, 
specifyEquations() is usually more convenient than specifyModel().

Best,
 John

> 
> Thank You!
> Janis
> 
>       [[alternative HTML version deleted]]
> 
> ______________________________________________
> [email protected] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

------------------------------------------------
John Fox
Sen. William McMaster Prof. of Social Statistics
Department of Sociology
McMaster University
Hamilton, Ontario, Canada
http://socserv.mcmaster.ca/jfox/

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to