[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: repeated measure anova - controlling for subject-level effects
I have a question about repeated measures anova.
I have data where each of 96 subjects are each given 4 treatments; the order
of assignment is random. Every subject is diagnosed to be one of 4
'groups'. The hypothesis is to assess whether when given treatment # 1
subjects of group #1 score higher than subjects of group #2. Importantly,
scores for every subject were assessed before being given treatment (to
establish a baseline) and were also assessed after each of the 4 treatments.
The thing that is tripping me up is how to control for the initial baseline
Here is a sample of the data, sorted by subject id and treatment:
group id treatment baselinescore score
1 1 1 8 9
1 1 2 8 8
1 1 3 8 5
1 1 4 8 2
1 2 1 15 7
1 2 2 15 14
1 2 3 15 3
1 2 4 15 8
4 3 1 2 5
4 3 2 2 6
4 3 3 2 5
4 3 4 2 5
. . . . .
. . . . .
. . . . .
Here is what works in Stata:
. anova vas group/id|group treatment group*treatment, repeated(treatment)
This gives me meaningful output that I can interpret. But the question is,
how do I also control for the initial baseline score? It seems to me that
id is 'nested' in group, but also that id is 'nested' in baselinescore. If
so, how do I make the anova command reflect this?
Having spent a long time in the world of regressions, I am new to the world
of ANOVA (or repeated measures ANOVA). In a regression, one could simply
throw baseline score in as an independent control.
For the ANOVA, I tried the following:
. anova vas group/id|group baseline_anxiety/id|baseline_anxiety block
could not determine between-subject error term; use bse() option
No surprise that that didn't work. I have read Ken Higbee's FAQ on the
stata site (and I know he talks about getting the model right first and then
figuring out the stata command). But, sometimes you need a little help from
BTW, independent from this problem I tried a 3*3 design here too (with
'period' or 'time' interactions), but Stata's matsize limit of 800 put an
end to that ambition.
* For searches and help try: