CSS 590 Experimental Design in Agriculture Lab exercise – 8th week Split Plot Analysis Strip Plot (optional exercise) Repeated Measures Suggested reading: Kuehl Pages 469-513 SAS On-line Documentation GLM Procedure MIXED Procedure PROC GLIMMIX Part I: Split Plot Analysis In agricultural experimentation, we may have a factor in our treatment arrangement that requires large plots for application. To conserve space and resources, we may apply another factor to sub-plots of the larger treatment factor. In agricultural application, this is called splitplot. In the broader context of experimentation, it is called repeated measure in one factor. 1. From the class website, download the data file Lab8_split-plot.xls. This experiment is a split-plot, with nitrogen levels as main plots and rice varieties as sub-plots. The response variable is yield. Write a SAS program to input your data. You may assume that the data conforms to the assumptions for ANOVA. 2. For a split-plot analysis, you must specify the block*main plot interaction (error a) in your model statement: PROC GLM DATA = Nitro; TITLE 'SPLIT-PLOT Analysis'; CLASS Block Nitrogen variety; MODEL Yield = Block Nitrogen Block*Nitrogen Variety Nitrogen*variety; 3. You will also need to tell SAS to use ‘error a’ to test your main plot and block effects, and to calculate standard errors. TEST H=Nitrogen E=Block*Nitrogen; TEST H=Block E=Block*Nitrogen; LSMEANS Nitrogen /stderr E=Block*Nitrogen; LSMEANS Variety /stderr; LSMEANS Nitrogen*Variety/stderr; RUN; Why are the resulting F values different for the TEST output and the initial ANOVA? Which is the correct value to use for testing significance? Explain why. 4. Based on the ANOVA, how would you interpret the results of this experiment? 1 5. We must also specify the appropriate error term for any contrast involving main effects. We also need to be careful that the order of contrast coefficients we define for the interactions corresponds to the order in which SAS is sorting the means. CONTRAST 'N linear' Nitrogen -1 0 1/ E=Block*Nitrogen; CONTRAST 'N quadratic' Nitrogen -1 2 -1/ E=Block*Nitrogen; CONTRAST 'Variety x N linear' Nitrogen*variety -1 1 0 0 1 -1; CONTRAST 'Variety x N quadratic' Nitrogen*variety -1 1 2 -2 -1 1; RUN; What do the results of the contrasts tell us about the response of these varieties to nitrogen? 6. Obtain a graph of the results to aid in interpretation. PROC MEANS nway; Title 'Means for interactions'; CLASS Nitrogen variety; VAR Yield; OUTPUT out=new mean=; RUN; PROC GPLOT data=new; Title 'Effect of Nitrogen on Yield'; PLOT Yield*Nitrogen=variety; SYMBOL1 i=join value=dot; RUN; 7. As an alternative to using the TEST statement to obtain appropriate F tests, you can use a RANDOM statement to specify which effects are random, which will generate Expected Mean Squares for the model. The RANDOM statement with the TEST option tells SAS to go ahead and perform the appropriate F tests. PROC GLM DATA = Nitro; TITLE 'SPLIT-PLOT Analysis with a RANDOM statement'; CLASS Block Nitrogen Variety; MODEL Yield = Block Nitrogen Block*Nitrogen Variety Nitrogen*variety; RANDOM Block Block*Nitrogen/TEST; RUN; You would still need to specify the appropriate error term for standard errors, mean comparison tests, and contrasts. 2 8. PROC MIXED can also be used to analyze a split-plot experiment. The MODEL statement should only include fixed effects. PROC MIXED will determine the appropriate F tests for fixed effects, and use the appropriate error terms to calculate standard errors and contrasts, and to perform mean comparison tests. Additionally, PROC MIXED will perform mean comparison tests at the sub-plot level (Nitrogen*Variety). PROC MIXED DATA = Nitro; TITLE 'SPLIT-PLOT Analysis using PROC MIXED'; CLASS Block Nitrogen Variety; MODEL Yield = Nitrogen Variety Nitrogen*Variety; RANDOM Block Block*Nitrogen; LSMEANS Variety Nitrogen Nitrogen*Variety/pdiff; CONTRAST 'N linear' Nitrogen -1 0 1; CONTRAST 'N quadratic' Nitrogen -1 2 -1; CONTRAST 'Variety x N linear' Nitrogen*Variety -1 1 0 0 1 -1; CONTRAST 'Variety x N quadratic' Nitrogen*Variety -1 1 2 -2 -1 1; RUN; Part II. Strip-plot (Split-block) analysis To analyze a strip-plot experiment, we can easily extend the principles we learned for analyzing a split-plot in SAS. An agronomist wanted to measure the effect of irrigation and nitrogen fertilizer on the yield of durum wheat. He decided to use a factorial set of treatments with the following levels: Irrigation: I0=None, I1=once, I2=twice Nitrogen: N1=25kg/ha, N2=50kg/ha, N3=75kg/ha 1. Input the data from the Lab8_strip-plot.xls file into SAS. 2. To analyze the strip plot we will specify which variables are random (in this case all of the error terms). SAS will then determine the Expected Mean Squares for each effect in the model. The ‘test’ option tells SAS to go ahead and perform the appropriate F tests. PROC GLM; CLASS block irrigation nitrogen; MODEL yield = block irrigation block*irrigation nitrogen block*nitrogen irrigation*nitrogen; RANDOM block block*irrigation block*nitrogen/test; RUN; 3. Based on the output for Expected Mean Squares, what is the appropriate F test for the Main effects (irrigation and nitrogen) in a strip-plot experiment? For the Blocks? (the answer should be straightforward for main effects, but tricky for blocks) 4. Based on the ANOVA, how would you interpret the results of this experiment? 5. If time permits, develop appropriate contrast statements to look at the nature of the response to irrigation and nitrogen (linear, quadratic, etc.) 3 Part III. Repeated Measures When repeated measurements are taken on the same experimental units over time, the residuals associated with multiple observations from a particular plot may be correlated (not independent). If the correlations are similar for all pairs of observations over time, then it may be possible to analyze the data as a split-plot, using time as the sub-plot. If the correlations are not the same, then some adjustments are needed. In this exercise we will first analyze a data set as a split-plot, and then compare results using the repeated statement in SAS to make both univariate and multivariate adjustments. Yield was determined for four varieties of alfalfa that were harvested at four times (cuttings) (Lab8_repeated.xls). The experiment was conducted as a CRD with five replications. (data were taken from a course taught by Prof. Dubcovsky at UC-Davis.) 1) Run the analysis as a split-plot. Since this is a CRD, we will use the rep(variety) MS as the error term for the main plots (varieties). Cuttings and varieties*cuttings can be tested using the residual as an error term (the default). Conduct LSD tests for varieties and cuttings. Remember to specify the appropriate error term if you do not wish to use the residual to calculate LSD. 2) Note how the data has been reformatted on the ‘repeated’ spreadsheet in the data file. Each cutting is now considered as another variable. Input this data set and run the repeated analysis. The option ‘nonuni’ suppresses the output of a separate analysis for each cutting. The ‘repeated’ statement will generate both a multivariate analysis (MANOVA) and a univariate ANOVA. PROC GLM; title 'repeated measures analysis'; class rep variety; model yield1 yield2 yield3 yield4=variety/ nouni; repeated cutting /printe; Note the two adjusted probabilities that are intended to correct for the unequal correlations among pairs of repeated measures. Compare these results with your split-plot analysis. 3) PROC MIXED has many features that are ideal for analysis of repeated measures (but beyond the scope of this course). Below is an example of an analysis that could be used to adjust for the error structure in this trial. The data input is the same as it was for the splitplot analysis of this data set. PROC MIXED data=one; title 'repeated measures using mixed models - unstructured'; class rep cutting variety; model yield=variety cutting variety*cutting; repeated cutting /subject=rep(variety)type=un r rcorr; run; The value of -2 Res Log Likelihood for this unstructured model can be compared to other models for repeated measures analyses that are available. Smaller values indicate a better fit for the model. The level of significance of the Null Model Likelihood Ratio Test shows how much better the current model is than an analysis that makes no adjustments for correlations among the errors. 4