BookmarkSubscribeRSS Feed
joachimg
Obsidian | Level 7

I recognize that this is kind of a dumb question but I can't seem to find a concrete answer. I am running a regression using proc reg. My outcome variable is any smoking and is coded as 0 (no smoking) and 1 (any smoking). How do I know which level is the reference value? I have been assuming that it's 1, so my interpretation (let's say my exposure is income) would be with each additional unit of income, we see a 0.5 percentage point increase in smoking. But I can't see anywhere in the output where it confirms my interpretation. It's also my understanding that I can't change the reference group in proc reg - is this correct? Thanks. 

4 REPLIES 4
Rick_SAS
SAS Super FREQ

PROC REG does not support a CLASS statement, so there is no default reference level.  When using PROC REG, you have to create the dummy variables yourself.

 

Let's use the example of creating a dummy variable for a two-level variable such as GENDER. Your reference level is always the lowest level, which is 0 if you construct a 0/1 binary variable.  For example, if you define
sex = (Gender='M');

then the '0' level corresponds to females.  However, if you define 

sex = (Gender='F');

then the '0' level corresponds to males. 

 

That is why I recommend including the reference level in the variable name, such as 

isMale = (Gender='M');

 

 

 

joachimg
Obsidian | Level 7

Okay, understood. So, just to confirm - my dependent (outcome variable) is already coded as 0/1, so in proc reg, SAS automatically uses 0 as the reference group?

Rick_SAS
SAS Super FREQ

No. PROC REG assumes that the dependent variable (the response) is continuous. If your dependent variable is binary, you should probably switch to using PROC LOGISTIC, which (by default) models the probability that a response is 0.

Ksharp
Super User

As Rick pointed out, since your response variable Y is binary variable, you should use PROC LOGISTIC to build a logistic model instead of using PROC REG to build a OLS model.

And using EVENT= option to spcify the reference level to Y.

 

 

proc logistic data=have;
model smoking(event='1')=age weight height;
run;

 

 

 

NOTE: if you have a format attached with Y variable,you should use formatted value:

proc logistic data=have;
model smoking(event='smoking')=age weight height;
run;

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 218 views
  • 5 likes
  • 3 in conversation