PDA

View Full Version : seed for Student's t?



hcrisp
01-26-2011, 11:22 AM
I have made good use of the seeding capability of RANDOMN (normal distribution). As shown here, it ensures reproduceability by re-creating the same random values:



s = 42L
print, randomu(s, 5)
; 0.000328708 0.524587 0.735424 0.263306 0.376224
s = 42L
print, randomu(s, 5)
; 0.000328708 0.524587 0.735424 0.263306 0.376224


Is there a way to seed the random ouputs of a Student's t distribution? I see only a way to get novel values for every call:



print, random(5, /STUDENT_T, PARAMETERS=10)
; -0.670240 -0.247309 -1.48435 -0.0447660 0.808571
print, random(5, /STUDENT_T, PARAMETERS=10)
; -3.10825 -0.838556 0.166508 0.398934 -0.573372

omega
01-26-2011, 01:11 PM
You'll want to look at RANDOMOPT. Try

WAVE> randomopt, set_seed = 2345
WAVE> print, random(5, /Student_t, parameters = 10)
-1.04061 -1.57673 0.0682781 -1.64633 -0.0760256
WAVE> randomopt, set_seed = 2345
WAVE> print, random(5, /Student_t, parameters = 10)
-1.04061 -1.57673 0.0682781 -1.64633 -0.0760256


hth,
-w