Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Re: -permute- with -ttest- (was no subject)


From   Joseph Coveney <[email protected]>
To   Statalist <[email protected]>
Subject   st: Re: -permute- with -ttest- (was no subject)
Date   Tue, 29 Aug 2006 11:18:42 +0900

Sarah Elaine Cabbage wrote:

I'm trying to do a permutation test in Stata and just can't seem to
get the syntax right.  Here's my command:

permute norm_qty  permt=r(t), strata(group) : ttest norm_qty,
by(group)

[snip]

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

According to the help file, "strata(varlist) specifies that the permutations
be performed within each stratum defined by the values of varlist."

Here, you will want to permute across strata, and not within them, so delete
the "strata(group)" from your syntax.

permute norm_qty permt=r(t): ttest norm_qty, by(group)

You'll probably want more than the default number of permutations, too.

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