[R] sem package subscript out of bounds error

John Fox jfox at mcmaster.ca
Mon Nov 20 22:45:10 CET 2006


Dear Jarrett,

On Mon, 20 Nov 2006 11:31:51 -0800
 Jarrett Byrnes <jebyrnes at ucdavis.edu> wrote:
> John,
> 
> Thank you so much.  That appears to have done the trick.  You're  
> right about the non-association between previous year and current  
> year variables - I'm early in model development and was  
> troubleshooting to make sure nothing would cause any huge snafus, but
>  
> those were indeed elements that were going to later appear in the
> model.
> 
> Thanks, though, for help with interpreting the error.  It saved my  
> bacon, as it were!
>

I'm glad that I was able to spot the problem.

> One other quick question I had (and I was going to sit down tonight  
> and see if I can implement this - if so, I'll send you the code) -  
> would it be possible at all to implement comments within models in  
> specify.model.  I know commenting up my model, partitioining it into
>  
> blocks, would help me organizationally avoid these sorts of snafus.
>

At present specify.model() does permit end-of-line comments, preceded
by #. Entire-line comments are treated as blank lines and therefore
terminate input. I'll add this suggestion to my to-do list.
   
> That, and an update.model would also make coding multiple models for
>  
> comparison far far easier.  Again, if I end up getting to it first,  
> as I'm sure you're rather busy, I'll let you know.
>

What would get updated -- the model-specification object or the
fitted-model object -- and how would the update take place? Would you
simply add paths and covariances to the previous specification, or
would there be a way of removing them?

I assume that you keep commands in an editor, so altering the model
should not, I think, be that difficult.

Regards,
 John
 
> Thanks again for a great package - it's getting a workout over here,
>  
> and I look forward to seeing how you continue to develop it!
> 
> -Jarrett

. . . (lines deleted)

--------------------------------
John Fox
Department of Sociology
McMaster University
Hamilton, Ontario, Canada
http://socserv.mcmaster.ca/jfox/



More information about the R-help mailing list