| Date: | Thu, 30 Sep 2010 13:43:24 -0500 |
| Reply-To: | "KRISHNAMURTHY, SUBASH [AG/1000]"
<subash.krishnamurthy@MONSANTO.COM> |
| Sender: | "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> |
| From: | "KRISHNAMURTHY, SUBASH [AG/1000]"
<subash.krishnamurthy@MONSANTO.COM> |
| Subject: | Re: Sample Size and Power for Multinomial Distribution? |
|
| In-Reply-To: | A<OFC2411219.C5E619CF-ON862577AE.00651B89-862577AE.00667002@unmc.edu> |
| Content-Type: | text/plain; charset="utf-8" |
Robin, Thanks so much for your response. I will try your suggestion. The sample size and power is in the experimental design type situation, mainly a Randomized Complete Block Design or a Group block design.
This definitely helps.
Thanks, appreciate your help.
-Subash
-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Robin R High
Sent: Thursday, September 30, 2010 1:39 PM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Re: Sample Size and Power for Multinomial Distribution?
You can approximate power by entering an exmplary dataset to GLIMMIX, with
the counts and follow the approach to power calculation examples from
Chapter 12 of SAS for Mixed modes, 2nd ed.
one can add to the difficulty by thinking in terms of odds ratios based on
glogits, or modify to clogits, but that's beyond what is presented below
* 3 response levels with input of proportions only
tested across 2 groups;
%LET rw_t=125; * equal group sample size (row total);
%LET p1a=.25; %LET p1b=.2; * p1c by subtraction, i.e., all p > 0 and
sum(p1 p2 p3)=1;
%LET p2a=.40; %LET p2b=.25; * p2c by subtraction;
* compute row probabilities;
DATA probs;
grp =1 ; p1=&p1a.; p2=&p1b. ; p3=1-(p1+p2); output;
grp =2 ; p1=&p2a.; p2=&p2b. ; p3=1-(p1+p2); output;
run;
proc print; run;
* exemplary column counts for given group sample size (round to integers);
DATA counts; SET probs; keep r grp nn;
r=1; nn=ROUND(p1*&rw_t.) ; OUTPUT;
r=2; nn=ROUND(p2*&rw_t.) ; OUTPUT;
r=3; nn=ROUND(p3*&rw_t.) ; OUTPUT;
run;
ods output table=tbl(where=(_type_='10') keep=grp n _type_);
PROC TABULATE data=counts NOSEPS;
class grp r;
FREQ nn;
table grp, (r all)*n=' '*f=4.0 r*rowpctN='Row %'*f=7.1 / rts=9;
run;
-----------------------------------------------------
| | | | r |
| | | |-----------------------|
| | r | | 1 | 2 | 3 |
| |--------------| |-------+-------+-------|
| | 1 | 2 | 3 |All | Row % | Row % | Row % |
|-------+----+----+----+----+-------+-------+-------|
|grp | | | | | | | |
|1 | 31| 25| 69| 125| 24.8| 20.0| 55.2|
|2 | 50| 31| 44| 125| 40.0| 24.8| 35.2|
-----------------------------------------------------
* because of rounding, actual row percents slightly different than inputs
;
proc transpose data=tbl out=t_c(drop=_name_) prefix=_;
var n; id grp;
proc print data=t_c; run;
ODS output tests3=tst;
ods listing close;
PROC GLIMMIX DATA=counts;
CLASS grp ;
MODEL r = grp / DIST=multinomial link=glogit;
FREQ nn;
run;
ods listing;
proc print data=tst; run;
DATA pwr; SET tst; set t_c; DROP probF Fcrit fvalue Noncen numdf dendf _1
_2 ;
NonCen = NumDF*Fvalue; alpha = .05;
Fcrit = FINV(1-alpha, NumDF, DenDF, 0);
power = 1- PROBF(Fcrit, NumDF, DenDF, Noncen);
totaln=_1 + _2;
RUN;
proc print data=pwr NOobs; run;
* gives an approximation ;
Effect alpha power totaln
grp 0.05 0.83299 250
Robin High
UNMC
From:
"KRISHNAMURTHY, SUBASH [AG/1000]" <subash.krishnamurthy@MONSANTO.COM>
To:
SAS-L@LISTSERV.UGA.EDU
Date:
09/30/2010 09:33 AM
Subject:
Sample Size and Power for Multinomial Distribution?
Sent by:
"SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
Hi,
Is there a good example to estimate Power and Sample Size based on
Multinomial distribution?
Thanks.
-Subash
This e-mail message may contain privileged and/or confidential
information, and is intended to be received only by persons entitled to
receive such information. If you have received this e-mail in error,
please notify the sender immediately. Please delete it and all attachments
from any servers, hard drives or any other media. Other use of this e-mail
by you is strictly prohibited.
All e-mails and attachments sent and received are subject to monitoring,
reading and archival by Monsanto, including its subsidiaries. The
recipient of this e-mail is solely responsible for checking for the
presence of "Viruses" or other "Malware". Monsanto, along with its
subsidiaries, accepts no liability for any damage caused by any such code
transmitted by or accompanying this e-mail or any attachment.
The information contained in this email may be subject to the export
control laws and regulations of the United States, potentially including
but not limited to the Export Administration Regulations ("EAR") and
sanctions regulations issued by the U.S. Department of Treasury, Office of
Foreign Asset Controls (“OFAC”). As a recipient of this information you
are obligated to comply with all applicable U.S. export laws and
regulations.
|