On 11/21/2012 08:20 PM, Joe Glass wrote:
> Dear list,
>
> I am enjoying learning lavaan, and I have been trying to specify a model
> that contains a combination of continuous and categorical variables. I
> seem to run into a problem when I have two dependent variables, one that
> is latent and the other is a continuous variable. The latent has
> ordinal indicators. I receive the error:
>
> Error in muthen1984(Data = X[[g]], ov.names = ov.names[[g]], ov.types =
> ov.types, :
> unknown ov.types:integer
>
> Below is my syntax:
> structure <- ' withdrawal =~ q21 + q22 + q23 + q24 + q26
> pas =~ q50 + q51 + q52 + q53 + q55 + q56 + q58
> continuousdv ~ withdrawal + pas
> withdrawal ~ pas + audit10 + female + k6raw'
> fit <- sem(structure, data=stig1, ordered=c(withdrawal.ordered,
> pas.ordered))
I'm not sure, but could you remove the 'ordered' argument in your sem()
function call? From you explanation, I get that only the q21/q22/...
indicators are ordered. But not 'withdrawal.ordered' and 'pas.ordered'
(which do not appear under these names in your model syntax)?
Would you be able to send me your full R script and a snippet of the
data (so I can reproduce the error)?
Yves.