CROP 590 Experimental Design in Agriculture Lab exercise – 5 week

advertisement
CROP 590 Experimental Design in Agriculture
Lab exercise – 5th week
Latin Square Design
Multiple Comparison Tests
SAS On-line Documentation
PROC GLM
PROC MIXED
PROC MULTTEST (only for one-way designs)
Suggested Reading:
Petersen 153-162; Kuehl 91-117
Part I. Latin Square Design
1. Download the text file Lab5.txt from the class website. The data set consists of a
blocking factor for the slope of the field (6 levels), a second blocking factor for a fertility
gradient (6 levels), six varieties (the treatments), and yield data. Note that there are no
heading names for the variables included in the data set.
For this exercise we will include commands in our SAS program to input the data from
this external file. With this method for data input you do not need to use the import
wizard or include datalines in your program as we have done in previous labs. Substitute
the address for your data file in between the single quotes. To find the address, right
click your mouse on the Lab5.txt file and go to “properties”.
DATA one;
INFILE 'C:\Users\klingj\Desktop\Lab5.txt';
INPUT slope $ fert $ variety $ yield;
2. Conduct an ANOVA using PROC GLM. The CLASS and MODEL statements are
straightforward extensions of the model for the Randomized Block Design.
PROC GLM
TITLE
CLASS
MODEL
MEANS
RUN;
plots=diagnostics;
'Latin Square Design';
slope fert variety;
yield = slope fert variety;
variety/LSD;
3. Were the blocking factors significant? Were there significant differences among the
varieties?
4. Use the estimate of MSE obtained from the ANOVA to conduct a power analysis:
PROC GLMPOWER data=one;
TITLE 'Power for Latin Square Experiment';
CLASS slope fert variety;
MODEL yield = slope fert variety;
POWER
stddev = 40.86251
ntotal = 36
power = .;
RUN;
1
Part II. Mean Comparison Tests
In some studies, there is no obvious structure among the treatments, yet the experimenter
wishes to distinguish the “best” or the “worst” treatments in terms of a common response
variable. Examples would include variety trials in a breeding program, a study of the effects
of a number of toxins, or evaluation of an array of products on the market.
Open the data set Lab5_comparisons.xlsx and save it to your desktop. The data represent
yields of seven varieties evaluated in a RBD with four replications. Input the data into SAS
and conduct an analysis of variance using PROC GLM. Requests for multiple comparison
tests can be made using the MEANS statement. (Note: the lecture material includes a
spreadsheet using this data set, showing how many of these tests are calculated.)
PROC GLM;
TITLE 'Multiple Comparison Tests';
CLASS rep variety;
MODEL Yield = rep variety;
MEANS variety/LSD Duncan SNK Tukey Waller Bon Scheffe;
Compare these tests using the following criteria:
1) Which test(s) control only the comparisonwise error rate, and not the experimentwise
error rate?
2) Which use a single value to compare all means? Which use multiple values?
3) For each test, how many significant comparisons were obtained? What might this
suggest in terms of the control of experimentwise error (Type I) and power to detect
differences? (We cannot answer this question definitively because we do not know the
true magnitude of differences among the varieties)
4) Summarize your findings in the table below:
Name of Test
Controls Family
(Experimentwise)
Error Rate?
Uses Single Value?
LSD
Duncan
SNK
Tukey
Waller
Bon
Scheffe
2
Critical Value
How many
differences
detected?
Some statisticians recommend that we report confidence intervals rather than the results of
mean comparison tests. To obtain 95% confidence intervals of means and differences
among means using the LSD:
MEANS variety/LSD CLM CLDIFF;
If the data were imbalanced, we could use an lsmeans statement to obtain multiple
comparison tests. The pdiff statement alone will give all possible t tests among means,
taking into account the differences in standard errors due to unequal replication. Various
adjustments can also be used, such as Tukey’s test.
LSMEANS variety/pdiff adjust=tukey;
Assume that the variety ‘Sitka’ is the control. Try using the following statements to obtain
all possible two-tailed comparisons with the control. The first statement will give results for
Dunnett’s test which is similar to Tukey’s test. The second will give LSD tests and the third
will provide Bonferroni probabilities.
MEANS variety/Dunnett ('Sitka');
LSMEANS variety /pdiff=CONTROL('Sitka') adjust=T;
LSMEANS variety /pdiff=CONTROL('Sitka') adjust=bon;
Because varieties were selected for increased yield, it would be reasonable to perform onesided tests to compare all treatments with a control. The Dunnettu option can be used to
obtain a one-tailed comparison of all means with the control (the last ‘u’ in Dunnettu stands
for the ‘upper’ tail). You can also use the lsmeans statement and pdiff=controlu option to
obtain one-tailed comparisons of all means with a control.
MEANS variety/Dunnettu ('Sitka');
LSMEANS variety/pdiff=CONTROLU('Sitka') adjust=bon;
To calculate an LSI for a one-tailed comparison to a control, use can request an LSD test
with alpha=0.1. You should only consider comparisons with varieties that have higher yields
than Sitka.
MEANS variety/LSD alpha=0.1;
How do the results of these tests of variety vs control compare?
3
Download