Random number generation in eviews
Moderators: EViews Gareth, EViews Moderator
Random number generation in eviews
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.
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13309
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Random number generation in eviews
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:
i.e., something like:
Code: Select all
rndseed 1
mod1.solve(s=m)
rndseed 1
mod2.solve(s=m)
Follow us on Twitter @IHSEViews
Re: Random number generation in eviews
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
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
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13309
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Random number generation in eviews
Code: Select all
series e = @recode(@nrnd>0, -1, 1)
Follow us on Twitter @IHSEViews
Who is online
Users browsing this forum: No registered users and 1 guest