Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: calculation of sample size


From   "Yulia Marchenko" <[email protected]>
To   <[email protected]>
Subject   st: RE: calculation of sample size
Date   Fri, 8 Oct 2004 09:11:51 -0500

Aijing Shang wrote:

>Dear all,
>Recently when I calculate power using sampsi, a strange thing happened. I
>want to compare two propotions, one is 0.001, another is 0.002. As what I
>know, the bigger the sample size is, the more power it is. However, the
>results sampsi gave are reversed. See the results following.

>. sampsi 0.001 0.002, n1(10) n2(10) alpha(0.05)
>Estimated power:
         power =   0.9999
>. sampsi 0.001 0.002, n1(100) n2(100) alpha(0.05)
>Estimated power:
         power =   0.3762
>. sampsi 0.001 0.002, n1(1000) n2(1000) alpha(0.05)
>Estimated power:
         power =   0.0250
>Can anybody tell me what is wrong? Thank you very much.

Stata -sampsi- command use approximate large sample test on proportions for
power and sample size calculations. The distribution of the test statistic
is approximated  by Normal distribution for large n. One has to check if all
of the following equalities hold before using large sample test (in order
for Central limit theorem to work):

 n1p1>=10, n1(1-p1)>=10  n2p2>=10, n2(1-p2)>=10

In your case the sample size is not big enough. For example, 0.001*100=0.1
and 0.002*100=0.2. If you start even with n1=n2=5000, 7000, 10000 you'll see
that power is increasing. Here is an example:

***********************************************************************
. sampsi 0.001 0.002, n1(5000) n2(5000) alpha(0.05)

Estimated power for two-sample comparison of proportions

Test Ho: p1 = p2, where p1 is the proportion in population 1
                    and p2 is the proportion in population 2
Assumptions:

         alpha =   0.0500  (two-sided)
            p1 =   0.0010
            p2 =   0.0020
sample size n1 =     5000
            n2 =     5000
         n2/n1 =     1.00

Estimated power:

         power =   0.1771


. sampsi 0.001 0.002, n1(7000) n2(7000) alpha(0.05)

Estimated power for two-sample comparison of proportions

Test Ho: p1 = p2, where p1 is the proportion in population 1
                    and p2 is the proportion in population 2
Assumptions:

         alpha =   0.0500  (two-sided)
            p1 =   0.0010
            p2 =   0.0020
sample size n1 =     7000
            n2 =     7000
         n2/n1 =     1.00

Estimated power:

         power =   0.2579

. sampsi 0.001 0.002, n1(10000) n2(10000) alpha(0.05)

Estimated power for two-sample comparison of proportions

Test Ho: p1 = p2, where p1 is the proportion in population 1
                    and p2 is the proportion in population 2
Assumptions:

         alpha =   0.0500  (two-sided)
            p1 =   0.0010
            p2 =   0.0020
sample size n1 =    10000
            n2 =    10000
         n2/n1 =     1.00

Estimated power:

         power =   0.3762

--Yulia
[email protected]



*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index