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

re: st: permutation, strata() for empirical statistic distributions


From   David Airey <[email protected]>
To   [email protected]
Subject   re: st: permutation, strata() for empirical statistic distributions
Date   Wed, 5 Nov 2003 10:37:19 -0600

Here's a concrete example of what I want to do using permute. I have a simple data set with 2 groups, 5 subjects per group, and 10 replicate measures per subject. The anova statement for this data is:

. anova y group / subject|group /

I'd like to use permute in the same way as the example on page 157 of R[N-R], "permute", to get a distribution of statistics for my data permuted within subject within group. Does "permute" handle nested models? I'm assuming the option strata(subject group) does this?

How would one write a program equivalent to the one given on page 157 for the model above? The program on page 157 for the anova model "anova y treatment subject" is:

program panova
version 8.0
args response fac_intrst fac_other
anova `response' `fac_intrst' `fac_other'
test `fac_intrst'
end

This program is called by the permute statement:

. permute treatment "panova y treatment subject" treatmentF=r(F) modelF=e(F), reps(1000) strata(subject) saving(permanova)

My problem is that the examples don't tell me what to do with the / | characters in my anova statement.

Thanks,

Dave







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