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

Re: st: Permute


From   Joseph Coveney <[email protected]>
To   Statalist <[email protected]>
Subject   Re: st: Permute
Date   Thu, 01 Dec 2005 15:41:43 +0900

Raphael Fraser wrote:

Can anyone explain why the distribution of the test statistic is 384
for all 1000 permutations?

      ct   grp
    121     1
    150     1
    113     1
     90     0
     80     0
     85     0

permute ct sum=r(sum), saving(permsum, replace) seed(1440) reps(1000):
sum ct if grp
use permsum, clear

--------------------------------------------------------------------------------

Stata is doing what you instructed it to do:  disregard group 0, permute the
values within group 1, and repeatedly calculate the sum of these same three
group 1 values, which will be 384 however permuted.

Joseph Coveney

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