Agriculture Reference
In-Depth Information
This looks more complicated than it is. The scalars saved from the
anova
estimation command do not include the mean square values,
but do include the sum of squares and degrees of freedom, which
can be used to calculate the mean square values. To see all the sca-
lars from the ANOVA estimation command, type
ereturn list
immediately after invoking the
anova
command. To calculate the
block, adjusted mean square, the
e(ss _ 3)
, which is the block
adjusted sum of squares (11,381.8375), is divided by
e(df _ 3
), the
block adjusted degrees of freedom (15). The
e(rmse)
scalar is the
root mean square error, which is the square root of the residual
mean square.
he
local
u in the equation saves the results of the calculation
in a local macro. To see the value of this calculation, enter
display
`
u
'
, which should be 0.0358982. Remember the open and closed
single quotes are required to display the value of
u
.
At this point, to continue the analysis requires creating a new data-
set. To begin with, we need to calculate the treatment totals. Start by
entering the command
preserve
. This will save the current dataset
before generating a new dataset. Enter the command
collapse
(sum)
tiller
,
by
(trt)
This will add the tiller values by each treatment creating a new dataset.
After entering this command, you can open the Data Editor to see the
result. At this point, save this dataset as trttotals.dta or use some other
easily remembered name. Now enter
restore
, which will restore the
original dataset. Again, enter the
preserve
command to save the
current dataset. Reenter the
collapse
command as
collapse
(sum)
tiller,
by
(block)
This results in summing the tiller values by the block variable. This
dataset of block totals has to be expanded to the original dataset size
of 80 observations and sorted to match the original dataset. To do
this, enter the following commands:
generate
id = 1
expandcl
4,
cluster(id
generate
(ident)
sort
ident block
Search WWH ::
Custom Search