Skip to content
Prev 311083 / 398503 Next

polycor package

Dear Laura,

John is correct. The error is produced by the sem() function in the 
lavaan package. The reason is that you did not use proper names for the 
function arguments. The correct call should be:

sem.cdu= sem(cdu, sample.cov=hetcor, sampl.nobs=1861, 
meanstructure=F,fixed.x=F)

But more importantly, using a polychoric correlation as input, and using 
ML estimation will not produce correct standard errors and test 
statistics. A better approach is to use the categorical capabilities of 
lavaan and provide the full data to sem(), indicating which variables 
can be considered as 'ordered'. For example:

sem.cdu= sem(cdu, data=germany2009, ordered=c("cdupid", "MERKELLIKE", 
"CDULIKE", "MERKELPROX", "CDUPROX"))

Here, I assumed all variables can be considered as ordered. If some of 
them should be treated as conintuous/numeric, omit them from the 
ordered= argument.

By default, lavaan will use the WLSMV estimator when ordered variables 
are involved.

Yves.
On 11/16/2012 10:13 PM, John Fox wrote: