Dear S-PLUS users,
I have made a function that is based on an iterative
algorithm which uses randomly chosen initial values
from a distribution. After many trials I realized that
when an error occurs and the procedures stops, the
re-running of the function starts from the same
initial values. In order to check out if this is a
defect of my function I tried the following function:
ff <- function(n){
x <- rnorm(n)
print(x)
stop("problem")
}
ff(10)
which shows that every time the same values are
simulated after the procedure has stopped. Thus, I
would like to ask whether such a problem has something
to do with how S chooses the .Random.seed or is due to
something else
and how it can be overcome. I am using S-PLUS 6.1
Release 1
in Windows XP Home.
Thanks in advance for your suggestions.
Roula
=====
-----------------------------------------------------------
Spyridoula I. Tsonaka
Graduate Student
Department of Statistics
Athens University of Economics and Business
(http://www.stat-athens.aueb.gr)
____________________________________________________________
Do You Yahoo!?
Αποκτήστε τη δωρεάν @yahoo.gr διεύθυνση σας στο http://www.otenet.gr
|