Programming the statistical procedures from SAS

proc reg - assessing models with blocks of variables

Reply
Occasional Contributor
Posts: 8

proc reg - assessing models with blocks of variables

[ Edited ]

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.

 

 

 

 

 

 

Respected Advisor
Posts: 2,655

Re: proc reg - assessing models with blocks of variables

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:

 

http://support.sas.com/documentation/cdl/en/statug/68162/HTML/default/viewer.htm#statug_reg_examples...

 

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

 

 

Occasional Contributor
Posts: 8

Re: proc reg - assessing models with blocks of variables

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?

 

 

Respected Advisor
Posts: 2,655

Re: proc reg - assessing models with blocks of variables

ODS output statements can put all of the fit statistics into a dataset, and from there you can do about anything.

 

Steve Denham

Ask a Question
Discussion stats
  • 3 replies
  • 325 views
  • 0 likes
  • 2 in conversation