BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
sachin01663
Obsidian | Level 7

Hi,

 

I am new to logistic reg so I think I am missing some basics on how to write equation from Maximum Likelihood Estimates

I am in the final steps of scoring a dataset after building a Logistic Regression model. I have used Reference Cell coding for categorical variable. The confusion I have is:

 

If I use the Score statement in Proc Logistic, I get the output table with scored probabilities column called P_1. However, If I try to write equation from Maximum Likelihood Estimates, I get different probability values. 

 

Why is that so? Is it because, in the equation, I am not mentioning the reference level for any categorical variable. Can someone please help me write equation for these results (just an example):

 

Maximum liklihood Coefficients:

 

Intercept: -0.2367

Var 1:     Age_LE_18: This is reference level

               Age_18_to_40: 0.3245

               Age_Above_40: 0.4125

Var2       Good_credit_History: Reference Level

               Bad_Credit_History:  - 0.8795

 

The equation I am writing is:   -0.2367  +  0.3245*(Var1='Age_LE_18')  + 0.4125*(Var1='Age_Above_40')  - 0.8795*                             (VAR2='Bad_Credit_History')

 

If you see, I am not mentioning Reference levels in my equation. If this is right, then why the probabilities do not match with Score Statement?

 

Thanks

Sachin 

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User

Usually this is because you're doing something wrong. Post your full SAS code, output and where you think it's wrong. Proc Logistic score output will match the hand calculated output. If you even search on here, you'll find examples where I've coded this out.

View solution in original post

2 REPLIES 2
Reeza
Super User

Usually this is because you're doing something wrong. Post your full SAS code, output and where you think it's wrong. Proc Logistic score output will match the hand calculated output. If you even search on here, you'll find examples where I've coded this out.

sachin01663
Obsidian | Level 7

You right Reeza. I hadwrong value for one of the coefficients. Man Sad 

 

Thanks for the reply. 

 

 

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 2 replies
  • 1418 views
  • 1 like
  • 2 in conversation