Date: Tue, 12 Apr 2011 13:12:00 -0400 "Viel, Kevin" "SAS(r) Discussion" "Viel, Kevin" Re: Proc freq for binomial CI <201104081847.p38AkdTQ018021@willow.cc.uga.edu> text/plain; charset="windows-1255"

> -----Original Message----- > From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Ya > Huang > Sent: Friday, April 08, 2011 2:48 PM > To: SAS-L@LISTSERV.UGA.EDU > Subject: Proc freq for binomial CI > > Hi there, > > The following code only shows the proportion and CI of female. Is there a > way to get male too? > > Thanks > > Ya > > proc freq data=sashelp.class; > table sex / binomial; > run; > > The FREQ Procedure > > Cumulative Cumulative > Sex Frequency Percent Frequency Percent > ------------------------------------------------------------- > F 9 47.37 9 47.37 > M 10 52.63 19 100.00 > > > Binomial Proportion for Sex = F > -------------------------------- > Proportion 0.4737 > ASE 0.1145 > 95% Lower Conf Limit 0.2492 > 95% Upper Conf Limit 0.6982 > > Exact Conf Limits > 95% Lower Conf Limit 0.2445 > 95% Upper Conf Limit 0.7114 > > Test of H0: Proportion = 0.5 > > ASE under H0 0.1147 > Z -0.2294 > One-sided Pr < Z 0.4093 > Two-sided Pr > |Z| 0.8185 > > Sample Size = 19

As David M. pointed out, you can use the level statement:

Binomial Proportion for Sex = M ャャャャャャャャャャャャャャャャ Proportion 0.5263 ASE 0.1145 95% Lower Conf Limit 0.3018 95% Upper Conf Limit 0.7508

Exact Conf Limits 95% Lower Conf Limit 0.2886 95% Upper Conf Limit 0.7555

Test of H0: Proportion = 0.5

ASE under H0 0.1147 Z 0.2294 One-sided Pr > Z 0.4093 Two-sided Pr > |Z| 0.8185

Note that 95% Upper Conf Limit (M) 0.7508 = 1 - 0.2492 95% Lower Conf Limit (F). I'll have to look at the documentation and its calculations to see if that always holds. Of course, that is not helpful for data with more levels.

-Kevin

Kevin Viel, PhD Senior Research Statistician Patient Safety & Quality International College of Robotic Surgery Saint Joseph's Translational Research Institute

Saint Joseph's Hospital 5671 Peachtree Dunwoody Road, NE, Suite 330 Atlanta, GA 30342

(678) 843-6076: Direct Phone (678) 843-6153: Facsimile (404) 558-1364: Mobile kviel@sjha.org Confidentiality Notice: This e-mail, including any attachments is the property of Catholic Health East and is intended for the sole use of the intended recipient(s). It may contain information that is privileged and confidential. Any unauthorized review, use, disclosure, or distribution is prohibited. If you are not the intended recipient, please delete this message, and reply to the sender regarding the error in a separate email.

Back to: Top of message | Previous page | Main SAS-L page