LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (April 2011, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Fri, 8 Apr 2011 15:20:50 -0400
Reply-To:   Ya Huang <ya.huang@AMYLIN.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Ya Huang <ya.huang@AMYLIN.COM>
Subject:   Re: Proc freq for binomial CI
Comments:   To: "David J. Moriarty" <djmoriarty@CSUPOMONA.EDU>

Thanks Dave!

Both (level='M') and (level=2) worked. But if I need both of them I have to have two table statements or run proc freq twice. If I try to capture the dataset with ods output statement, I'll get both in the dataset, but no indication which is come from which. I guess I can assume the first second comes from first table statement and second comes from second. I wish this could be easier :-)

For statistician, can I simply minus one CI from 1 to get the other?

Ya

ods output BinomialProp=xx;

proc freq data=sashelp.class; table sex / binomial (level=2); table sex / binomial (level=1); run;;

Table Name1 Label1 Value1 nValue1

Table Sex _BIN_ Proportion 0.5263 0.526316 Table Sex E_BIN ASE 0.1145 0.114549 Table Sex L_BIN 95% Lower Conf Limit 0.3018 0.301804 Table Sex U_BIN 95% Upper Conf Limit 0.7508 0.750827 Table Sex . Table Sex Exact Conf Limits . Table Sex XL_BIN 95% Lower Conf Limit 0.2886 0.288643 Table Sex XU_BIN 95% Upper Conf Limit 0.7555 0.755525 Table Sex _BIN_ Proportion 0.4737 0.473684 Table Sex E_BIN ASE 0.1145 0.114549 Table Sex L_BIN 95% Lower Conf Limit 0.2492 0.249173 Table Sex U_BIN 95% Upper Conf Limit 0.6982 0.698196 Table Sex . Table Sex Exact Conf Limits . Table Sex XL_BIN 95% Lower Conf Limit 0.2445 0.244475 Table Sex XU_BIN 95% Upper Conf Limit 0.7114 0.711357

On Fri, 8 Apr 2011 12:01:58 -0700, David J Moriarty <djmoriarty@CSUPOMONA.EDU> wrote:

>At 11:47 AM Friday 4/8/2011, Ya Huang wrote: >>The following code only shows the proportion and CI of female. Is there a >>way to get male too? >> >>proc freq data=sashelp.class; >>table sex / binomial; >>run; > >You might try something like: >proc freq data=sashelp.class; >table sex / binomial (level='M'); >run;; > >or >table sex / binomial (level=2); > >HTH > >Dave Moriarty > >------------------------------------------- >David J. Moriarty, Ph.D. >Professor and Graduate Coordinator >Biological Sciences Department >California State Polytechnic University >Pomona, CA 91768-2557 USA >http://www.csupomona.edu/~djmoriarty/


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