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

I would like to obtain the confidence interval from the likelihood ratio test (G^2) for a binomial function with n=10000 and x=50 (the number of yes responses). 

 

 

options ls=72;
data conditionprevalence;
input condition count; 
cards;
1 3
2 997
;
run;
proc freq;
weight count;
tables condition/cmh chisq;
run;

 

I know this isn't right since I am not getting a confidence interval and this doesn't seem to be the LRT. Thank you for any insight.

 

@jimbarbour 

1 ACCEPTED SOLUTION

Accepted Solutions
Watts
SAS Employee

See the BINOMIAL(CL=LIKELIHOODRATIO) option in the TABLES statement (and details in the documentation section Likelihood Ratio Confidence Limits under Binomial Proportion).

View solution in original post

2 REPLIES 2
keldel
Fluorite | Level 6

Sorry the sample code I provided had the wrong values. I had cards

1 50

2 9950 

Watts
SAS Employee

See the BINOMIAL(CL=LIKELIHOODRATIO) option in the TABLES statement (and details in the documentation section Likelihood Ratio Confidence Limits under Binomial Proportion).

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!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 709 views
  • 3 likes
  • 2 in conversation