Hi,
I am trying to run a regression analysis in SAS using proc reg with two sets of variables (second set includes the first set). But I don't want to use selection=stepwise because I don't want any variables discarded based on their contribution. I use SAS 9.4
Basically want to first run
model intention = var_a var_b var_c
and then run another model
model intention = var_a var_b var_c var_d var_e
and see the change in R2, F, significance between the two models.
I ran it in SPSS (output attached) and this is what I want to get in SAS too. Thank you.
Since PROC REG is interactive, you can include as many model statements as you want. The only thing you will not get in the output is a likelihood ratio test, but that can be calculated from the Type I sums of squares. See the following:
In that example there are only two variables entered into one of the two model statements, and one into the other, but you should be able to easily expand this example to your code.
Steve Denham
Thank you, that is helpful. But I was also looking to get a table showing the change in R-squared, F-statistic and p-value between the two models. Do you know where I could find a reference for that option?
ODS output statements can put all of the fit statistics into a dataset, and from there you can do about anything.
Steve Denham
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
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.