[R] Floating simulation error

Bert Gunter gunter.berton at gene.com
Thu Apr 23 18:36:40 CEST 2009


?traceback
options("error")  ( ?options)
?debug
?try
?tryCatch

R has facilities to help you with such problems. Please use them -- and then
repost with more specific info if you still cannot solve it.

-- Bert Gunter

 

-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On
Behalf Of Brendan Morse
Sent: Thursday, April 23, 2009 9:12 AM
To: r-help at 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 Morse, M.S.
Industrial/Organizational Psychology
Ohio University
Office: 335 Porter Hall
Website: http://oak.cats.ohiou.edu/~bm123504




	[[alternative HTML version deleted]]

______________________________________________
R-help at 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.




More information about the R-help mailing list