BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
AlainX
Fluorite | Level 6

Dear All,

 

Consider a CLASS variable, GENDER, with values F and M. I understand that in SAS, by default, these values are arranged in ascending alphanumeric order which results in M being the last level, and therefore the reference level. Suppose alternatively that we want to set F as the reference level.

 

Below, I list the coefficients for each case.

 

Screenshot 2022-07-19 at 12.08.44 PM.pngScreenshot 2022-07-19 at 12.08.56 PM.png

 

I understand that the 2 cases are "equivalent".

 

However, since in each case the estimated equations are not the same:

 

y=20.1903-1.6454Gender-0.2917Height

y=18.5448+1.6454Gender-0.2917Height

 

they provide different probabilities, if they will be manually applied for a new observation.

 

I apologise in advance for the naive question.

 

A.

1 ACCEPTED SOLUTION

Accepted Solutions
PaigeMiller
Diamond | Level 26

This is not PROC REG. It is (perhaps) the Regression function in SAS Studio.

 

The models are identical. But you have written them wrong.

 

y=20.1903-1.6454*(Gender='F')-0.2917*Height

y=18.5448+1.6454*(Gender='M')-0.2917*Height

 

For females, the first model equates to y = 20.1903-1.6454-0.2917*Height = 18.5449 - 0.2917*Height

For females, the second model equates to y = 18.5448 - 0.2917*Height

 

These are identical (except for roundoff error).

 

 

--
Paige Miller

View solution in original post

4 REPLIES 4
PaigeMiller
Diamond | Level 26

This cannot be the output from PROC REG. What PROC are you actually using? Show us the code used.

--
Paige Miller
AlainX
Fluorite | Level 6
Hi. I am using SAS Studio On Demand. I found the example here: https://support.sas.com/kb/37/108.html

The reason why I am asking this question, is the following one:

https://communities.sas.com/t5/Statistical-Procedures/Interpretation-of-Logistic-Regression-Coeffici...

Thanks in advance.
PaigeMiller
Diamond | Level 26

This is not PROC REG. It is (perhaps) the Regression function in SAS Studio.

 

The models are identical. But you have written them wrong.

 

y=20.1903-1.6454*(Gender='F')-0.2917*Height

y=18.5448+1.6454*(Gender='M')-0.2917*Height

 

For females, the first model equates to y = 20.1903-1.6454-0.2917*Height = 18.5449 - 0.2917*Height

For females, the second model equates to y = 18.5448 - 0.2917*Height

 

These are identical (except for roundoff error).

 

 

--
Paige Miller
AlainX
Fluorite | Level 6
Dear PaigeMiller, 100% clear now. Millions of thanks.

SAS Innovate 2025: Call for Content

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!

Submit your idea!

What is ANOVA?

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.

Discussion stats
  • 4 replies
  • 851 views
  • 2 likes
  • 2 in conversation