![]() |
From | Christopher Intemann <intemann@gmail.com> |
To | statalist@hsphsun2.harvard.edu |
Subject | Re: st: permutations |
Date | Fri, 14 Mar 2008 11:44:48 +0100 |
Hi Dave Am 13.03.2008 um 15:24 schrieb David Airey:
.I was using a pre-stata9 syntax of the permute command.
Do you have access to the manual help or online help? The syntax is:
permute permvar exp_list [, options] : command
You specified permvar but not exp_list, so I'm not sure what permute is defaulting to, maybe just the overall model statistic? You can write a small program to return the coefficients for the genetic dummy variables, and an overall test of those, that gets called by permute. The ANOVA example in the printed help shows how to do this.
T is your statistic
T(obs) is your observed statistic
c is the number of times the statistics is greater than T(obs)
n is the default number of permutations since you didn't specify this either
Below is an example from ATS UCLA (Stata version 9/10):
* read your data into Stata
use http://www.ats.ucla.edu/stat/stata/notes/hsb2, clear
generate goodread = (read > 60)
* run logistic predicting "goodread" from "write"
logit goodread female
* run permutation test for above with 10000 repetitions
permute female x2=e(chi2), reps(10000) nodots: logit goodread female
Since you want a statistic for the individual dummy variables and the test for both genetic dummy variables, you don't just want the results from the overall test, and you cannot just collect that using permute as the above example does.
© Copyright 1996–2025 StataCorp LLC | Terms of use | Privacy | Contact us | What's new | Site index |