[R] Structural equation models with R

André TavaresCorrêa Dias atcdias at biologia.ufrj.br
Wed Mar 9 15:52:36 CET 2005


Hello useRs,
I`m running structural equation models with R, but for one of my models the 
below error message apears. I`m trying to change startvalues but without 
success. The manual for sem package did not help me. Does anyone knows how to 
change startvalues for iteration in sem package? Or it can be another problem 
with the model?

Error in startvalues(S, ram, debug = debug, tol = start.tol) : 
subscript out of bounds

The model (with three latent variables: 'reg','folha','solo'))

model.com=matrix(c(
'ridos>dendos',	'a1',	NA,
'ridos>reg',	'a2',	NA,
'ridos>folha',	'a3',	NA,
'ridos>solo',	'a4',	NA,
'ridos>raiz',	'a5',	NA,
'dendos>litter',	'a6',	NA,
'dendos>reg',	'a7',	NA,
'litter>reg',	'a8',	NA,
'folha>reg',	'a9',	NA,
'solo>reg',		'a10',	NA,
'raiz>reg',		'a11',	NA,
'raiz>solo',	'a12',	NA,
'folha>solo',	'a13',	NA,
'reg>denjov',	'l1',	NA,
'reg>riqjov',	'l2',	NA,
'folha>nfolha',	'l3',	NA,
'folha>pfolha',	'l4',	NA,
'solo>nsolo',	'l5',	NA,
'solo>psolo',	'l6',	NA,
'riqjov<>riqjov',	'e1',	NA,
'denjov<>denjov',	'e2',	NA,
'litter<>litter',	'e3',	NA,
'riqdos<>riqdos',	'e4',	NA,
'dendos<>dendos',	'e5',	NA,
'raiz<>raiz',	'e6',	NA,
'nsolo<>nsolo',	'e7',	NA,
'psolo<>psolo',	'e8',	NA,
'nfolha<>nfolha',	'e9', NA,
'pfolha<>pfolha',	'e10',	NA,
'reg<>reg',		NA,	1,
'solo<>solo',	NA,	1,
'folha<>folha',	NA,	1),
ncol=3, byrow=TRUE)

obs.vars.com=c('riqjov','denjov','litter','riqdos','dendos','raiz',
'nsolo','psolo','nfolha','pfolha')

sem.com=sem(model.com,S.com,30,obs.vars.com)

-------------------------------
André Tavares Corrêa Dias
Laboratório de Ecologia Vegetal
Departamento de Ecologia - IB
Universidade Federal do Rio de Janeiro
Ilha do Fundão, CCS
Rio de Janeiro, RJ. Brasil
CEP 21941-590    CP 68020
Tel. (21)2562-6377




More information about the R-help mailing list