turn on suggestions

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

Showing results for

Find a Community

- Home
- /
- Analytics
- /
- Stat Procs
- /
- proc glm: class vs. absorb

Topic Options

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

12-13-2015 05:14 PM

Hi all,

I've recently begun using proc glm to run fixed effects regressions. Say if I want to run a regression of variable A over independent variables B and C, while controlling for year fixed effects, google tells me there are two ways to do this:

proc glm;

class year;

model A=B C / solution noint; run;

quit;

or

proc glm;

absorb year;

model A=B C / solution noint; run;

quit;

Google also tells me that the only difference between the above two is with absorb, estimates of year will not be shown, while with class, they will be shown.

So I tried both, and I don't see individual year fixed effects estimates in either. Also, perhaps more importantly to me, the estimates in B and C are vastly different with the above two procedures. Please help! Which one should I use? And what is the reason for difference estimates on B and C? Thanks a lot!

Accepted Solutions

Solution

12-13-2015
09:28 PM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

12-13-2015 07:23 PM - edited 12-13-2015 07:31 PM

The **class** statement defines which variables are to be treated as categorical variables in the **model** statement.

And you did not add the variable __year__ in the model statment, after the Class statment.

So try:

proc glm;

class year;

model A=B C year/ solution noint; run;

quit;

Then you will get the individual year fixed effects estimates. And you should get no difference estimates on B and C for the two procedures

All Replies

Solution

12-13-2015
09:28 PM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

12-13-2015 07:23 PM - edited 12-13-2015 07:31 PM

The **class** statement defines which variables are to be treated as categorical variables in the **model** statement.

And you did not add the variable __year__ in the model statment, after the Class statment.

So try:

proc glm;

class year;

model A=B C year/ solution noint; run;

quit;

Then you will get the individual year fixed effects estimates. And you should get no difference estimates on B and C for the two procedures

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

12-13-2015 09:28 PM

Hi Mohamed,

Thanks a lot for the answer! I added year in and saw the individual estimates. Also when I included year as an independent variable, the estimates are not different with class or absorb. Thanks again!

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

12-13-2015 07:32 PM

Also in general i found this paper to be helpful "Fixed Effects Regression Methods In SAS®"