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

All-

 

I ran a simple logistic regression in SAS to obtain the CIs on the regression coefficients. The CIs do not appear to be correct. Can anyone let me know what they think is going on. If you calculate the CIs by hand, these do not match what is provided in the SAS output.

 

Analysis of Maximum Likelihood Estimates

Parameter

DF

Estimate

Standard
Error

Wald
Chi-Square

Pr > ChiSq

Intercept

1

7.6653

22.9839

0.1112

0.7388

x

1

-1.1236

3.3681

0.1113

0.7387

 

 

 

Parameter Estimates and Wald Confidence
Intervals

Parameter

Estimate

95% Confidence Limits

Intercept

7.6653

-37.3823

52.7128

x

-1.1236

-7.7250

5.4779

 

 

By hand, I get the 95% (2-sided) CI for the intercept: (-52.71234 ,  37.38174 )

 

 

SAS Code: 



proc import datafile="C:\Users\BodnarJ\Desktop\functionalRequirement4_9_X\dataSim_FR_4_9_X.csv" dbms=csv out=work.anaDS replace;
delimiter="|";
getnames=yes;
guessingrows=7000;
run;

 

proc logistic data = anaDS ;
model yBinom1 = x / cl;
output out=propensity_scores pred=prob_flag;
run;

 
1 ACCEPTED SOLUTION

Accepted Solutions
PGStats
Opal | Level 21

You must be modelling for the yBinom1=0 events. Try the syntax

 

model yBinom1(event='1') = x / cl;
PG

View solution in original post

3 REPLIES 3
PaigeMiller
Diamond | Level 26

Typically, the actual estimated coefficient for a logistic regression is approximately half-way between the upper confidence interval and the lower confidence interval.

 

Therefore, I conclude that your hand calculations are wrong.

--
Paige Miller
PGStats
Opal | Level 21

You must be modelling for the yBinom1=0 events. Try the syntax

 

model yBinom1(event='1') = x / cl;
PG
ajkalale
Obsidian | Level 7

The above solution is absolutely correct! 

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

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
  • 3 replies
  • 1409 views
  • 2 likes
  • 4 in conversation