> -----Original Message-----
> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
> Behalf Of Brendan Morse
> Sent: Thursday, April 23, 2009 9:12 AM
> To: r-help@r-project.org
> Subject: [R] Floating simulation error
> 
> 
> Hi all, I am running a simulation and a curious error keeps coming up
> that stops the whole process. The error is a subscript out of bounds
> error, and it seems to happen at different points (floating around)
> throughout the looping simulation. Say, for example, it crashes on
> sample 1 - iteration 200. I can force it to start again on iteration
> 202 with all of the same settings, and it is fine. I can also force it
> to start again on iteration 201 if I modify the starting seed value
> and it goes on its merry way. What I think is happening is that
> certain seed values are disrupting something and causing the subscript
> error.
> 
> My seeds are set as follows: The simulation has x number of
> conditions. The starting seeds are set to equal the condition number
> (1 to x). The program runs 500 iterations within each condition, and
> the seed values for each iteration are set as x+iteration number. So,
> for condition 1, iteration 1, the starting seed value would be 2, then
> 3 etc. etc. At some point, I will get the subscript error but it seems
> unpredictable.
> 
> Has anyone had a similar problem or an idea as to what might be
> happening?
> 
> - Brendan
> 
> 

Brendan,

This is one of those situations where a self-contained, reproducible example 
would be really helpful.  In the absence of that, seeing your actual code is 
absolutely necessary.  I can't imagine anyone being able to provide any useful 
help here otherwise.

Dan

Daniel J. Nordlund
Washington State Department of Social and Health Services
Planning, Performance, and Accountability
Research and Data Analysis Division
Olympia, WA  98504-5204
 

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to