Dear Hugh,
are you looking for something like this (please, see example below):
............................ begin example........................
. input Mod
Mod
1. 1.113924
2. 1.122969
3. 1.057594
4. 1.057594
5. 1.148739
6. .9890202
7. .7163003
8. .7857646
9. .7346777
10. .8520272
11. .8732744
12. .7147149
13. end
. g Index="Mod 1" in 1/6
(6 missing values generated)
. replace Index="Mod 2" in 7/12
(6 real changes made)
. ttest Mod, by(Index) unequal
. permute Mod (r(mu_1)-r(mu_2)), reps(100) strata(Index) : ttest Mod,
by(Index) unequal
(running ttest on estimation sample)
............................ end example........................
HTH and Kind Regards,
Carlo
-----Messaggio originale-----
Da: [email protected]
[mailto:[email protected]] Per conto di Hugh Robinson
Inviato: giovedì 30 aprile 2009 4.09
A: [email protected]
Oggetto: st: permute test statistic
Can anyone tell me how to code permute properly to test if one modeled
growth rate (mod1) is greater than another (mod2).
Variations on the code below give me a perfect p-value each time. It
seems that I have to substitute something else for "mean" to come up
with the proper test statistic?
permute Mod1 mean=r(mean), reps(200) right nodots nodrop nowarn:
summarize Mod2
An example of the data is below.
Row Mod1 Mod2
1 1.113924 .7163003
2 1.122969 .7857646
3 1.057594 .7346777
4 1.153763 .8520272
5 1.148739 .8732744
6 .9890202 .7147149
.
.
.
1000 1.193932 .9315556
Thanks,
HR
Hugh S Robinson Ph.D.
Postdoctoral Researcher
Wildlife Biology Program
College of Forestry and Conservation
University of Montana
Missoula, MT 59802
(406) 243-2931
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/