Data from Chapter 5 from Table 5.1, page 90
input time score 0 4 0 6 0 10 0 9 0 11 20 18 20 13 20 15 20 11 20 13 40 24 40 19 40 21 40 16 40 15 60 16 60 17 60 13 60 23 60 21 end
Table 5.1 page 90. Analysis of variance in a one-way design
oneway score time
Test for Linear, Quadratic and Cubic trend in a one-way design, page 92-100
NOTE: For the test of trends, we are going to exploit xi3‘s (xi3 must be installed; if it is not, it can be done by typing search xi3 in the Stata command window and proceed with installation) orthogonal polynomial coding scheme. The (k-1) orthogonal variables have to first be created prior to there inclusion into the anova procedure and they must be treated as continuous to obtain the correct Sums of Squares.
xi3 o.time
o.time _Itime_1-4 (_Itime_4 for time==60 omitted)
anova score _Itime_1 _Itime_2 _Itime_3, cont( _Itime_1 _Itime_2 _Itime_3)
Number of obs = 20 R-squared = 0.6749
Root MSE = 3.3541 Adj R-squared = 0.6140
Source | Partial SS df MS F Prob > F
-----------+----------------------------------------------------
Model | 373.75 3 124.583333 11.07 0.0004
|
_Itime_1 | 306.25 1 306.25 27.22 0.0001
_Itime_2 | 61.25 1 61.25 5.44 0.0330
_Itime_3 | 6.25 1 6.25 0.56 0.4669
|
Residual | 180 16 11.25
-----------+----------------------------------------------------
Total | 553.75 19 29.1447368
