BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Sil_R
Calcite | Level 5

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.

1 ACCEPTED SOLUTION

Accepted Solutions
Rick_SAS
SAS Super FREQ

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

 

View solution in original post

4 REPLIES 4
Rick_SAS
SAS Super FREQ

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;
Sil_R
Calcite | Level 5

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

The GLM Procedure

 

Class Level Information Class Levels Values line env
1021 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
31 2 3

Number of Observations Read Number of Observations Used
306
305

 


The SAS System

The GLM Procedure
 
Dependent Variable: sev

 

Source DF Sum of Squares Mean Square F Value Pr > F Model Error Corrected Total
30467164.16118220.93474..
00.00000.  
30467164.16118   

R-Square Coeff Var Root MSE sev Mean
1.000000..34.64164

Source DF Type I SS Mean Square F Value Pr > F line env line*env
10130175.75618298.76986..
25588.619532794.30976..
20131399.78547156.21784..

Source DF Type III SS Mean Square F Value Pr > F line env line*env
10130089.07898297.91167..
25588.619532794.30976..
20131399.78547156.21784.

.

 

 



Rick_SAS
SAS Super FREQ

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

 

Sil_R
Calcite | Level 5

Thank you very much.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

What is Bayesian Analysis?

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 3265 views
  • 0 likes
  • 2 in conversation