[R] Sem error - subscript out of bounds

Leonard assis lmassis at yahoo.com.br
Wed May 12 02:12:28 CEST 2004


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 : lmassis at msn.com




More information about the R-help mailing list