NAME PLS 205 Final [Total Points in Exam = 100] …...PLS 205 Final [Total Points in Exam = 100]...
Transcript of NAME PLS 205 Final [Total Points in Exam = 100] …...PLS 205 Final [Total Points in Exam = 100]...
NAME _______________________
PLS 205 Final [Total Points in Exam = 100]
March 12, 2014
Due Date: Tuesday, March 17, by 5:00 pm; 122 Robbins Hall
Include your SAS programs, include only the critical parts of the SAS output, and discuss each result.
NO POINTS WILL BE AWARDED TO OUTPUTS WITHOUT A SENTENCE EXPLAINING
THE CONCLUSION.
Clarification questions should be directed to Miguel and Dr. Dubcovsky by e-mail only. No consultation
with other students is allowed during the exam period (including SAS programming questions). Exams
with more than one unlikely identical mistake will receive zeroes, and the incident will be referred
to the Office of Student Judicial Affairs.
Problem 1 (Split-Split Plot) [25 points]
A grower would like to test if fruit size in blueberry is affected by fungicide application, insecticide
application, and insect pollination. The treatments the grower experimented with are:
Fungicide – regular fungicide application or no fungicide application
Insecticide – regular insecticide application or no insecticide application
Pollination – 25% of the flowers pollinated or 100% of the flowers pollinated
To conduct the experiment the grower picked 4 field sections with 1.8 m wide x 12 m long dimensions.
Each field section was divided into two 1.8 m x 6 m subsections and the fungicide treatments were
randomly assigned to each subsection. Each subsection was divided into 1.8 m x 3 m sub-sub section and
the insecticide treatment was randomly assigned to these sections. Finally the sub-sub sections were
divided into sections of 1.8 m x 1.5 m where the pollination treatments were randomly assigned. To apply
the 25% pollination treatment, the grower covered the plants with a bee proof net when the flowering for
the plants reached 25%. To insure that the flowers were being pollinated the grower installed bumble bee
colonies within each cage. When the plants were ready to harvest the grower weighed all of the ripe fruit
in bulk from each 1.8 m x 1.5 m section and divided the number by the total number of ripe fruit weighed
to get an average fruit weight. While harvesting one of the workers accidentally fell on a box of berries
corresponding to the Full fungicide, None insecticide, 25% pollination, in block 2. This data was removed
and is indicated by the word MISSING. The data is summarized below:
data berries;
input Block Fungicide $ Insecticide $ Pollination Response;
Cards;
1 Full None 25 0.687
1 Full None 100 0.361
1 Full Full 25 0.87
1 Full Full 100 0.558
1 None None 25 0.442
1 None None 100 0.382
1 None Full 25 0.39
1 None Full 100 0.462
2 Full None 25 .
2 Full None 100 0.401
2 Full Full 25 0.592
2 Full Full 100 0.566
2 None None 25 0.518
2 None None 100 0.381
2 None Full 25 0.395
2 None Full 100 0.626
3 Full None 25 0.713
3 Full None 100 0.377
3 Full Full 25 0.584
3 Full Full 100 0.655
3 None None 25 0.442
3 None None 100 0.382
3 None Full 25 0.394
3 None Full 100 0.472
4 Full None 25 0.706
4 Full None 100 0.36
4 Full Full 25 0.617
4 Full Full 100 0.557
4 None None 25 0.447
4 None None 100 0.382
4 None Full 25 0.393
4 None Full 100 0.475
;
*Proc Print;
Proc GLM data = berries;
Class Block Fungicide Insecticide Pollination;
Model Response = Block Fungicide
Block*Fungicide
Insecticide Fungicide*Insecticide
Block*Fungicide*Insecticide
Pollination Pollination*Insecticide Pollination*Fungicide
Pollination*Fungicide*Insecticide;
Random Block Block*Fungicide Block*Fungicide*Insecticide / test;
Output out = PR p = pred r = res;
Proc Sort data = berries;
by Fungicide Insecticide;
Proc GLM data = berries;
Class Block Insecticide Pollination;
Model Response = Block Pollination;
Random Block / test;
by Fungicide Insecticide;
Proc Sort data = berries;
by Pollination;
Proc GLM data = berries;
Class Block Fungicide Insecticide;
Model Response = Block Fungicide
Block*Fungicide
Insecticide Fungicide*Insecticide;
Random Block Block*Fungicide / test;
LSMeans Fungicide*Insecticide;
by Pollination;
run;
quit;
[Don’t worry about testing the assumptions]
1. [5 points] Use the table in the appendix to describe the experimental design.
Design: RCBD with a Spit-Split plot
Response Variable: Average blueberry weight
Experimental Unit: Main-plot: 1.8m x 6m section Subplot: 1.8m x 3m Sub-subplot: 1.8m x 1.5m
Class
Variable
Block or
Treatment
Number of
Levels
Fixed or
Random Description
1 Block 4 Random 1.8m x 12m section
2 Treatment 2 Fixed Fungicide
3 Treatment 2 Fixed Insecticide
4 Treatment 2 Fixed Pollination
Subsamples? NO
Covariable? NO
2. [5 points] Perform the appropriate ANOVA and report the significance of the different treatments and
interactions. THERE IS NO NEED TO TEST ASSUMPTIONS. Dependent Variable: Response
Source DF Type III SS Mean Square F Value Pr > F
Block 3 0.005373 0.001791 0.52 0.6966
Error 3 0.010294 0.003431
Error: MS(Block*Fungicide)
Source DF Type III SS Mean Square F Value Pr > F
* Fungicide 1 0.160389 0.160389 46.56 0.0059
Error 3.0907 0.010646 0.003445
Error: 0.989*MS(Block*Fungicide) + 0.011*MS(Error)
* This test assumes one or more other fixed effects are zero.
Source DF Type III SS Mean Square F Value Pr > F
Block*Fungicide 3 0.010294 0.003431 1.22 0.3790
Error 6.2382 0.017581 0.002818
Error: 0.9882*MS(Block*Fungic*Insecti) + 0.0118*MS(Error)
Source DF Type III SS Mean Square F Value Pr > F
* Insecticide 1 0.022746 0.022746 8.01 0.0276
* Fungicide*Insecticid 1 0.005235 0.005235 1.84 0.2199
Error 6.4649 0.018350 0.002838
Error: 0.9774*MS(Block*Fungic*Insecti) + 0.0226*MS(Error)
* This test assumes one or more other fixed effects are zero.
Source DF Type III SS Mean Square F Value Pr > F
Block*Fungic*Insecti 6 0.016779 0.002797 0.60 0.7240
* Pollination 1 0.067526 0.067526 14.54 0.0029
* Insectici*Pollinatio 1 0.093669 0.093669 20.17 0.0009
* Fungicide*Pollinatio 1 0.094712 0.094712 20.40 0.0009
Fungic*Insect*Pollin 1 0.001553 0.001553 0.33 0.5748
Error: MS(Error) 11 0.051081 0.004644
* This test assumes one or more other fixed effects are zero.
The ANOVA results suggest that the interaction between fungicide and insecticide are not
significant (P = 0.2199), the interaction between insecticide and pollination are significant (P =
0.0009), and the interaction between fungicide and pollination are significant (P = 0.0009). These
results suggest that we analyze the simple effects for fungicide and insecticide treatments at the
different pollination levels. The results also suggest that we should draw our conclusions about
pollination at each fungicide by insecticide treatment combinations. The three way interaction is
not significant (P = 0.5748).
3. [5 points] Based on your results for question 2; please perform the appropriate tests to analyze the
simple effects?
Analysis of pollination within each level of fungicide and insecticide combination: Fungicide=Full Insecticide=Full
Source DF Type III SS Mean Square F Value Pr > F
Block 3 0.023022 0.007674 0.58 0.6691
Pollination 1 0.013366 0.013366 1.00 0.3903
Error: MS(Error) 3 0.039964 0.013321
When the full fungicide and insecticide treatments are applied there are no significant differences
between pollinations (P = 0.3903).
Fungicide=Full Insecticide=None
Source DF Type III SS Mean Square F Value Pr > F
Block 3 0.001363 0.000454 9.08 0.1008
Pollination 1 0.169344 0.169344 3386.88 0.0003
Error: MS(Error) 2 0.000100 0.000050000
When the full fungicide treatment and no insecticide treatments are applied there are highly
significant differences between pollinations (P = 0.0003).
Fungicide=None Insecticide=Full
Source DF Type III SS Mean Square F Value Pr > F
Block 3 0.009556 0.003185 1.08 0.4767
Pollination 1 0.026796 0.026796 9.05 0.0573
Error: MS(Error) 3 0.008880 0.002960
When no fungicide is applied but the full insecticide treatment is applied there are no significant
differences between pollination but are very close to being significant (P = 0.0573).
Fungicide=None Insecticide=None
Source DF Type III SS Mean Square F Value Pr > F
Block 3 0.002025 0.000675 0.95 0.5171
Pollination 1 0.012961 0.012961 18.20 0.0236
Error: MS(Error) 3 0.002137 0.000712
When no fungicide or insecticide is applied there are significant differences between pollinations (P
= 0.0236).
Analysis of fungicide and insecticide at different levels of pollination:
Pollination=25
Source DF Type III SS Mean Square F Value Pr > F
Block 3 0.011583 0.003861 0.58 0.6689
Error 3 0.020090 0.006697
Error: MS(Block*Fungicide)
Source DF Type III SS Mean Square F Value Pr > F
* Fungicide 1 0.204054 0.204054 30.56 0.0098
Error 3.2054 0.021403 0.006677
Error: 0.9643*MS(Block*Fungicide) + 0.0357*MS(Error)
* This test assumes one or more other fixed effects are zero.
Source DF Type III SS Mean Square F Value Pr > F
Block*Fungicide 3 0.020090 0.006697 1.09 0.4342
* Insecticide 1 0.005612 0.005612 0.91 0.3834
Fungicide*Insecticid 1 0.002842 0.002842 0.46 0.5269
Error: MS(Error) 5 0.030757 0.006151
* This test assumes one or more other fixed effects are zero.
When 25% of the flowers are pollinated there are no significant differences between insecticide
applications and there are no significant interactions (P = 0.834 and P = 0.5269, respectively).
There are significant differences between fungicide (P = 0.0098).
Pollination=100
Source DF Type III SS Mean Square F Value Pr > F
Block 3 0.007504 0.002501 1.26 0.4276
* Fungicide 1 0.004658 0.004658 2.34 0.2235
Error 3 0.005969 0.001990
Error: MS(Block*Fungicide)
* This test assumes one or more other fixed effects are zero.
Source DF Type III SS Mean Square F Value Pr > F
Block*Fungicide 3 0.005969 0.001990 0.93 0.4814
* Insecticide 1 0.113064 0.113064 52.91 0.0003
Fungicide*Insecticid 1 0.006765 0.006765 3.17 0.1255
Error: MS(Error) 6 0.012821 0.002137
* This test assumes one or more other fixed effects are zero.
When 100% of the flowers are pollinated there are no significant effects between fungicides and
there are no significant interactions (P = 0.2235 and P = 0.1255, respectively). There are significant
differences in average berry weight between insecticide treatments (P = 0.0003).
4. [5 points] Report the appropriate means for Fungicide and Insecticide at the different levels of
pollination.
Remember that there is missing data; therefore; it is necessary to use the LSMeans statement. Pollination=25
Fungicide Insecticide Response LSMEAN
Full Full 0.66575000
Fungicide Insecticide Response LSMEAN
Full None 0.67741667
None Full 0.39300000
None None 0.46225000
Pollination=100
Fungicide Insecticide Response LSMEAN
Full Full 0.58400000
Full None 0.37475000
None Full 0.50875000
None None 0.38175000
5. [5 points] Report the recommendations you will give on the application of fungicide and insecticide if
the grower desires to have larger fruit.
Based on significant interactions with pollination, separate recommendations should be provided at the
different levels of pollination.
At 25% pollination the grower gets significantly larger fruit by applying fungicide but there is no
significant effect of insecticide.
At the 100% pollination there was not enough evidence to suggest that there are significant differences
between fungicide treatments but the application of insecticide has a positive effect on fruit size.
In conclusion, if the grower desires larger fruit size, at 25% pollination they should apply fungicide (the
insecticide application is not beneficial) and at 100% pollination they should apply insecticide (the
fungicide application is not very beneficial).
Problem 2 (Mixed Model) [?? points]
An agronomist wants to test the effect of four treatments (two tillage practices and to cover crop
methods) on processing tomato yields and to extend his conclusions to the Central Valley. The two tillage
practices include Standard tillage (ST) vs. Conservation tillage (CT) and the two cover crop treatments
include No Cover crop (NO) vs. Cover crop (CC). The researcher is also wants to test if there are
significant interactions between the cover crop and tillage.
To conduct the experiment the researcher randomly picks six random locations in the Central Valley in
California. In each location he selects one field, divides it in four homogeneous sections with 4 large plots
in each section. In each location he randomly assigns each of the four possible cover by tillage treatment
combinations to one of the 4 large plots available within each section. The researcher measures tomato
yield in each plot and records the yield in tons per acre. The data is reported below:
data mixedfinal;
input Location $ Block Tillage $ Cover $ Response;
cards;
loc1 1 ST NO 54
loc2 1 ST NO 65
loc3 1 ST NO 42
loc4 1 ST NO 49
loc5 1 ST NO 55
loc6 1 ST NO 33
loc1 1 ST CC 58
loc2 1 ST CC 68
loc3 1 ST CC 54
loc4 1 ST CC 47
loc5 1 ST CC 48
loc6 1 ST CC 46
loc1 1 CT NO 52
loc2 1 CT NO 62
loc3 1 CT NO 51
loc4 1 CT NO 51
loc5 1 CT NO 59
loc6 1 CT NO 34
loc1 1 CT CC 69
loc2 1 CT CC 64
loc3 1 CT CC 55
loc4 1 CT CC 61
loc5 1 CT CC 52
loc6 1 CT CC 59
loc1 2 ST NO 54
loc2 2 ST NO 59
loc3 2 ST NO 41
loc4 2 ST NO 48
loc5 2 ST NO 50
loc6 2 ST NO 32
loc1 2 ST CC 53
loc2 2 ST CC 71
loc3 2 ST CC 64
loc4 2 ST CC 47
loc5 2 ST CC 56
loc6 2 ST CC 41
loc1 2 CT NO 50
loc2 2 CT NO 55
loc3 2 CT NO 52
loc4 2 CT NO 63
loc5 2 CT NO 57
loc6 2 CT NO 42
loc1 2 CT CC 58
loc2 2 CT CC 69
loc3 2 CT CC 66
loc4 2 CT CC 55
loc5 2 CT CC 60
loc6 2 CT CC 48
loc1 3 ST NO 55
loc2 3 ST NO 54
loc3 3 ST NO 36
loc4 3 ST NO 52
loc5 3 ST NO 51
loc6 3 ST NO 38
loc1 3 ST CC 52
loc2 3 ST CC 70
loc3 3 ST CC 51
loc4 3 ST CC 51
loc5 3 ST CC 58
loc6 3 ST CC 40
loc1 3 CT NO 63
loc2 3 CT NO 55
loc3 3 CT NO 51
loc4 3 CT NO 53
loc5 3 CT NO 62
loc6 3 CT NO 35
loc1 3 CT CC 56
loc2 3 CT CC 73
loc3 3 CT CC 59
loc4 3 CT CC 58
loc5 3 CT CC 63
loc6 3 CT CC 58
loc1 4 ST NO 51
loc2 4 ST NO 50
loc3 4 ST NO 51
loc4 4 ST NO 49
loc5 4 ST NO 57
loc6 4 ST NO 28
loc1 4 ST CC 52
loc2 4 ST CC 61
loc3 4 ST CC 56
loc4 4 ST CC 47
loc5 4 ST CC 48
loc6 4 ST CC 41
loc1 4 CT NO 52
loc2 4 CT NO 58
loc3 4 CT NO 46
loc4 4 CT NO 53
loc5 4 CT NO 53
loc6 4 CT NO 41
loc1 4 CT CC 59
loc2 4 CT CC 65
loc3 4 CT CC 57
loc4 4 CT CC 56
loc5 4 CT CC 52
loc6 4 CT CC 57
;
*Proc Print data = mixedfinal;
Proc GLM data = mixedfinal;
Class Location Block Tillage Cover;
Model Response = Location Block(Location)
Tillage Cover Tillage*Cover
Location*Tillage Location*Cover
Location*Tillage*Cover;
Random Location Block(Location) Location*Tillage Location*Cover
Location*Tillage*Cover / test;
Means Cover Tillage;
Proc Varcomp data = mixedfinal Method = Type1;
class Location Block Tillage Cover;
Model Response = Tillage Cover Tillage*Cover
Location Block(Location)
Location*Tillage Location*Cover
Location*Tillage*Cover / fixed = 3;
Proc Gplot data = mixedfinal;
** Two-way Plots **;
symbol1 i=std1mtj v=none color=BLUE mode = INCLUDE;
plot Response * Cover / vaxis = 47 to 58 by 1;
Proc Gplot data = mixedfinal;
** Two-way Plots **;
symbol1 i=std1mtj v=none color=BLUE mode = INCLUDE;
plot Response * Tillage / vaxis = 47 to 58 by 1;
Proc Gplot data = mixedfinal;
** Two-way Plots **;
symbol1 i=std1mtj v=none color=BLUE mode = INCLUDE;
symbol2 i=std1mtj v=none color=BLACK mode = INCLUDE;
symbol3 i=std1mtj v=none color=GREEN mode = INCLUDE;
symbol4 i=std1mtj v=none color=ORANGE mode = INCLUDE;
symbol5 i=std1mtj v=none color=RED mode = INCLUDE;
symbol6 i=std1mtj v=none color=PURPLE mode = INCLUDE;
plot Response * Location = Cover;
run;
quit;
1. [6 points] Perform appropriate analysis of variance on the data. Report the results of the analysis and
answer the following questions:
a) Are there significant differences in yield between tillage methods or cover crop methods?
b) Is the interaction between tillage and cover crop significant?
c) Are the effects of tillage, cover crop, and their interaction consistent across locations? If yes,
produce a plot showing the interaction.
Dependent Variable: Response
Source DF Type III SS Mean Square F Value Pr > F
Location 5 3520.677083 704.135417 4.19 0.0594
Error 5.6932 956.799535 168.059491
Error: MS(Block(Location)) + MS(Location*Tillage) + MS(Location*Cover) -
MS(Locati*Tillage*Cover) - MS(Error)
Source DF Type III SS Mean Square F Value Pr > F
Source DF Type III SS Mean Square F Value Pr > F
Block(Location) 18 359.562500 19.975694 1.04 0.4312
Locati*Tillage*Cover 5 111.177083 22.235417 1.16 0.3403
Error: MS(Error) 54 1034.187500 19.151620
Source DF Type III SS Mean Square F Value Pr > F
* Tillage 1 625.260417 625.260417 16.04 0.0103
Error 5 194.927083 38.985417
Error: MS(Location*Tillage)
* This test assumes one or more other fixed effects are zero.
Source DF Type III SS Mean Square F Value Pr > F
* Cover 1 969.010417 969.010417 6.44 0.0520
Error 5 752.427083 150.485417
Error: MS(Location*Cover)
* This test assumes one or more other fixed effects are zero.
Source DF Type III SS Mean Square F Value Pr > F
Tillage*Cover 1 29.260417 29.260417 1.32 0.3032
Location*Tillage 5 194.927083 38.985417 1.75 0.2764
Location*Cover 5 752.427083 150.485417 6.77 0.0280
Error 5 111.177083 22.235417
Error: MS(Locati*Tillage*Cover)
a) The ANOVA results suggest that there are significant differences between the tillage treatments (P =
0.0103) and there is no significant differences between the cover crop treatments (P = 0.0520) although it
is very close to being significant.
b) The interaction between tillage and cover crop is not significant
c) The effects of tillage is consistent across locations but the effect of Cover varies among locations.
However, since location is a random factor we still want to describe the effect of cover across all locations
If yes show an interaction plot for the significant interaction.
Above is a plot of the interaction between the cover and location. It shows that the cover crop
treatment is better in most locations except for locations 4 and 5 where it doesn’t seem to make any
difference whether a cover crop is used or not.
2. [5 points] Create two plots using SAS, R, or Excel where the first plot shows the main effects of tillage
and the second plot shows the main effects of the crop treatments. Based on this result and the previous
ANOVA provide your conclusion and recommendations for the complete Central Valley.
Main Effects of Cover Crop:
Main Effects of Tillage:
Based on the mean and ANOVA results we can recommend the application of Conservative tillage across
the Central Valley. Based on the current results the use of cover crops cannot be recommended uniformly
across the Central valley. However, given the marginal NS result for cover crop and the significant
interaction between location and cover crop, it would be worth doing a follow up study to identify
locations within the Central Valley where the use of cover crop is significantly better.
3. [5 points] Please report the means of the main effects of tillage and cover crop. Is the difference
between standard tillage and conventional tillage larger than the difference between no cover crop
and cover crop? Does the largest difference correspond to the most significant result? If not explain
why.
The means of cover crop across all locations, blocks, and tillage methods:
Level of N Response
Cover Mean Std Dev
CC 48 56.4375 8.02365187
NO 48 50.0833 8.75392516
difference 6.3541667
The difference in tomato yield between having a cover crop and not having a cover crop is 6.35.
The means of tillage across all locations, blocks, and tillage methods:
Level of N Response
Tillage Mean Std Dev
CT 48 55.8125 7.87848201
ST 48 50.7083 9.28727872
difference 5.1041667
The difference in tomato yield between having standard tillage and having conservation tillage is 5.10.
The difference between the two cover crop treatments is larger than the difference between the two
tillage treatments. This larger difference is in the less significant factor. This is due to the fact that
we are using loc*cover as an error term, and since the cover crop response varies across locations,
this error is large and the differences are not significant. By contrast the interaction between tillage
and location is not significant, resulting in a smaller error for tillage.
The expected means squares (EMS) for tillage is:
Source Type III Expected Mean Square
Tillage Var(Error) + 4 Var(Locati*Tillage*Cover) + 8 Var(Location*Tillage) +
Q(Tillage,Tillage*Cover)
The correct error term for tillage is the interaction between location and tillage:
Location*Tillage Var(Error) + 4 Var(Locati*Tillage*Cover) + 8 Var(Location*Tillage)
The EMS for cover crop is:
Source Type III Expected Mean Square
Cover Var(Error) + 4 Var(Locati*Tillage*Cover) + 8 Var(Location*Cover) + Q(Cover,Tillage*Cover)
The correct error term for cover crop is the interaction between location and cover crop:
Location*Cover Var(Error) + 4 Var(Locati*Tillage*Cover) + 8 Var(Location*Cover)
Notice that the mean squares for Location*Tillage is smaller than the means squares for
Location*Cover.
Source DF Type III SS Mean Square F Value Pr > F
Tillage*Cover 1 29.260417 29.260417 1.32 0.3032
Location*Tillage 5 194.927083 38.985417 1.75 0.2764
Location*Cover 5 752.427083 150.485417 6.77 0.0280
Error 5 111.177083 22.235417
Error: MS(Locati*Tillage*Cover)
The variance due to the Location*Cover interaction is approximately 4 times larger than the
variance due to Location*Tillage.
In conclusion, the variance due to Location*Cover is much larger than the variance due to the
Location*Tillage interaction, which explains the lack of significant differences for cover crops
across Central Valley as a whole.
4. [4 points] Using the same model as in question 1, estimate the variance components for all of the
random effects in your model. Which of these random effects had the largest variance?
Type 1 Estimates
Variance Component Estimate
Var(Location) 33.50475
Var(Block(Location)) 0.20602
Var(Location*Tillage) 2.09375
Var(Location*Cover) 16.03125
Var(Locati*Tillage*Cover) 0.77095
Var(Error) 19.15162
The random effect that had the largest variance was location and it is estimated to be 33.50475.
Problem 3 (Factorial) [25 points]
A table grape breeder has developed two potential varieties and would like to release the variety that
produces the largest berries upon application of gibberellic acid (GA), as well as confirm that these two
new varieties are better than the traditional variety Thompson Seedless. The breeder selects three
homogeneous sections in a vineyard and plants 18 10-plant plots in each section. Within each section he
randomly assigns two plots to one of the 9 combinations ofthe three varieties and three GA treatments (0
ppm, 10 ppm, and 20 ppm). At harvest, he randomly picks 50 berries per plant per plot and weighs them
in bulk. The average individual berry weights (g) calculated for each plot are reported below:
Data Grape;
Input Block $ GA $ Var $ Id $ Wt;
Cards;
1 0 TS 1 4.15
1 0 TS 1 4.19
1 0 Var1 2 4.84
1 0 Var1 2 4.77
1 0 Var2 3 4.92
1 0 Var2 3 4.58
1 10 TS 4 4.90
1 10 TS 4 4.81
1 10 Var1 5 5.28
1 10 Var1 5 5.37
1 10 Var2 6 5.64
1 10 Var2 6 5.29
1 20 TS 7 5.45
1 20 TS 7 5.17
1 20 Var1 8 6.39
1 20 Var1 8 6.10
1 20 Var2 9 5.66
1 20 Var2 9 6.01
2 0 TS 1 4.27
2 0 TS 1 4.83
2 0 Var1 2 5.21
2 0 Var1 2 5.24
2 0 Var2 3 5.34
2 0 Var2 3 5.11
2 10 TS 4 4.83
2 10 TS 4 4.95
2 10 Var1 5 6.02
2 10 Var1 5 5.50
2 10 Var2 6 5.79
2 10 Var2 6 5.29
2 20 TS 7 5.90
2 20 TS 7 5.76
2 20 Var1 8 6.06
2 20 Var1 8 6.56
2 20 Var2 9 5.95
2 20 Var2 9 6.29
3 0 TS 1 5.01
3 0 TS 1 4.80
3 0 Var1 2 5.61
3 0 Var1 2 5.06
3 0 Var2 3 5.58
3 0 Var2 3 5.44
3 10 TS 4 5.25
3 10 TS 4 5.35
3 10 Var1 5 6.20
3 10 Var1 5 6.13
3 10 Var2 6 5.57
3 10 Var2 6 5.91
3 20 TS 7 5.67
3 20 TS 7 5.87
3 20 Var1 8 6.78
3 20 Var1 8 6.70
3 20 Var2 9 6.33
3 20 Var2 9 6.24
;
;
Proc GLM data=Grape order=data;
title "Exploratory model";
Class Block GA Var;
Model Wt = Block|GA|Var;
Proc GLM data=Grape order=data;
title 'ANOVA';
Class Block GA Var;
Model Wt=Block GA|Var;
Output out=PR p=Pred r=Res;
Proc univariate normal plot data=PR;
title 'Normality';
Var Res;
Proc GLM data=Grape order=data;
title 'Levene GA';
Class GA;
Model Wt = GA;
Means GA/hovtest=Levene;
Proc GLM data=Grape order=data;
title 'Levene Var';
Class Var;
Model Wt=Var;
Means Var/hovtest=Levene;
Proc Gplot data=Grape;
title "GA by Variety Interactions";
symbol1 i=std1mtj v=none color=BLUE;
symbol2 i=std1mtj v=none color=BLACK;
symbol3 i=std1mtj v=none color=RED;
Plot Wt*GA=Var /
Description="GA by Variety Interactions";
Proc GLM data=Grape order=data;
title 'contrast';
Class Block Id;
Model Wt = Block Id;
Output out=PRID p=PredID r=ResID;
Contrast 'Control vs new' Id -2 1 1 -2 1 1 -2 1 1;
Contrast 'NewVar' Id 0 1 -1 0 1 -1 0 1 -1;
Contrast 'Lin' Id -1 -1 -1 0 0 0 1 1 1;
Contrast 'Quad' Id 1 1 1 -2 -2 -2 1 1 1;
Contrast 'Lin*NV' Id 0 -1 1 0 0 0 0 1 -1;
Contrast 'Lin*contvsnew' Id 2 -1 -1 0 0 0 -2 1 1;
Contrast 'Quad*NV' Id 0 1 -1 0 -2 2 0 1 -1;
Contrast 'Quad*contvsnew' Id -2 1 1 4 -2 -2 -2 1 1;
Means Id/REGWQ;
Proc univariate normal plot data=PRID;
title 'Normality on ID';
Var ResID;
Proc GLM data=Grape order=data;
title 'Levene on ID';
Class ID;
Model Wt = ID;
Means ID/hovtest=Levene;
Proc sort data=Grape;
by GA;
Proc GLM data=Grape order=data;
title "Var effect by GA level";
Class Block Var;
Model Wt = Block Var;
Contrast 'Control vs New' Var -2 1 1;
Contrast 'New' Var 0 -1 1;
by GA;
Proc sort data=Grape;
by Var;
Proc GLM data=Grape order=data;
title "GA effect by Varlevel";
Class Block GA;
Model Wt = Block GA;
Contrast 'lineal' GA 1 0 -1;
Contrast 'quadratic' GA 1 -2 1;
by Var;
Run; Quit;
1. [3 points] Describe the experimental design in detail using the table in the appendix.
Design: 3x3 factorial arranged in an RCBD with two reps per treatment combination per block
Response Variable: Mean individual berry weight (g)
Experimental Unit: 10-plant plot
Class
Variable
Block or
Treatment
Number
of
Levels
Fixed or
Random Description
1 Block 3 Random Vineyard sections
2 Treatment 3 Fixed Three table grape varieties
3 Treatment 3 Fixed GA application concentration (ppm)
Subsamples? NO
Covariable? NO
2. [2 points] Test for block*treatment interactions, normality of residuals, and homogeneity of variances.
Source DF Type III SS Mean Square F Value Pr > F
Block 2 2.77231111 1.38615556 31.39 <.0001
GA 2 11.07067778 5.53533889 125.36 <.0001
Block*GA 4 0.13141111 0.03285278 0.74 0.5705
Var 2 4.89293333 2.44646667 55.41 <.0001
Block*Var 4 0.02845556 0.00711389 0.16 0.9562
Gib*Var 4 0.23568889 0.05892222 1.33 0.2827
Block*GA*Var 8 0.36292222 0.04536528 1.03 0.4401
Since our design includes two replications per block, we can include block*treatment interactions in an
exploratory model. Block*GA (p = 0.5705), Block*Variety (p = 0.9562), and Block*GA*Treatment (p =
0.4401) interactions were all not significant. We can assume additivity between blocks and treatments.
Tests for Normality
Test Statistic p Value
Shapiro-Wilk W 0.974229 Pr < W 0.2938
The Shapiro-Wilk test resulted in a W-statistic = 0.974229 and a p = 0.2938. We can conclude the
residuals are normally distributed.
Levene's Test for Homogeneity of Wt Variance
ANOVA of Squared Deviations from Group Means
Source DF Sum of Squares Mean Square F Value Pr > F
GA 2 0.00145 0.000727 0.02 0.9832
Error 51 2.1929 0.0430
Levene’s test for the GA treatment resulted in a p = 0.9832. We can conclude variances among GA
concentrations are homogeneous.
Levene's Test for Homogeneity of Wt Variance
ANOVA of Squared Deviations from Group Means
Source DF Sum of Squares Mean Square F Value Pr > F
Var 2 0.2646 0.1323 1.37 0.2626
Error 51 4.9159 0.0964
Levene’s test for the variety treatment resulted in a p = 0.2626. We can conclude variances among
varieties are homogeneous.
3. [4 points] Perform ANOVA with the correct model and discuss the results.
R-Square Coeff Var Root MSE Wt Mean
0.917097 3.644315 0.199708 5.480000
Source DF Type III SS Mean Square F Value Pr > F
Block 2 2.77231111 1.38615556 34.76 <.0001
GA 2 11.07067778 5.53533889 138.79 <.0001
Var 2 4.89293333 2.44646667 61.34 <.0001
GA*Var 4 0.23568889 0.05892222 1.48 0.2258
The reduced model ANOVA explains 91.7% of the variation in the data, as indicated by the r-squared
value. The effects of GA concentration (p < 0.0001) and variety (p < 0.0001) on berry weight were both
highly significant. Block effects were also highly significant (p < 0.0001). ANOVA did not show a
significant interaction between GA and variety (p = 0.2258)
4. [3 points] Present an interaction plot of GA concentration by variety on the effect of berry weight.
Comment on the interaction plot in light of the ANOVA results.
Although the ANOVA results showed the GA*Variety interaction was not significant, the above plot
suggests otherwise. The slopes of the lines representing Thompson Seedless and Variety 1 are more or
less parallel; however, the line representing Variety 2 intersects that of Variety 1, suggesting there may be
some hidden interaction not detected by ANOVA.
5. [5 points] Are any of the components of the GA*Variety interaction significant?
Contrast DF Contrast SS Mean Square F Value Pr > F
Control vs new 1 4.66253333 4.66253333 116.90 <.0001
NewVar 1 0.23040000 0.23040000 5.78 0.0206
Lin 1 11.04454444 11.04454444 276.92 <.0001
Quad 1 0.02613333 0.02613333 0.66 0.4227
Lin*NV 1 0.23010417 0.23010417 5.77 0.0207
Lin*contvsnew 1 0.00073472 0.00073472 0.02 0.8927
Quad*NV 1 0.00031250 0.00031250 0.01 0.9299
Quad*contvsnew 1 0.00453750 0.00453750 0.11 0.7375
According to the analysis, there is an interaction between the lineal response of GA concentration and the
two new varieties.
6. [6 points]Based on your answer to question 5, answer the following questions using the appropriate
analyses:
Since the contrast Lin x New varieties is significant, then it is better to analyze the
simple effects.
Contrasts of simple effects of variety by GA:
GA=0
Contrast DF Contrast SS Mean Square F Value Pr > F
Control vs New 1 1.44000000 1.44000000 39.55 <.0001
New 1 0.00480000 0.00480000 0.13 0.7224
GA=10
Contrast DF Contrast SS Mean Square F Value Pr > F
Control vs New 1 1.69433611 1.69433611 36.84 <.0001
New 1 0.08500833 0.08500833 1.85 0.1971
GA=20
Contrast DF Contrast SS Mean Square F Value Pr > F
Control vs New 1 1.53346944 1.53346944 38.91 <.0001
New 1 0.37100833 0.37100833 9.41 0.0090
a. Was there a significant difference in berry weight between Thompson Seedless and the two new
varieties?
At all levels of GA the new varieties are better than the control (p < 0.0001).
b. Was there a significant difference in berry weight between the two new varieties?
The analysis by GA indicates that the New varieties are significantly different only at the highest
level of GA (p = 0.0090).
Contrasts of simple effects of GA by variety:
Var=TS
Contrast DF Contrast SS Mean Square F Value Pr > F
lineal 1 3.59707500 3.59707500 99.17 <.0001
quadratic 1 0.02200278 0.02200278 0.61 0.4500
Var=Var1
Contrast DF Contrast SS Mean Square F Value Pr > F
lineal 1 5.14830000 5.14830000 108.85 <.0001
quadratic 1 0.00284444 0.00284444 0.06 0.8101
Var=Var2
Contrast DF Contrast SS Mean Square F Value Pr > F
lineal 1 2.53000833 2.53000833 54.81 <.0001
quadratic 1 0.00613611 0.00613611 0.13 0.7213
c. How would you describe the response of berry weight to GA concentration?
In all the varieties the GA response is lineal (p < 0.0001).
7. [2 points] What recommendations would you make to the breeder if the difference in cost between the
10 and 20 ppm GA applications is small?
Since the response to GA is lineal, the highest GA produces the biggest berries;at the highest GA
concentration (20 ppm) the new variety 1 produced bigger berries than variety 2. Furthermore, if variety 1
produces bigger berries at 20 ppm GA compared with 10 ppm, the best combination is variety 1 at 20
ppm. Alternatively:
Ryan-Einot-Gabriel-Welsch Multiple Range Test for Wt
Alpha 0.05
Error Degrees of Freedom 43
Error Mean Square 0.039883
Number of Means 2 3 4 5 6 7 8 9
Critical Range 0.3050541 0.3312879 0.3455767 0.3551772 0.3623306 0.367953 0.367953 0.3764065
Means with the same letter
are not significantly different.
REGWQ Grouping Mean N Id
A 6.4317 6 8
B 6.0800 6 9
C 5.7500 6 5
C 5.6367 6 7
C 5.5817 6 6
Means with the same letter
are not significantly different.
REGWQ Grouping Mean N Id
D 5.1617 6 3
D 5.1217 6 2
D 5.0150 6 4
E 4.5417 6 1
Because this experiment is balanced, we can compare means using the REGWQ test, which controls EER
but is more sensitive than Tukey’s test. According to REGWQ, the largest mean berry size was produced
by variety 1 vines receiving GA application at 20 ppm. Although, berry weights were similar in varieties
1 and 2 at 0 and 10 ppm, the differences in response to GA concentration between the two varieties
resulted in a more pronounced effect in variety 1 at 20 ppm. The breeder should release variety 1.
Problem 4 [5 points]
Two levels of Nitrogen (N0 and N1) and two levels of Potassium (K0 and K1) are tested in a 2 x 2
factorial organized in a RCBD with three blocks. A third factor, Varieties (A, B, and C) is added as a split
plot of the Nitrogen Potassium combinations. Show the lay out of the field for this experiment
N0 K0 A N1 K1 B N1 K0 C N0 K1 C
N0 K0 C N1 K1 A N1 K0 A N0 K1 A
N0 K0 B N1 K1 C N1 K0 B N0 K1 B
N1 K1 B N0 K0 A N0 K1 C N1 K0 A
N1 K1 C N0 K0 B N0 K1 A N1 K0 C
N1 K1 A N0 K0 C N0 K1 B N1 K0 B
N0 K1 C N1 K0 A N0 K0 C N1 K1 A
N0 K1 B N1 K0 B N0 K0 B N1 K1 B
N0 K1 A N1 K0 C N0 K0 A N1 K1 C
Problem 5 [25 points]
Black point is a common disease of wheat in the Sacramento region. The incidence of the disease is
estimated as the % of grains with a black discoloration at the end of the grain. A researcher wants to test
the differences in resistance among four specific varieties (designated 1 to 4) and three fungicides
(designated 1-3). He selects three homogeneous blocks of land and divides each in 4 large plots, and
randomizes the four varieties separately in each plot. He plants the field in a North-South direction,
changing variety in each block. By head emergence he cut two aisles in a West-East direction dividing
each block in three horizontal sections. He then drives his tractor in a West-East zigzag applying only one
fungicide in each pass through the block. The order in which the three fungicides will be applied is
randomized independently in each of the blocks. A design of the field is included below. Since Black
point is affected by lodging (the falling spikes are more likely to show the disease), the researcher records
the lodging of each of the 12 plots in each block after the fungicide was applied and before harvest. The
data for the percentage of grains with black point and the % lodging in each plot is included in the Table
below the graph of the field.
Data Fungi;
Input Bl Var Fun Y X;
Z = Y - 3.82630208*(X-15.94444); Cards; 1 1 1 39.6 14 2 1 1 52.5 17 3 1 1 47.1 15 1 1 2 54.5 16 2 1 2 63.5 17 3 1 2 63.0 16 1 1 3 60.4 17 2 1 3 68.6 19 3 1 3 67.4 18 1 2 1 55.2 15 2 2 1 55.2 16 3 2 1 61.5 16 1 2 2 76.7 16 2 2 2 60.6 15 3 2 2 68.0 16 1 2 3 78.5 16 2 2 3 62.7 14 3 2 3 80.6 18 1 3 1 38.9 15 2 3 1 58.3 16 3 3 1 45.5 16 1 3 2 73.4 16 2 3 2 53.3 15 3 3 2 67.2 16 1 3 3 63.7 15 2 3 3 66.2 17 3 3 3 73.1 17 1 4 1 38.6 15 2 4 1 46.3 16 3 4 1 51.3 16 1 4 2 56.4 15 2 4 2 63.2 16 3 4 2 59.6 15 1 4 3 65.3 16 2 4 3 50.2 13 3 4 3 70.4 18 ;
Proc GLM Data = Fungi;
Title 'One-way ANOVAs for X and Y';
Class Bl Var Fun;
Model X Y = Bl Var Bl*Var Fun Bl*Fun Var*Fun;
Random Bl Bl*Var Bl*Fun /test;
Proc GLM;
Title 'General regression';
Model Y = X;
Proc GLM Order = Data;
Title 'The ANCOVA';
Class Bl Var Fun;
Model Y = Bl Var Bl*Var Fun Bl*Fun Var*Fun X /Solution;
Random Bl Bl*Var Bl*Fun /test;
Output out = FungiPR p = Pred r = Res;
LSMeans Var/ StdErr Pdiff Adjust = Tukey;
LSMeans Fun/ StdErr Pdiff Adjust = Tukey;
Proc Univariate Data = FungiPR normal;
Title 'Normality of residuals in ANCOVA';
Var Res;
Proc GLM Data = Fungi;
Title 'ANOVA on Z';
Class Bl Var Fun;
Model Z = Bl Var Bl*Var Fun Bl*Fun Var*Fun;
Random Bl Bl*Var Bl*Fun /test;
Output out = FungiPRz p = Predz r = Resz;
Means Var/ Tukey; * or LSMean statement also correct;
Means Fun/ Tukey;
Proc Univariate Data = FungiPRz normal;
Title 'Normality of residuals using z';
Var Resz;
Proc Plot Data = FungiPRz;
Plot Resz*Predz = Var;
Proc GLM;
Title 'Homogeneity of variances Var';
Class Var ;
Model Z = Var;
Means Var / hovtest = Levene;
Proc GLM;
Title 'Homogeneity of variances Fun';
Class Fun;
Model Z = Fun;
Means Fun / hovtest = Levene;
Proc GLM;
Title 'Homogeneity of slopes Var';
Class Bl Var;
Model Z = Bl Var X Var*X;
Proc GLM;
Title 'Homogeneity of slopes Fun';
Class Bl Fun;
Model Z = Bl Fun X Fun*X;
Proc GLM;
Title 'Homogeneity of slopes Combinations Fun*Var not necessary';
Class Bl Var Fun;
Model Z = Bl Var Bl*Var Fun Bl*Fun Var*Fun Var*Fun*X;
Run;Quit;
Class Level Information
Class Levels Values
Bl 3 1 2 3
Var 4 1 2 3 4
Fun 3 1 2 3
Number of Observations Read 36
Number of Observations Used 36
One-way ANOVAs for X and Y
Dependent Variable: X
Sum of
Source DF Squares Mean Square F Value Pr > F
Model 23 41.22222222 1.79227053 2.02 0.1039
Error 12 10.66666667 0.88888889
Corrected Total 35 51.88888889
R-Square Coeff Var Root MSE X Mean
0.794433 5.913088 0.942809 15.94444
Source DF Type III SS Mean Square F Value Pr > F
Bl 2 5.05555556 2.52777778 2.84 0.0975
Var 3 5.00000000 1.66666667 1.88 0.1876
Bl*Var 6 9.83333333 1.63888889 1.84 0.1728
Fun 2 5.72222222 2.86111111 3.22 0.0760
Bl*Fun 4 9.11111111 2.27777778 2.56 0.0926
Var*Fun 6 6.50000000 1.08333333 1.22 0.3616
Dependent Variable: Y
Sum of
Source DF Squares Mean Square F Value Pr > F
Model 23 3694.325278 160.622838 4.53 0.0046
Error 12 425.384444 35.448704
Corrected Total 35 4119.709722
R-Square Coeff Var Root MSE Y Mean
0.896744 9.939241 5.953881 59.90278
Source DF Type III SS Mean Square F Value Pr > F
Bl 2 160.817222 80.408611 2.27 0.1460
Var 3 613.705278 204.568426 5.77 0.0111
Bl*Var 6 347.280556 57.880093 1.63 0.2211
Fun 2 2169.557222 1084.778611 30.60 <.0001
Bl*Fun 4 368.257778 92.064444 2.60 0.0897
Var*Fun 6 34.707222 5.784537 0.16 0.9820
Source Type III Expected Mean Square
Bl Var(Error) + 4 Var(Bl*Fun) + 3 Var(Bl*Var) + 12 Var(Bl)
Var Var(Error) + 3 Var(Bl*Var) + Q(Var,Var*Fun)
Bl*Var Var(Error) + 3 Var(Bl*Var)
Fun Var(Error) + 4 Var(Bl*Fun) + Q(Fun,Var*Fun)
Bl*Fun Var(Error) + 4 Var(Bl*Fun)
Var*Fun Var(Error) + Q(Var*Fun)
Dependent Variable: X
Source DF Type III SS Mean Square F Value Pr > F
Bl 2 5.055556 2.527778 0.83 0.4860
Error 5.0633 15.330504 3.027778
Error: MS(Bl*Var) + MS(Bl*Fun) - MS(Error)
Source DF Type III SS Mean Square F Value Pr > F
* Var 3 5.000000 1.666667 1.02 0.4484
Error: MS(Bl*Var) 6 9.833333 1.638889
Source DF Type III SS Mean Square F Value Pr > F
Bl*Var 6 9.833333 1.638889 1.84 0.1728
Bl*Fun 4 9.111111 2.277778 2.56 0.0926
Var*Fun 6 6.500000 1.083333 1.22 0.3616
Error: MS(Error) 12 10.666667 0.888889
Source DF Type III SS Mean Square F Value Pr > F
* Fun 2 5.722222 2.861111 1.26 0.3773
Error: MS(Bl*Fun) 4 9.111111 2.277778
Dependent Variable: Y
Source DF Type III SS Mean Square F Value Pr > F
Bl 2 160.817222 80.408611 0.70 0.5408
Error 4.7121 539.518861 114.495833
Error: MS(Bl*Var) + MS(Bl*Fun) - MS(Error)
Source DF Type III SS Mean Square F Value Pr > F
* Var 3 613.705278 204.568426 3.53 0.0880
Error: MS(Bl*Var) 6 347.280556 57.880093
Source DF Type III SS Mean Square F Value Pr > F
Bl*Var 6 347.280556 57.880093 1.63 0.2211
Bl*Fun 4 368.257778 92.064444 2.60 0.0897
Var*Fun 6 34.707222 5.784537 0.16 0.9820
Error: MS(Error) 12 425.384444 35.448704
Source DF Type III SS Mean Square F Value Pr > F
* Fun 2 2169.557222 1084.778611 11.78 0.0211
Error: MS(Bl*Fun) 4 368.257778 92.064444
General regression Dependent Variable: Y
Sum of
Source DF Squares Mean Square F Value Pr > F
Model 1 1199.737046 1199.737046 13.97 0.0007
Error 34 2919.972677 85.881549
Corrected Total 35 4119.709722
R-Square Coeff Var Root MSE Y Mean
0.291219 15.47045 9.267230 59.90278
Source DF Type I SS Mean Square F Value Pr > F
X 1 1199.737046 1199.737046 13.97 0.0007
Parameter Estimate Error t Value Pr > |t|
Intercept -16.76541756 20.57073476 -0.82 0.4207
X 4.80845824 1.28650877 3.74 0.0007
The ANCOVA Sum of
Source DF Squares Mean Square F Value Pr > F
Model 24 3850.491546 160.437148 6.56 0.0012
Error 11 269.218176 24.474380
Corrected Total 35 4119.709722
R-Square Coeff Var Root MSE Y Mean
0.934651 8.258647 4.947159 59.90278
Source DF Type III SS Mean Square F Value Pr > F
Bl 2 39.129919 19.564960 0.80 0.4741
Var 3 705.515872 235.171957 9.61 0.0021
Bl*Var 6 111.537826 18.589638 0.76 0.6160
Fun 2 1318.414157 659.207078 26.93 <.0001
Bl*Fun 4 93.050956 23.262739 0.95 0.4714
Var*Fun 6 71.641933 11.940322 0.49 0.8046
X 1 156.166268 156.166268 6.38 0.0282
Average SLOPE
Standard
Parameter Estimate Error t Value Pr > |t|
Intercept 3.43035301 B 26.39826327 0.13 0.8990
Bl 1 -1.42677951 B 5.67330227 -0.25 0.8061
….
X 3.82630208 1.51475183 2.53 0.0282
Average slope 3.82630208
Source Type III Expected Mean Square
Bl Var(Error) + 3.3569 Var(Bl*Fun) + 2.5177 Var(Bl*Var) + 10.071 Var(Bl)
Var Var(Error) + 2.6809 Var(Bl*Var) + Q(Var,Var*Fun)
Bl*Var Var(Error) + 2.7602 Var(Bl*Var)
Fun Var(Error) + 3.3017 Var(Bl*Fun) + Q(Fun,Var*Fun)
Bl*Fun Var(Error) + 3.5393 Var(Bl*Fun)
Var*Fun Var(Error) + Q(Var*Fun)
X Var(Error) + Q(X)
Tests of Hypotheses for Mixed Model Analysis of Variance
Dependent Variable: Y
Source DF Type III SS Mean Square F Value Pr > F
Bl 2 39.129919 19.564960 1.09 0.5075
Error 1.5359 27.581309 17.957457
Error: 0.9121*MS(Bl*Var) + 0.9485*MS(Bl*Fun) - 0.8606*MS(Error)
Source DF Type III SS Mean Square F Value Pr > F
* Var 3 705.515872 235.171957 12.54 0.0043
Error 6.4711 121.390464 18.758732
Error: 0.9713*MS(Bl*Var) + 0.0287*MS(Error)
Source DF Type III SS Mean Square F Value Pr > F
Bl*Var 6 111.537826 18.589638 0.76 0.6160
Bl*Fun 4 93.050956 23.262739 0.95 0.4714
Var*Fun 6 71.641933 11.940322 0.49 0.8046
X 1 156.166268 156.166268 6.38 0.0282
Error: MS(Error) 11 269.218176 24.474380
Source DF Type III SS Mean Square F Value Pr > F
* Fun 2 1318.414157 659.207078 28.24 0.0026
Error 4.6191 107.828046 23.344089
Error: 0.9329*MS(Bl*Fun) + 0.0671*MS(Error)
Least Squares Means
Adjustment for Multiple Comparisons: Tukey-Kramer
Standard LSMEAN
Var Y LSMEAN Error Pr > |t| Number
1 55.0617043 1.8911008 <.0001 1
2 67.1932726 1.6682658 <.0001 2
3 60.1681279 1.6511987 <.0001 3
4 57.1880064 1.7511080 <.0001 4
Least Squares Means for effect Var
Pr > |t| for H0: LSMean(i)=LSMean(j)
Dependent Variable: Y
i/j 1 2 3 4
1 0.0034 0.2422 0.8686
2 0.0034 0.0504 0.0064
3 0.2422 0.0504 0.6110
4 0.8686 0.0064 0.6110
Standard LSMEAN
Fun Y LSMEAN Error Pr > |t| Number
1 50.5483869 1.5292919 <.0001 1
2 64.0273365 1.4581778 <.0001 2
3 65.1326100 1.6576195 <.0001 3
Least Squares Means for effect Fun
Pr > |t| for H0: LSMean(i)=LSMean(j)
Dependent Variable: Y
i/j 1 2 3
1 0.0001 0.0003
2 0.0001 0.8834
3 0.0003 0.8834
Normality of residuals in ANCOVA
Test --Statistic--- -----p Value------
Shapiro-Wilk W 0.979885 Pr < W 0.8906
ANOVA on Z
Z = Y - 3.82630208*(X-15.94444); Sum of
Source DF Squares Mean Square F Value Pr > F
Model 23 2700.808117 117.426440 5.23 0.0024
Error 12 269.218176 22.434848
Corrected Total 35 2970.026293
R-Square Coeff Var Root MSE Z Mean
0.909355 7.907054 4.736544 59.90276
Source DF Type III SS Mean Square F Value Pr > F
Bl 2 41.371442 20.685721 0.92 0.4241
Var 3 756.249312 252.083104 11.24 0.0008
Bl*Var 6 117.650450 19.608408 0.87 0.5413
Fun 2 1582.413105 791.206553 35.27 <.0001
Bl*Fun 4 107.136797 26.784199 1.19 0.3628
Var*Fun 6 95.987011 15.997835 0.71 0.6463
Source Type III Expected Mean Square
Bl Var(Error) + 4 Var(Bl*Fun) + 3 Var(Bl*Var) + 12 Var(Bl)
Var Var(Error) + 3 Var(Bl*Var) + Q(Var,Var*Fun)
Bl*Var Var(Error) + 3 Var(Bl*Var)
Fun Var(Error) + 4 Var(Bl*Fun) + Q(Fun,Var*Fun)
Bl*Fun Var(Error) + 4 Var(Bl*Fun)
Var*Fun Var(Error) + Q(Var*Fun)
Tests of Hypotheses for Mixed Model Analysis of Variance
Dependent Variable: Z
Source DF Type III SS Mean Square F Value Pr > F
Bl 2 41.371442 20.685721 0.86 0.5362
Error 2.0113 48.186457 23.957759
Error: MS(Bl*Var) + MS(Bl*Fun) - MS(Error)
Source DF Type III SS Mean Square F Value Pr > F
* Var 3 756.249312 252.083104 12.86 0.0051
Error: MS(Bl*Var) 6 117.650450 19.608408
Source DF Type III SS Mean Square F Value Pr > F
Bl*Var 6 117.650450 19.608408 0.87 0.5413
Bl*Fun 4 107.136797 26.784199 1.19 0.3628
Var*Fun 6 95.987011 15.997835 0.71 0.6463
Error: MS(Error) 12 269.218176 22.434848
Source DF Type III SS Mean Square F Value Pr > F
* Fun 2 1582.413105 791.206553 29.54 0.0040
Error: MS(Bl*Fun) 4 107.136797 26.784199
SAME RESULTS AS ANCOVA!
Least Squares Means
Adjustment for Multiple Comparisons: Tukey
Standard LSMEAN
Var Z LSMEAN Error Pr > |t| Number
1 55.0616873 1.5788480 <.0001 1
2 67.1932556 1.5788480 <.0001 2
3 60.1681109 1.5788480 <.0001 3
4 57.1879894 1.5788480 <.0001 4
Least Squares Means for effect Var
Pr > |t| for H0: LSMean(i)=LSMean(j)
Dependent Variable: Z
i/j 1 2 3 4
1 0.0008 0.1557 0.7780
2 0.0008 0.0368 0.0036
3 0.1557 0.0368 0.5600
4 0.7780 0.0036 0.5600
Standard LSMEAN
Fun Z LSMEAN Error Pr > |t| Number
1 50.5483699 1.3673224 <.0001 1
2 64.0273195 1.3673224 <.0001 2
3 65.1325929 1.3673224 <.0001 3
Least Squares Means for effect Fun
Pr > |t| for H0: LSMean(i)=LSMean(j)
Dependent Variable: Z
i/j 1 2 3
1 <.0001 <.0001
2 <.0001 0.8375
3 <.0001 0.8375
Normality of residuals using z
Tests for Normality
Test --Statistic--- -----p Value------
Shapiro-Wilk W 0.979885 Pr < W 0.8906
Plot of Resz*Predz. Symbol is value of Var.
Plot of Resz*Predz. Symbol is value of Var.
8 ˆ
‚ 3
‚
‚
‚
‚
6 ˆ
‚
‚
‚ 3
‚
‚
4 ˆ 1
‚
‚
Resz ‚ 4 3
‚ 4
‚ 1 2
2 ˆ 4
‚ 2
‚ 1 2
‚ 3
‚ 2
‚ 4 1
0 ˆ 1
‚ 2 1 4
‚ 4 2
‚ 1 3 2
‚
‚ 2
-2 ˆ 2 34
‚ 4
‚ 4
‚ 1
‚
‚ 3 1
-4 ˆ 3
‚
‚
‚
‚
‚
-6 ˆ 3
Šƒˆƒƒƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒƒƒˆƒƒ
40 45 50 55 60 65 70 75 80
Predz
Homogeneity of variances Var
Levene's Test for Homogeneity of Z Variance
Sum of Mean
Source DF Squares Square F Value Pr > F
Var 3 24941.5 8313.8 1.64 0.1996
Error 32 162209 5069.0
Homogeneity of variances Fun
Levene's Test for Homogeneity of Z Variance
Sum of Mean
Source DF Squares Square F Value Pr > F
Fun 2 47.7960 23.8980 0.01 0.9885
Error 33 68013.9 2061.0
Variances are homogeneous
Homogeneity of Slopes for Variety:
Source DF Type III SS Mean Square F Value Pr > F
Block 2 69.662038 34.831019 0.47 0.6302
Variety 3 124.837767 41.612589 0.56 0.6452
X 1 1179.312568 1179.312568 15.91 0.0005
X*Variety 3 117.541162 39.180387 0.53 0.6665
Homogeneity of Slopes for Fungicide:
Source DF Type III SS Mean Square F Value Pr > F
Block 2 95.1473158 47.5736579 1.09 0.3499
Fungicide 2 156.2513999 78.1257000 1.79 0.1854
X 1 483.9957565 483.9957565 11.09 0.0024
X*Fungicide 2 114.1416994 57.0708497 1.31 0.2864
Slopes are homogeneous
ANSWERS TO QUESTIONS
1. [5 points] Are there significant differences among varieties and among fungicides in the percentage of
black point, once the values were adjusted for lodging?
Yes both Var and Fun showed significant differences once the values were adjusted for lodging
Source DF Type III SS Mean Square F Value Pr > F
* Var 3 705.515872 235.171957 12.54 0.0043
Error 6.4711 121.390464 18.758732
Error: 0.9713*MS(Bl*Var) + 0.0287*MS(Error)
Source DF Type III SS Mean Square F Value Pr > F
* Fun 2 1318.414157 659.207078 28.24 0.0026
Error 4.6191 107.828046 23.344089
Error: 0.9329*MS(Bl*Fun) + 0.0671*MS(Error)
2. [5 points] Are the differences the same if the values are not adjusted for lodging? If different provide
a potential explanation of the source of the discrepancies.
The differences for Varieties were not significant in the ANOVA for the unadjusted values and the
differences among fungicides were less significant. Since there is no effect of treatments on lodging, the
simplest explanation is that the differences in lodging were generating additional variability in the % of
black point, and that once that variability was eliminated the ANCOVA had more power to see the
differences among varieties and among fungicides.
3. [3 points] Were the responses to fungicides different at the different varieties when the values were
corrected for lodging?
No. There is no significant interaction between varieties and fungicide
Source DF Type III SS Mean Square F Value Pr > F
Bl*Var 6 111.537826 18.589638 0.76 0.6160
Bl*Fun 4 93.050956 23.262739 0.95 0.4714
Var*Fun 6 71.641933 11.940322 0.49 0.8046
X 1 156.166268 156.166268 6.38 0.0282
Error: MS(Error) 11 269.218176 24.474380
4. [5 points] Based on the previous answer (and using the adjusted values) use the most sensitive fixed
range mean comparison test controlling the experiment wise error rate to compare all four varieties
and all three fungicides separately. What would be your recommendation?
The correct analysis is for the main effects Variety and Fungicide separately. Using the Tukey test we find
that variety 2 performs significantly worse than the other three varieties (higher infection) and that the
other 3 varieties were not significantly different among each other
Var Z LSMEAN Error Pr > |t| Number
1 55.0616873 1.5788480 <.0001 1
2 67.1932556 1.5788480 <.0001 2
3 60.1681109 1.5788480 <.0001 3
4 57.1879894 1.5788480 <.0001 4
i/j 1 2 3 4
1 0.0008 0.1557 0.7780
2 0.0008 0.0368 0.0036
3 0.1557 0.0368 0.5600
4 0.7780 0.0036 0.5600
Fungicide 1 showed significantly lower values than fungicides 2 and 3 that did not differed from each other
significantly
Standard LSMEAN
Fun Z LSMEAN Error Pr > |t| Number
1 50.5483699 1.3673224 <.0001 1
2 64.0273195 1.3673224 <.0001 2
3 65.1325929 1.3673224 <.0001 3
Least Squares Means for effect Fun
Pr > |t| for H0: LSMean(i)=LSMean(j)
Dependent Variable: Z
i/j 1 2 3
1 <.0001 <.0001
2 <.0001 0.8375
3 <.0001 0.8375
The recommendation is to use fungicide 1 with any variety except variety 2
5. [4 points] Test all the required assumptions required to perform the test on the adjusted values
Residuals of the ANCOVA are normal Test --Statistic--- -----p Value------
Shapiro-Wilk W 0.979885 Pr < W 0.8906
Both Variety and Fungicide showed homogeneity of variances by Levene’s test Levene's Test for Homogeneity of Z Variance
Sum of Mean
Source DF Squares Square F Value Pr > F
Var 3 24941.5 8313.8 1.64 0.1996
Error 32 162209 5069.0
Sum of Mean
Source DF Squares Square F Value Pr > F
Fun 2 47.7960 23.8980 0.01 0.9885
Error 33 68013.9 2061.0
The slopes for the regression are homogeneous among Varieties and among fungicides
Homogeneity of Slopes for Variety:
Source DF Type III SS Mean Square F Value Pr > F
Block 2 69.662038 34.831019 0.47 0.6302
Variety 3 124.837767 41.612589 0.56 0.6452
X 1 1179.312568 1179.312568 15.91 0.0005
X*Variety 3 117.541162 39.180387 0.53 0.6665
Homogeneity of Slopes for Fungicide:
Source DF Type III SS Mean Square F Value Pr > F
Block 2 95.1473158 47.5736579 1.09 0.3499
Fungicide 2 156.2513999 78.1257000 1.79 0.1854
X 1 483.9957565 483.9957565 11.09 0.0024
X*Fungicide 2 114.1416994 57.0708497 1.31 0.2864
6. [3 points] Was the test with the adjusted values more efficient than the test with the unadjusted
values? Quantify the difference.
Relative efficiency of the ANCOVA to an ANOVA for %Black Point.
The effective error MS after adjustment for X is given by
An estimate of the relative precision is 35.448704 / 28.5867 = 1.24. This indicates that the covariance
analysis provides 24% more information per measurement than the ANOVA.
Appendix
5867.28666.10*23
222.41124.474380
)1(1
var
var
iableX
iableX
YAdjustedError
SSErrort
SSTRT
MS
When you are asked to "describe in detail the design of this experiment," please do so by completing the
following template:
Design:
Response Variable:
Experimental Unit:
Class
Variable
Block or
Treatment
Number of
Levels
Fixed or
Random Description
1
2
↓
n
Subsamples? YES / NO
Covariable? YES / NO