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

Re: st: Permute


From   Raphael Fraser <[email protected]>
To   [email protected]
Subject   Re: st: Permute
Date   Thu, 1 Dec 2005 07:30:11 -0500

So how do I test if there is a difference between groups?

On 12/1/05, Joseph Coveney <[email protected]> wrote:
> 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/
>

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