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 09-20-2020 09:28 AM
(1053 views)

Hello,

I use balance panel with 22 cross section units and 9 years.

When I apply first difference method to my model, it should be 22*(9-1) = 176 observations applied to estimate the model.

I use the following procedure:

*proc panel data= ex1;**id cross time;**model y= d2001 d2002 d2003 d2004 d2005 d2006 d2007 dfemale /fdone ;**run;*

I understand that SAS use 167 observations to estimate the model (Consider from Den DF in the output below). When I use other software, it uses 176 observations as I expected and this make the SAS results different from other softwares.

What wrong to my SAS code?

Thank You.

7 REPLIES 7

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

Although I am not very familiar with PROC PANEL, the DFE (degrees of freedom for error) seems like 167 is correct, you have 198 total observations, 197 degrees of freedom total, 22 degrees of freedom for the cross section units, so that leaves 175 degrees of freedom, you are estimating 8 model terms, and so ... you do the math ...

@Golf wrote:

Hello,

I use balance panel with 22 cross section units and 9 years.

When I apply first difference method to my model, it should be 22*(9-1) = 176 observations applied to estimate the model.

I use the following procedure:

proc panel data= ex1;id cross time;model y= d2001 d2002 d2003 d2004 d2005 d2006 d2007 dfemale /fdone ;run;I understand that SAS use 167 observations to estimate the model (Consider from Den DF in the output below). When I use other software, it uses 176 observations,

"Other software"? What other software?

--

Paige Miller

Paige Miller

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

STATA and Eviews give the same outputs and show that 176 observations were used.

I understand that the first year for each cross section unit will be missing value, this lead to 176 will be adopted. I'm really want to know what's wrong to my SAS code.

Thanks.

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

STATA and Eviews give the same outputs and show that 176 observations were used. I understand that the first year for each cross section unit will be missing value, this lead to 176 will be adopted. I'm really want to know what's wrong to my SAS code.

"... show that 176 observations were used" is not the same as 176 degrees of freedom for error, and there is no inherent conflict between using 176 observations and 167 degrees of freedom for error, which is what SAS is showing you.

again, I'm not an expert in PROC PANEL, but I don't see a problem with your SAS code. How do you know your code in the other software is correct?

--

Paige Miller

Paige Miller

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

I use balance panel with 22 cross section units and 9 years.

When I apply first difference method to my model, it should be 22*(9-1) = 176 observations applied to estimate the model.

I use the following procedure:

*proc panel data= ex1;**id cross time;**model y= d2001 d2002 d2003 d2004 d2005 d2006 d2007 dfemale /fdone ;**run;*

I understand that SAS use 167 observations to estimate the model (Consider from Den DF in the output below). When I use other software, it uses 176 observations as I expected and this make the SAS results different from other softwares.

What wrong to my SAS code?

Thank You.

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

Better post it at Forecast Forum .since it is about SAS/ETS

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

I moved this over per @Ksharp , but see that there is an identical question already in the forum, and I can't figure out how to merge.

It appears that 188 degrees of freedom are available for testing the covariates in your model (num df + den df). With 9 time points (8 df) that are absorbed in the timeseries estimation, that is 196 degrees of freedom, plus one more for panel, and I get 197 df, which is 22*9 - 1. This may be coincidence, but it appears to follow the examples in the Details part of the documentation for PROC PANEL.

SteveDenham

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

I have now merged these two topics into one thread.

**SAS Innovate 2025** is scheduled for May 6-9 in Orlando, FL. Sign up to be **first to learn** about the agenda and registration!

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.