Page 1 of 1

Random number generation in eviews

Posted: Wed Apr 14, 2010 4:36 am
by hovsha
I have estimated two time series models for two different countries. I use these models to forecast the future value of the endogenous variable in both countries. Howevere, I solve the model stochastically using following options: "Calc from entire sample" in "confidence Interval" box and "Bootstrap" in "Innovation generation". The problem is that I can't ensure that the two models (for two countries) are solved using the same random number. I would like to genertare a random number and then use this random number to select a random shock in the same order in both models. I will appreciate if you can give me some directives if it is possible to control random number generation in eviews.

Re: Random number generation in eviews

Posted: Wed Apr 14, 2010 10:01 am
by EViews Gareth
Only way to do this is programatically, where you can set the random number generator's seed before each model's solve, which will cause the random number generator to draw the same numbers.

i.e., something like:

Code: Select all

rndseed 1
mod1.solve(s=m)

rndseed 1
mod2.solve(s=m)

Re: Random number generation in eviews

Posted: Fri Jun 10, 2016 7:01 am
by Amber
Dear Eview Gareth,

Can you advise how to generate the random number variable of Rademacher distribution:
error=1 or -1 with equal probability of 0.5.

Please help!

Amber

Re: Random number generation in eviews

Posted: Fri Jun 10, 2016 7:13 am
by EViews Gareth

Code: Select all

series e = @recode(@nrnd>0, -1, 1)