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!
Use by ID to get the desired output.
proc glm data=Samp;
by ID;
MODEL Y= X /solution;
run;quit;
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.
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;
Correct Reeza, I meant parameter estimates. I ran your code. Beside the four Coefficients,
it only provided one Intercept.
That is correct. The model is :
Y= Intercept + B1*(X=1) + B2(X=2) + B3(X=3)
What are you expecting?
To my knowledge, the model should generate the individual fixed effects estimates ;iIntercepts vary person to person, however the coefficients remain the same.
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.
Thanks Reeze, I agree with your comment.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.