Statalist


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

Re: st: repeated measures or nesting?


From   "Joseph Coveney" <[email protected]>
To   "Statalist" <[email protected]>
Subject   Re: st: repeated measures or nesting?
Date   Sat, 10 Nov 2007 16:06:06 +0900

Chris Witte wrote:

I am using Stata 9.2 SE

After reading about anova in the Stata manual I am confused about the
difference between repeated measures and nesting.

Regarding repeated measures, the manual states "...the subjects (or whatever
the experimental units are called) are observed for each level of one or
more of the other categorical variables in the model."

One of the nesting examples (#9, page 48, in Release 9 [R]) in the manual
has multiple measurements taken on each person operating a certain machine,
and then you test the significance of person using the residual error.

Why aren't the measurements taken from each person repeated in the nesting
example?

I'm trying to decide whether my data should be analyzed as a nested or
repeated measures design, as I have multiple measurements taken on my
experimental units over time.  I thought it would be a repeated measure, but
my situation is much like the nested example, so I'm not so sure.

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

I don't have the Release 9 manuals in front of me, but I believe that you're
referring to the entry for -anova-.  The Release 10 online help file
for -anova- gives the following example for nested ANOVA:

webuse machine
anova output machine / operator|machine /

The -anova- statement is for a mixed-model ANOVA, with machines as fixed
effects and operators as random.  In the sense that the random effects
variance parameter is estimated from them, the repeated measurements *are*
represented in the model.

The -repeated()- isn't used in this example, though.  The -repeated()-
option invokes adjusting degrees of freedom for the F test statistic in
order to help compensate for the effect that the violation of the assumption
of sphericity has upon the test statistic's distribution.  Because the
example dataset doesn't give any spatial or temporal order to the
replications, you can only assume a variance components (compound symmetry)
structure, and so the -repeated()- statement is not applicable.

In order to see how the -repeated()- statement would fit into this case,
just add some arbitrary ordering to the replicate measurements; we'll
pretend that there is temporal ordering in the sequence in which the
replicates are present in the example dataset:

generate long row = _n
bysort operator machine (row): generate long time = _n
anova output machine / operator|machine time machine*time, repeated(time)

You state that, in your data, you have repeated measurements *over time*, so
you would use the -repeated()- option if you have more than two measurements
each, doubt that the sphericity assumption is tenable, and want to adjust
degrees of freedom for test statistics for the time factor and its
interactions.

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