Hello,

I am using the SEM package in R to fit a multigroup latent variable model and ran into some difficulties. I have 2 questions:


1.       First, I am getting the following error message and wondering what to do to fix it:

Error in solve.default((N[g] - 1) * robustVcov(mod.g, adj.obj = adj.objects[[g]])) :

  system is computationally singular: reciprocal condition number = 4.52055e-23



2.       Second, I want to specify different models for two groups (Drivers vs. Nondrivers), but I want only 1 parameter to be different, while everything else remains the same. Should I just create two files with the model equations? But then how do I use these 2 files as an input to the multigroupModel or sem functions? I tried the following but got the error message {Error in model[, 2] : incorrect number of dimensions}. Here is a sample of the code:


mod.QT.1 <- specifyEquations(...) # model equations for category 1

mod.QT.2 <- specifyEquations(...) # model equations for category 2

Lst.model <- list(mod.QT.1, mod.QT.2)



mod.mg <- multigroupModel(Lst.model, groups=c("Driver", "Nondriver"))



sem.QT <- sem(mod.mg, data=QTrav, group="Driver_Class1", formula = ~ ..., fixed.x=c(...))

Are there any sample codes for multigroup modeling using the SEM package that I can look at?

Thanks in advance,
Maya



	[[alternative HTML version deleted]]

