I had a question about specifying a forecast sample (from a VAR-Model) in an EViews program:
I make the program run recursive VARs (with increasing sample size) and save them in separate files identified by the counters. I then turn each of these VARs into a Model using makemodel. Now I want to make out-of-sample forecasts from each model with the initial forecast point to start right after the estimation end-point.
I couldn't figure out how to do this within the loop. I tried to change the sample within the loop before using the .solve command, but still the program solves the model using the estimation sample. Is there a way around this?
Thanks for the help.
Specifying a solution sample in Model within Program
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Specifying a solution sample in Model within Program
Sounds like you're doing the correct thing - setting the workfile sample, using a smpl statement, prior to issuing the solve command.
Re: Specifying a solution sample in Model within Program
ok, I guess the problem is the program is not saving the solution after each iteration; I only get the last in variables named _0 after each variable. How can I store the solutions in each iteration with a different name after a solve command in the loop?
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Specifying a solution sample in Model within Program
Well an easy way would just be to create a new variable equal to the model solution each time. If your loop counter is !i, and the series you're solving for is Y (to give a solution series called Y_0), then just do this inside the loop:
Code: Select all
series y_0_{!i} = y_0
Re: Specifying a solution sample in Model within Program
that does it. thanks.
Who is online
Users browsing this forum: No registered users and 2 guests
