Random number generation in eviews

For technical support, tips and tricks, suggestions, or any other information regarding the EViews model object.

Moderators: EViews Gareth, EViews Moderator, EViews Chris

hovsha
Posts: 1
Joined: Wed Apr 14, 2010 4:15 am

Random number generation in eviews

Postby hovsha » Wed Apr 14, 2010 4:36 am

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.

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 11285
Joined: Tue Sep 16, 2008 5:38 pm

Re: Random number generation in eviews

Postby EViews Gareth » Wed Apr 14, 2010 10:01 am

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)
Follow us on Twitter @IHSEViews

Amber
Posts: 31
Joined: Wed Aug 03, 2011 4:35 am

Re: Random number generation in eviews

Postby Amber » Fri Jun 10, 2016 7:01 am

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

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 11285
Joined: Tue Sep 16, 2008 5:38 pm

Re: Random number generation in eviews

Postby EViews Gareth » Fri Jun 10, 2016 7:13 am

Code: Select all

series e = @recode(@nrnd>0, -1, 1)
Follow us on Twitter @IHSEViews


Return to “Models”

Who is online

Users browsing this forum: No registered users and 3 guests