BookmarkSubscribeRSS Feed
chemicalab
Fluorite | Level 6

Hi all,

One question,

when i run a logistic regression with a binned variable (age in 3 categories) and i use the 1st group as reference group, which beta estimate does it get?

because i get an estimate for the other two groups but not for that one or am I mistaken?

The reason i am asking cause i would like to have the according estimates so as to calculate the probability myself but i will be missing out on cases where the id falls into the 1st bin.

Regards,

9 REPLIES 9
Reeza
Super User

You don't get an estimate for that group.  Make sure to specify PARAM=REF in your model.

IE. If you have three variables, that gets recoded to 2 binary variables. When both are 0 then the third/reference level is true.

stat_sas
Ammonite | Level 13

Beta estimate for reference group will not be used for probability calculations. Because there will be no dummy variable for this one in the model.

chemicalab
Fluorite | Level 6

ok so how can an id which falls into that bin get a probability then?

Reeza
Super User

If you have no other variables it's the intercept, if you have other variables its the equation without that variable.

Lets assume you have a variable AGE with  3 categories: 1, 2, 3. Reference level is set to 1. 
X1=1 if age=2

X1=0 if age=1,3

X2=1 if age=3

X2=0 if age=1,2

Model = Intercept + B1*X1 + B2*X2

If Age=1 then

Model = Intercept

If Age=2 then

Model = Intercept + B1*X1

If Age=3 then

Model = Intercept + B2*X2

gergely_batho
SAS Employee

You calculate it from the intercept(parameter).

chemicalab
Fluorite | Level 6

meaning an id with ref 1 for age and 0 for gender what predicted probability will it get?

chemicalab
Fluorite | Level 6

aha ok, sure that makes sense, thank you very much for the reply and example it was really helpful, by the way you wouldnt happen to have any good example on creating the KS chart in excel?

Reeza
Super User

What is a KS chart?

chemicalab
Fluorite | Level 6

Kolmogorov Smirnof chart

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to choose a machine learning algorithm

Use this tutorial as a handy guide to weigh the pros and cons of these commonly used machine learning algorithms.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 9 replies
  • 1383 views
  • 0 likes
  • 4 in conversation