04-18-2012 04:44 PM
I am using proc panel to do some analysis.
proc panel outest=parms data = comgasfinal2 ;
id pa year;
model cngc_fs = time1 gasprice gsp1 hddcon scgc sdgec pgep1 scgp1 sdgep1/ rantwo parks;
output out=panelout p=forecast;
I am not sure if its me or it's the procedure but I am not able to forecast the future values of the dependent variable. Procedures like proc reg allow automatic calculation of the future values of the dependent variable. Is this a limitation of proc panel? If so, is there a macro that I can use to automatically generate the final equation for the parameters estimated by proc panel?
04-20-2012 09:19 AM
At this time, if you want to obtain out-of-sample forecast in PROC PANEL, you would need to have observations for both dependent variable and independent variables for *at least some cross sections* which are needed to obtain estimate for the time periods, and to obtain forecast for some cross sections that do not have observations for the dependent variable for some time periods, you will need to have observations for all the independent* variables for those periods.
This is what the documentation was referring to when talking about predictions with missing dependent variables, but unfortunately this requirement is not very clearly stated. You may want to output OUTEST data set and compute the predicted values yourself in a data step.
09-11-2012 12:39 PM
I don’t understand your answer. I have observations for Cross-sections and independent variables until time T. Then I have observations for the independent variables post-T. How do I get predictions?
Even from OUTEST, how would I get predictions? Crosssection/Timeseries is not a simple formula. As asked above - " If so, is there a macro that I can use to automatically generate the final equation for the parameters estimated by proc panel?"
02-25-2016 05:36 AM
I've exactly done as you say, add 4 years more to my forecast sample and then I increase the ony independent variable making different scenarii. Also I leave dependent variable as missing but i have an error message.
Could you tell me if Proc panel can produde forecasts or not?
09-21-2012 10:18 AM
I think you can get the predicted values in this way:
1) Remove post-T observations from the dataset in a data step;
2) Run proc panel to get the estimates with OUTEST option or capture parameter estimates beta_hat with ODS OUTPUT;
3) Calculate predicted value by the formula y_hat = x*beta_hat. You can use IML to calculate the formula.
02-25-2016 05:33 AM
Your solution is not possible at least in an automatic or programme way, because the cross sectional values, that are necessary to use your solution of making the prediction "by hand" are not included in any out file.
Is there any elegant possibility to forecast using proc panel or not? Please give us a clear answer.