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

st: RE: repeated measure anova - controlling for subject-level effects

From   "Cowell, Alexander J." <[email protected]>
To   "'[email protected]'" <[email protected]>
Subject   st: RE: repeated measure anova - controlling for subject-level effects
Date   Fri, 30 Aug 2002 17:24:19 -0400

An update

I am still confused, may be more so, may be less so.  But I have more on the
problem below.  I have tried instead positing that id is nested within
baseline*group.  Also, what I did not say in the first email was that I
think id is random, everything else is fixed.

I think the following could be right.  It gave me output that I can

.anova score baseline group baseline*group/id|baseline*group treatment
baseline*treatment group*treatment baseline*group*treatment, rep(treatment)

I checked the highest order interaction term (the three way) and
re-estimated without it because it was not significant (p=.3).  

Again: please tell me if this makes sense!  It seems strange to me to be
fully interacting baseline score.


-----Original Message-----
From: Cowell, Alexander J. [mailto:[email protected]]
Sent: Friday, August 30, 2002 1:51 PM
To: '[email protected]'
Subject: st: repeated measure anova - controlling for subject-level


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
group*block, repeated(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
your friends.

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.

Alex Cowell

*   For searches and help try:
*   For searches and help try:

© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index