I hope someone can help me better understand how forecasting works within the model object. I have a panel dataset with two endogenous variables, call them c and g, and several exogenous variables, k, pi etc. I have history data 1980-2014 for all the variables. I also have forecast data (2015-2025) for all exogenous variables.
One of my endogenous variables is a function of the other one, g = f(c, pi) and c = f(k(-1)). Therefore, in order to forecast g I need to forecast c first. I have been able to do this in two steps. First forecast c in a model object in which I only have an equation for c, and then I create another model object and forecast g by feeding in the forecast values, c_0.
I think I should be able to forecast both endogenous variables within a single model object, but I have not been successful. Here is a code I've tried:
Code: Select all
smpl @first 2014
equation c_eq.gmm log(c) c log(k(-1)) @ log(g)
equation g_eq.gmm log(g/g(-1))-log(c/c(-1)) log(pi/pi(-1)) @ log(jpgo)
smpl 2015 @last
model mymodel
mymodel.merge c_eq
mymodel.merge g_eq
mymodel.solve(n=f)
Is it necessary to specify "smpl 2015 @last" before I declare the model object?
If I leave that line out, there are no values generated for c_0 for 2015-2025, but the values for g_0 for the forecast period are generated. I am confused.
However, if I leave that line in, I encounter a different problem. Eviews program stops the calculation when it encounters negative values for an exogenous variable in the forecast period - the values for c_0 and g_0 are generated for cross-sections until a negative value for an exogenous variable shows up, after which no more calculations are performed.
Thanks for any feedback or advice you can offer!