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/