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
- /
- SAS Programming
- /
- SAS Procedures
- /
- Proc GLM is not outputting ALL of intercepts

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-01-2014 12:02 PM

Hi

I am using a code like the following;

proc glm data=Samp;

class ID;

MODEL Y= X /solution;

run;quit;

SAS is outputting the Coefficient on X and also the intercept on the "last" ID, however it's not outputting the intercepts on other ID levels.

Does anyone know what may have caused this?

P.S ; Samp dataset is sorted by ID prior to running PROC GLM.Also SAS log does not show me any errors or warnings on the GLM procedure.

Thanks!

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

12-01-2014 12:16 PM

Use by ID to get the desired output.

proc glm data=Samp;

**by ID;**

MODEL Y= X /solution;

run;quit;

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

12-01-2014 01:25 PM

Thanks for your recommendation.

I was actually having a problem with ABSORB statement , so I thought I'd give the procedure a try with the CLASS statement, but it turned out it has a problem too.

So I was hoping if I can figure out why CLASS is not working then I can solve the other issue; becuase they could be interrelated.

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

12-01-2014 12:17 PM

Do you mean parameter estimates? It works for me? Are you sure there's no warnings in your output.

What does the following generate:

title 'Unbalanced Two-Way Analysis of Variance';

**data** a;

input drug disease @;

do i=**1** to **6**;

input y @;

output;

end;

datalines;

1 1 42 44 36 13 19 22

1 2 33 . 26 . 33 21

1 3 31 -3 . 25 25 24

2 1 28 . 23 34 42 13

2 2 . 34 33 31 . 36

2 3 3 26 28 32 4 16

3 1 . . 1 29 . 19

3 2 . 11 9 7 1 -6

3 3 21 1 . 9 3 .

4 1 24 . 9 22 -2 15

4 2 27 12 12 -5 16 15

4 3 22 7 25 5 12 .

;

**proc** **glm**;

class drug ;

model y=drug/solution;

**run**;**quit**;

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

12-01-2014 12:29 PM

Correct Reeza, I meant parameter estimates. I ran your code. Beside the four Coefficients,

it only provided one Intercept.

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

12-01-2014 12:59 PM

That is correct. The model is :

Y= Intercept + B1*(X=1) + B2(X=2) + B3(X=3)

What are you expecting?

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

12-01-2014 01:41 PM

To my knowledge, the model should generate the individual fixed effects estimates ;iIntercepts vary person to person, however the coefficients remain the same.

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

12-01-2014 02:19 PM

Then perhaps start from the beginning, with what you're trying to do statistically. I'd post it as a new question as this subject line isn't valid anymore.

Please include as much description as you can, it helps to answer your question correctly the first time.

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

12-01-2014 03:36 PM

Thanks Reeze, I agree with your comment.