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

Re: st: Anova with repeated variable


From   Joseph Coveney <[email protected]>
To   [email protected]
Subject   Re: st: Anova with repeated variable
Date   Fri, 25 Oct 2002 22:54:15 +0900

Xavier Viviand asked by Stata did not reproduce the results published in a textbook:  
"I am trying to replicate with Stata the  two way Between-Within Analysis of 
Variance example proposed by Keppel (Design and Analysis, 3rd ed, Table 17-6
pp 375)."

If it's any help in identifying the source of the problem, when I input the data from 
Xavier's posting, I get exactly the results in Keppel's textbook.  (I've copied the data 
from Xavier's posting, pasted them into a text file, insheeted them into Stata and 
issued two -reshape, long- commands before copying the -list, noobs- output from 
Stata's Results window and pasting the dataset into the do-file.)

Joseph Coveney

-----------begin keppel.do-------------

set more off
clear
input byte a byte s byte b byte y
1  1  1  13
1  1  2  14
1  1  3  17
1  1  4  20
1  2  1  10
1  2  2  11
1  2  3  15
1  2  4  14
1  3  1  13
1  3  2  19
1  3  3  18
1  3  4  21
1  4  1   4
1  4  2  12
1  4  3  14
1  4  4  15
2  1  1   5
2  1  2  10
2  1  3  17
2  1  4  21
2  2  1   8
2  2  2  15
2  2  3  22
2  2  4  24
2  3  1  14
2  3  2  16
2  3  3  23
2  3  4  23
2  4  1  12
2  4  2  21
2  4  3  26
2  4  4  26
3  1  1  13
3  1  2  24
3  1  3  28
3  1  4  30
3  2  1   9
3  2  2  22
3  2  3  22
3  2  4  24
3  3  1  14
3  3  2  22
3  3  3  28
3  3  4  28
3  4  1   8
3  4  2  18
3  4  3  27
3  4  4  28
end
anova y a / s|a b a*b, repeated(b)
exit

-----------end keppel.do-------------

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