Hello, I am trying to run proc GLM considering disease severity on 102 samples and 3 environments. It is ok when I am considering only the variables by itself, but SAS does not give me p-values when I try the interaction between them. Why is that? Is it because my model is saturated? How can I have that interaction analysed?
proc glm data=sev;
class line env;
model sev = line env line*env;
run;
Thank you.
You only have 305 valid observations but ENV has 102 unique levels. Thus the model with the interaction term contains more parameters than there are observations.
Some options are
1. Get more data
2. Do not model interactions
3. Consider whether you can model ENV as a continuous variable
Please show the output.
Also, please use PROC FREQ to provide the answers for
1. How many levels for LINE?
2. How many joint levels for ENV*LINE?
Since you didn't specify the SOLUTION option, I assume you are asking about p-values in the Type 1 and Type III model ANOVA tables.
As the following example shows, PROC GLM does give p-values for those tables when the data are nondegenerate:
proc glm data=sashelp.bweight plots=none;
class boy MomEdLevel;
model weight = boy MomEdLevel boy*MomEdLevel;
run;
Hello,
Thank you for your answer.
Proc Freq gaves 3 levels for line and total of 306 env*line. I am looking for Type III model anova tables.
SAS Output
The SAS System |
102 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 |
3 | 1 2 3 |
306 |
305 |
The SAS System |
304 | 67164.16118 | 220.93474 | . | . |
0 | 0.00000 | . | ||
304 | 67164.16118 |
1.000000 | . | . | 34.64164 |
101 | 30175.75618 | 298.76986 | . | . |
2 | 5588.61953 | 2794.30976 | . | . |
201 | 31399.78547 | 156.21784 | . | . |
101 | 30089.07898 | 297.91167 | . | . |
2 | 5588.61953 | 2794.30976 | . | . |
201 | 31399.78547 | 156.21784 | . | .
|
You only have 305 valid observations but ENV has 102 unique levels. Thus the model with the interaction term contains more parameters than there are observations.
Some options are
1. Get more data
2. Do not model interactions
3. Consider whether you can model ENV as a continuous variable
Thank you very much.
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9.
Early bird rate extended! Save $200 when you sign up by March 31.
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.