Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Home
- /
- Analytics
- /
- Forecasting
- /
- proc panel

Options

- RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Posted 04-18-2012 04:44 PM
(1853 views)

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

5 REPLIES 5

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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.

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

**If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. **

Multiple Linear Regression in SAS

Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.

Find more tutorials on the SAS Users YouTube channel.