Agriculture Reference
In-Depth Information
if `a' > 0.05 {
display as text “Fisher's Protected LSD is not
significant p = “ as result%-8.4f `a'
}
else {
display as text “Fisher's Protected LSD (p≤0.05):
as result%-8.4f `z'
}
end
he if command evaluates an expression, in this case, `a' > 0.05,
and, if it is true (nonzero in computer parlance), then the commands
within the braces {} are executed. If the expression evaluates to false
(zero), then the commands within the braces are skipped. In this case,
with the else command, an alternative set of commands within the
braces after the else command is executed.
To see this program work, load the dataset Onion varieties pro-
gramming.dta. The anovalsd2.do file has these added lines and should
be loaded and executed and then enter the following command:
anovalsd2 Yield Variety Replication
This results in the following output:
Summary statistics: mean
by categories of: Variety (Variety Number)
Variety | Yield
---------+----------
1 | 100.375
2 | 104.825
3 | 95.15
4 | 110.525
5 | 101.125
---------+----------
Total | 102.4
--------------------
Number of obs = 20 R-squared = 0.4028
Root MSE = 10.145 Adj R-squared = 0.0544
Source | Partial SS df MS F Prob > F
------------+---------------------------------------------------
Model | 832.892087 7 118.984584 1.16 0.3932
|
Variety | 520.740012 4 130.185003 1.26 0.3367
Search WWH ::




Custom Search