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-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and save with the early bird rate—just $795!

Register now

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
  • 1617 views
  • 3 likes
  • 2 in conversation