Dear Leonard, There are no error variances defined for the endogenous variables in the model. Have you read the document that describes how sem() works (at http://socserv.socsci.mcmaster.ca/jfox/Books/Companion/appendix-sems.pdf)? If not, that might help you specify the model. It should also help to study the examples in ?sem.
The soon-to-be-released next version of the sem package will print a more informative error message for this kind of error. I hope that this helps, John > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Leonard assis > Sent: Tuesday, May 11, 2004 7:12 PM > To: [EMAIL PROTECTED] > Subject: [R] Sem error - subscript out of bounds > > > What�s happening with this following code: > > require(sem) > Celpe.Mod.RAM <- matrix(c( > # path > parametro Inicio > "Produ��o -> T1", > "gamma.11", NA, > "Produ��o -> T2", > "gamma.12", NA, > "Produ��o -> T3", > "gamma.13", NA, > "Produ��o -> T4", > "gamma.14", NA, > "Compreens�o -> T1", > "gamma.21", NA, > "Compreens�o -> T2", > "gamma.22", NA, > "Compreens�o -> PI", > "gamma.23", NA, > "Certificado -> Produ��o", > "alpha.11", NA, > "Certificado -> Compreens�o", > "alpha.12", NA, > "Compreens�o <-> Produ��o", > "alpha.21", NA > ), > ncol=3, byrow=TRUE) > > Celpe.cov <- cov(Celpe.Dados.Fatorial[3:7]) Celpe.cfa.sem <- > sem(ram=Celpe.Mod.RAM, S=Celpe.cov, > N=1443,refit=TRUE,debug=TRUE) > > Here comes the Results: > > > Celpe.cfa.sem <- sem(ram=Celpe.Mod.RAM, S=Celpe.cov, > N=1443,refit=TRUE,debug=TRUE) > > observed variables: > [1] "1:T1" "2:T2" "3:T3" "4:T4" "5:PI" > > > latent variables: > [1] "6:Produ��o" "7:Compreens�o" "8:Certificado" > > > parameters: > [1] "1:gamma.11" "2:gamma.12" "3:gamma.13" "4:gamma.14" > "5:gamma.21" > "6:gamma.22" "7:gamma.23" "8:alpha.11" "9:alpha.12" > [10] "10:alpha.21" > > > RAM: > heads to from parameter start > [1,] 1 1 6 1 NA > [2,] 1 2 6 2 NA > [3,] 1 3 6 3 NA > [4,] 1 4 6 4 NA > [5,] 1 1 7 5 NA > [6,] 1 2 7 6 NA > [7,] 1 5 7 7 NA > [8,] 1 6 8 8 NA > [9,] 1 7 8 9 NA > [10,] 2 6 7 10 NA > Error in startvalues(S, ram, debug = debug, tol = start.tol) : > subscript out of bounds > > Celpe.cov > T1 T2 T3 T4 PI > T1 1.2459212 0.6072653 0.6410553 0.4030267 0.7001731 > T2 0.6072653 0.9369251 0.5762526 0.3293337 0.6282211 > T3 0.6410553 0.5762526 1.5346904 0.3888291 0.6064140 > T4 0.4030267 0.3293337 0.3888291 0.5377340 0.3840199 PI > 0.7001731 0.6282211 0.6064140 0.3840199 1.9750506 > > version > _ > platform i386-pc-mingw32 > arch i386 > os mingw32 > system i386, mingw32 > status Patched > major 1 > minor 9.0 > year 2004 > month 04 > day 28 > language R > > > > []s > Leonard Assis > Estat�stico / CONFE 7439 > UIN : 41-764-523 / Skype : lmassis / msn : [EMAIL PROTECTED] > > ______________________________________________ > [EMAIL PROTECTED] mailing list > https://www.stat.math.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! > http://www.R-project.org/posting-guide.html ______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
