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

st: ancova for repeated designs


From   tmmanini <[email protected]>
To   [email protected]
Subject   st: ancova for repeated designs
Date   Sat, 14 Aug 2004 18:04:21 -0400

I'm trying to run a supposed simple ancova model, controlling for pre-test 
values.  subjects are placed 
in three groups and then tested at three different time points. I would like 
to covary for the first time 
point, examine the group*covariate interaction and calculate the adjusted 
means.  I've listed 10 
subjects (I really have 32) below (g=group, t=time, y=depvar, x=covariate).  g 
is a between factor, t is a 
repeated factor.

id	g	t	y	x
1	1	1	1	1
1	1	2	1	1
1	1	3	1	1
3	2	1	1	1
3	2	2	1	1
3	2	3	1	1
4	3	1	5	5
4	3	2	5	5
4	3	3	1	5
6	2	1	5	5
6	2	2	4	5
6	2	3	1	5
7	3	1	6	6
7	3	3	6	6
7	3	2	6	6
8	1	1	3	3
8	1	2	3	3
8	1	3	3	3
9	1	1	6	6
9	1	2	6	6
9	1	3	6	6
10	1	1	1	1
10	1	2	1	1
10	1	3	1	1

When I run this with the 10 subjects listed above, I can't get the interaction 
term b/c the df=0 (see 
below)

anova y x g / id | g t g*t x*g, cont(x) rep(t)

					Number of obs =      24     R-squared     =  0.9126
					Root MSE      = .983192     Adj R-squared =  0.7990

					Source   Partial SS    df       MS           F     Prob > F
					-----------+----------------------------------------------------
					Model   100.958333    13  7.76602564       8.03     0.0012

					x         37.5     1        37.5      25.05     0.0075
					g   2.98197901     2   1.4909895       1.00     0.4457
					idg   5.98844884     4  1.49711221
					-----------+----------------------------------------------------
					t          7.6     2         3.8       3.93     0.0550
					g*t   4.91666667     4  1.22916667       1.27     0.3437
					x*g            0     0

					Residual   9.66666667    10  .966666667
					-----------+----------------------------------------------------
					Total      110.625    23  4.80978261


when I try the adjust command, I come up with blanks (below)

adjust x, by(g t)
			
Dependent variable: y	Command:	anova
Variable left as is: id
Covariate set to mean: x =	3.5
			
t        
g     1     2     3

1                  
2                  
3

What is really annoying is the fact that I can use this same design in SPSS 
and not have a problem, but I 
would really like to use STATA.  I've examined all the material on the 
listserv I can find about this topic, 
which has lead me to this point, but if you have another resource please point 
me in the right direction.

                      

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