Forecasting using SAS Forecast Server, SAS/ETS, and more

proc panel

Reply
Occasional Contributor
Posts: 7

proc panel

Hi,

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;

run;

)

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?

Ravi

SAS Employee
Posts: 416

Re: proc panel

Hello -

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.

Thanks,

Udo

New User
Posts: 1

Re: proc panel

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?"

New Contributor
Posts: 2

Re: proc panel

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?

 

Thank you.

SAS Employee
Posts: 1

Re: proc panel

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.

New Contributor
Posts: 2

Re: proc panel

Dear linxia

 

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.

Thank you.

Ask a Question
Discussion stats
  • 5 replies
  • 1059 views
  • 0 likes
  • 5 in conversation