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-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!

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