Greetings,
I am conducting an analysis using multiple linear regression in which variables are entered into the model in five blocks, and I would like to determine if the change in R^2 values between the blocks is significant (similar to a likelihood-ratio test for logistic regression). The model are as follows:
Model 1: pcr = g1 g2 race
Model 2: pcr = g1 g2 race x1 x2
Model 3: pcr = g1 g2 race x1 x2 x3 x4 x5
Model 4: pcr = g1 g2 race x1 x2 x3 x4 x5 x6
Model 5: pcr = g1 g2 race x1 x2 x3 x4 x5 x6 x7
g1, g2, and g3 are categorical variables. x1-7 are continuous variables. Here's the code I'm using:
proc glm data=scales; class g2 g1 race; model pcr=race g1 g2 /solution ; title 'Block 1';run;
proc glm data=scales; class g2 g1 race; model pcr=x1 x2 race g1 g2 /solution ; title 'Block 2'; run;
proc glm data=scales; class g2 g1 race; model pcr=x1 x2 x3 x4 x5 race g1 g2 /solution ; title 'Block 3'; run;
proc glm data=scales; class g2 g1 race; model pcr=x1 x2 x3 x4 x5 x6 race g1 g2 /solution ; title 'Block 4'; run;
proc glm data=scales; class g2 g1 race; model pcr=x1 x2 x3 x4 x5 x6 x7 race g1 g2 /solution; title 'Block 5'; run;
I have tried to use proc glmselect, too, but the issue that I am having is that I do not want the program to select and report the best model only, and I only want the variables to enter the model in the order specified above. I'm using SAS Enterprise Guide v4.3.
Any help in terms of how to test the significance of the change in R^2 values (or confirmation that it is not possible to do so in SAS) would be much appreciated.
Thanks!
abarnett313
You want to use the "Extra Sum of Squares" method, which is explained here:
http://www.jerrydallal.com/LHSP/extra.htm
This is relatively easy to do in SAS.
You want to use the "Extra Sum of Squares" method, which is explained here:
http://www.jerrydallal.com/LHSP/extra.htm
This is relatively easy to do in SAS.
Thank you -- this is exactly what I was seeking! Is there a way to have SAS calculate the extra sum of squares, or does it need to be done by hand?
You have your PROC GLM or PROC REG or whatever output the sum of squares to SAS data sets, using ODS OUTPUT.
Then it should be relatively simple to combine the SS from each model into a single data step, and do the math in the data step.
Ah, that makes sense. Thank you!
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.