EXST7015 Fall2011 Appendix 16

EXST7015 Fall2011 Appendix 16 - Statistical Techniques II...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Statistical Techniques II Split-plot and Repeated measures designs Appendix 16 SAS Example Page 300 1 dm'log;clear;output;clear'; 2 options ps=512 ls=121 nocenter nodate nonumber nolabel FORMCHAR="|----|+|---+=|-/\<>*"; 3 TITLE1 'Example of a split plot design'; 4 TITLE2 'The effect of manure level on Barley yield'; 5 6 ODS HTML style=minimal body='C:\SAS\Appendix16 SplitPlot (Barley)).html' ; NOTE: Writing HTML Body file: C:\SAS\Appendix16 SplitPlot (Barley)).html 7 FILENAME OUT1 'C:\SAS\Appendix16 SplitPlot (Barley))01.CGM'; 8 FILENAME OUT2 'C:\SAS\Appendix16 SplitPlot (Barley))02.CGM'; 9 10 *******************************************************************; 11 *** Example of a Split Plot Design ***; 12 *** Downloaded on January 11, 2007 from ***; 13 *** http://www.sci.usq.edu.au/staff/dunn/RWorkshop/split-R.html ***; 14 *** The data are from an experiment to measure the effect of ***; 15 *** manure on the yield of barley. Six Blocks of three whole ***; 16 *** plots were used, together with three varieties of barley. ***; 17 *** Each whole plot was divided into four subplots for the four ***; 18 *** levels of manure: 0, 0.01, 0.02 and 0.04 tons per acre. ***; 19 *******************************************************************; 20 21 DATA YIELD; INFILE CARDS MISSOVER; 22 INPUT Block Variety Manure Yield; 23 CARDS; NOTE: The data set WORK.YIELD has 72 observations and 4 variables. NOTE: DATA statement used (Total process time): real time 0.03 seconds cpu time 0.01 seconds 23 ! RUN; 96 ; 97 PROC PRINT DATA=YIELD; TITLE3 'RAW DATA LISTING'; RUN; NOTE: There were 72 observations read from the data set WORK.YIELD. NOTE: The PROCEDURE PRINT printed page 1. NOTE: PROCEDURE PRINT used (Total process time): real time 0.12 seconds cpu time 0.06 seconds 98 Example of a split plot design The effect of manure level on Barley yield RAW DATA LISTING Obs 1 2 3 4 5 6 7 8 99 NOTE: 99 100 101 102 103 NOTE: 103 NOTE: NOTE: NOTE: Block 1 1 1 1 1 1 1 1 Variety 1 1 1 1 2 2 2 2 Manure 0 1 2 4 0 1 2 4 Yield 111 130 157 174 117 114 161 141 . . . 65 66 67 68 69 70 71 72 6 6 6 6 6 6 6 6 2 2 2 2 3 3 3 3 0 1 2 4 0 1 2 4 89 82 86 104 97 99 119 121 PROC IML; IML Ready ! RESET PRINT; A={0 , 1 , 2 , 4}; ORPOL = ORPOL(A,3); multipliers = orpol`; run; Module MAIN is undefined in IML; cannot be RUN. ! QUIT; Exiting IML. The PROCEDURE IML printed page 2. PROCEDURE IML used (Total process time): real time 0.17 seconds cpu time 0.01 seconds Example of a split plot design The effect of manure level on Barley yield RAW DATA LISTING A 4 rows 1 col (numeric) 0 1 2 4 James P. Geaghan - Copyright 2011 Statistical Techniques II Split-plot and Repeated measures designs ORPOL 4 rows 0.5 0.5 0.5 0.5 4 cols -0.591608 -0.253546 0.0845154 0.7606388 multipliers 0.5640761 -0.322329 -0.644658 0.4029115 4 rows Appendix 16 SAS Example Page 301 (numeric) -0.286039 0.7627701 -0.572078 0.0953463 4 cols (numeric) 0.5 0.5 0.5 0.5 -0.591608 -0.253546 0.0845154 0.7606388 0.5640761 -0.322329 -0.644658 0.4029115 -0.286039 0.7627701 -0.572078 0.0953463 105 PROC MIXED DATA=YIELD CL covtest; 106 CLASSES Block Manure Variety; 107 TITLE3 'Split plot Analysis of Variance with PROC MIXED'; 108 TITLE4 'Default covariance structure is CS'; 109 MODEL YIELD = Variety | Manure / htype=3 outp=Resids; 110 RANDOM Block Block*Variety;* / group=variety; 111 lsmeans Variety | Manure / pdiff adjust=tukey CL; 112 contrast 'line even space' manure -3 -1 1 3; 113 contrast 'quad even space' manure -1 1 1 -1; 114 contrast 'cube even space' manure -1 3 -3 1; 115 contrast 'line orthoganal' manure -0.591608 -0.253546 0.0845154 0.7606388; 116 contrast 'quad orthoganal' manure 0.5640761 -0.322329 -0.644658 0.4029115; 117 contrast 'cube orthoganal' manure -0.286039 0.7627701 -0.572078 0.0953463; 118 ods output diffs=ppp lsmeans=mmm; 119 ods listing exclude diffs;* lsmeans; 120 run; NOTE:Convergence criteria met. NOTE: The data set WORK.MMM has 19 observations and 11 variables. NOTE: The data set WORK.PPP has 75 observations and 17 variables. NOTE: The data set WORK.RESIDS has 72 observations and 11 variables. NOTE: The PROCEDURE MIXED printed page 3. NOTE: PROCEDURE MIXED used (Total process time): real time 1.46 seconds cpu time 1.32 seconds 121 %include 'C:\SAS\pdmix800.sas'; 794 %pdmix800(ppp,mmm,alpha=0.05,sort=yes); PDMIX800 08.08.2003 processing 3.87677675 Tukey-Kramer values for Variety are 19.4054 (avg) 19.4054 (min) 19.4054 (max). 3.7726967782 Tukey-Kramer values for Manure are 11.8333 (avg) 11.8333 (min) 11.8333 (max). 4.8719573606 Tukey-Kramer values for Manure*Variety are 31.559 (avg) 26.4677 (min) 33.4682 (max). 795 RUN; 796 QUIT; Example of a split plot design The effect of manure level on Barley yield Split plot Analysis of Variance with PROC MIXED Default covariance structure is CS The Mixed Procedure Model Information Data Set Dependent Variable Covariance Structure Estimation Method Residual Variance Method Fixed Effects SE Method Degrees of Freedom Method WORK.YIELD Yield Variance Components REML Profile Model-Based Containment Class Level Information Class Levels Values Block 6 1 2 3 4 5 6 Manure 4 0 1 2 4 Variety 3 1 2 3 James P. Geaghan - Copyright 2011 Statistical Techniques II Split-plot and Repeated measures designs Appendix 16 Dimensions Covariance Parameters Columns in X Columns in Z Subjects Max Obs Per Subject Number Number Number Number of of of of SAS Example Page 302 3 20 24 1 72 Observations Observations Read Observations Used Observations Not Used Iteration History Iteration Evaluations 0 1 1 1 Convergence criteria met. 72 72 0 -2 Res Log Like 564.36420957 529.02850701 Criterion 0.00000000 Covariance Parameter Estimates Cov Parm Block Block*Variety Residual Standard Error 168.83 67.8755 37.3324 Estimate 214.48 106.06 177.08 Fit Statistics -2 Res Log Likelihood AIC (smaller is better) AICC (smaller is better) BIC (smaller is better) Pr > Z 0.1020 0.0591 <.0001 Alpha 0.05 0.05 0.05 Lower 70.8619 40.9773 121.83 Upper 2575.21 657.77 280.92 529.0 535.0 535.5 534.4 Type 3 Tests of Fixed Effects Effect Num DF Den DF Variety 2 10 Manure 3 45 Manure*Variety 6 45 Contrasts Label line even space quad even space cube even space line orthoganal quad orthoganal cube orthoganal Z Value 1.27 1.56 4.74 Num DF 1 1 1 1 1 1 F Value 1.49 37.69 0.30 Den DF 45 45 45 45 45 45 F Value 110.32 2.71 0.02 100.65 12.33 0.07 Pr > F 0.2724 <.0001 0.9322 Pr > F <.0001 0.1065 0.8873 <.0001 0.0010 0.7857 Least Squares Means Effect Variety Variety Variety Manure Manure Manure Manure Manure*Variety Manure*Variety Manure*Variety Manure*Variety Manure*Variety Manure*Variety Manure*Variety Manure*Variety Manure*Variety Manure*Variety Manure*Variety Manure*Variety Manure 0 1 2 4 0 0 0 1 1 1 2 2 2 4 4 4 Variety 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3 Estimate 97.6250 104.50 109.79 79.3889 98.8889 114.22 123.39 71.5000 80.0000 86.6667 89.6667 98.5000 108.50 110.83 114.67 117.17 118.50 124.83 126.83 Standard Error 7.7975 7.7975 7.7975 7.1747 7.1747 7.1747 7.1747 9.1070 9.1070 9.1070 9.1070 9.1070 9.1070 9.1070 9.1070 9.1070 9.1070 9.1070 9.1070 DF 10 10 10 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 t Value 12.52 13.40 14.08 11.07 13.78 15.92 17.20 7.85 8.78 9.52 9.85 10.82 11.91 12.17 12.59 12.87 13.01 13.71 13.93 Pr > |t| <.0001 <.0001 <.0001 <.0001 <.0001 <.0001 <.0001 <.0001 <.0001 <.0001 <.0001 <.0001 <.0001 <.0001 <.0001 <.0001 <.0001 <.0001 <.0001 Alpha 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 Lower 80.2510 87.1260 92.4177 64.9383 84.4383 99.7716 108.94 53.1576 61.6576 68.3243 71.3243 80.1576 90.1576 92.4909 96.3243 98.8243 100.16 106.49 108.49 Upper 115.00 121.87 127.17 93.8395 113.34 128.67 137.84 89.8424 98.3424 105.01 108.01 116.84 126.84 129.18 133.01 135.51 136.84 143.18 145.18 James P. Geaghan - Copyright 2011 Statistical Techniques II Split-plot and Repeated measures designs Appendix 16 SAS Example Page 303 Example of a split plot design The effect of manure level on Barley yield Split plot Analysis of Variance with PROC MIXED Default covariance structure is CS Effect=Variety ADJUSTMENT=Tukey-Kramer(P<0.05) bygroup=1 Obs 1 2 3 Manure _ _ _ Variety 3 2 1 Estimate 109.79 104.50 97.6250 StdErr 7.7975 7.7975 7.7975 Alpha 0.05 0.05 0.05 Lower 92.4177 87.1260 80.2510 Upper 127.17 121.87 115.00 MSGROUP A A A Lower 108.94 99.7716 84.4383 64.9383 Upper 137.84 128.67 113.34 93.8395 MSGROUP A A B C Lower 108.49 106.49 100.16 98.8243 96.3243 92.4909 90.1576 80.1576 71.3243 68.3243 61.6576 53.1576 Upper 145.18 143.18 136.84 135.51 133.01 129.18 126.84 116.84 108.01 105.01 98.3424 89.8424 MSGROUP A A AB AC ABC ABCD ABCD ABCDE CDEF BDEF DE E Effect=Manure ADJUSTMENT=Tukey-Kramer(P<0.05) bygroup=2 Obs 4 5 6 7 Manure 4 2 1 0 Variety _ _ _ _ Estimate 123.39 114.22 98.8889 79.3889 StdErr 7.1747 7.1747 7.1747 7.1747 Alpha 0.05 0.05 0.05 0.05 Effect=Manure*Variety ADJUSTMENT=Tukey-Kramer(P<0.05) bygroup=3 Obs 8 9 10 11 12 13 14 15 16 17 18 19 Manure 4 4 4 2 2 2 1 1 1 0 0 0 Variety 3 2 1 3 2 1 3 2 1 3 2 1 Estimate 126.83 124.83 118.50 117.17 114.67 110.83 108.50 98.5000 89.6667 86.6667 80.0000 71.5000 StdErr 9.1070 9.1070 9.1070 9.1070 9.1070 9.1070 9.1070 9.1070 9.1070 9.1070 9.1070 9.1070 Alpha 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 797 PROC UNIVARIATE DATA=Resids PLOT NORMAL; VAR resid; 798 ods exclude basicmeasures extremeobs quantiles testsforlocation; 799 TITLE2 'Analysis of residuals from PROC MIXED'; 800 RUN; NOTE: The PROCEDURE UNIVARIATE printed page 5. NOTE: PROCEDURE UNIVARIATE used (Total process time): real time 0.12 seconds cpu time 0.03 seconds 800 ! QUIT; Example of a split plot design Analysis of residuals from PROC MIXED The UNIVARIATE Procedure Variable: Resid Moments N Mean Std Deviation Skewness Uncorrected SS Coeff Variation Tests for Normality Test Shapiro-Wilk Kolmogorov-Smirnov Cramer-von Mises Anderson-Darling 72 0 10.9670556 -0.1191717 8539.61795 . Sum Weights Sum Observations Variance Kurtosis Corrected SS Std Error Mean --Statistic--W 0.978956 D 0.088475 W-Sq 0.07264 A-Sq 0.429406 72 0 120.276309 -0.8266657 8539.61795 1.2924799 -----p Value-----Pr < W 0.2698 Pr > D >0.1500 Pr > W-Sq >0.2500 Pr > A-Sq >0.2500 James P. Geaghan - Copyright 2011 Statistical Techniques II Split-plot and Repeated measures designs Stem 20 18 16 14 12 10 8 6 4 2 0 -0 -2 -4 -6 -8 -10 -12 -14 -16 -18 -20 -22 -24 Leaf Boxplot 9 6 02329 7 378 66 2312259 671469 2460 0154 058 93 74224 60860 743110 91 6229 130 4 108 91 7 1 ----+----+----+----+ 1 1 5 1 3 2 7 6 4 4 3 2 5 5 6 2 4 3 1 3 2 1 1 Appendix 16 | | | | | | +-----+ | | | | | | *--+--* | | | | | | +-----+ | | | | | | | | | SAS Example Page 304 Normal Probability Plot 21+ ++ * | ++ * | **** * | *+ | *** | ** | **** | ***+ | **++ | **+ | ** | * | *** | +** | *** | +** | *** | ** | +* | +*** | *+* | *+ | + -25+ *++ +----+----+----+----+----+----+----+----+----+----+ -2 -1 0 +1 +2 801 options ps=52 ls=132; 802 proc plot data=resids; plot resid*manure / vref=0; run; 803 options ps=512 ls=111; 804 NOTE: There were 72 observations read from the data set WORK.RESIDS. NOTE: The PROCEDURE PLOT printed page 6. NOTE: PROCEDURE PLOT used (Total process time): real time 0.04 seconds cpu time 0.00 seconds Example of a split plot design Analysis of residuals from PROC MIXED Plot of Resid*Manure. Legend: A = 1 obs, B = 2 obs, etc. Resid | | 30 + | | | | | A 20 + | A A | A A B | A | A A | A 10 + B A A B | B A B | B A A | A B A | B | A B 0 +--B-----------------------------------------------------------------------------------------------------| B A | C A A | B A A | B A B | B A -10 + | A A B B | A | A | B A | A -20 + A A | | A | | | -30 + | ---+------------------------+------------------------+------------------------+------------------------+-0 1 2 3 4 Manure James P. Geaghan - Copyright 2011 Statistical Techniques II Split-plot and Repeated measures designs Appendix 16 SAS Example Page 305 805 PROC MIXED DATA=YIELD CL covtest; CLASSES Block Manure Variety; 806 TITLE4 'Fitted covariance structure is CS'; 807 MODEL YIELD = Variety | Manure / htype=3; 808 RANDOM Block; 809 repeated manure / subject=block*variety type=cs; Run; NOTE:Convergence criteria met. NOTE: The PROCEDURE MIXED printed page 7. NOTE: PROCEDURE MIXED used (Total process time): real time 0.35 seconds cpu time 0.28 seconds Example of a split plot design Analysis of residuals from PROC MIXED Fitted covariance structure is CS The Mixed Procedure Model Information Data Set Dependent Variable Covariance Structures Subject Effect Estimation Method Residual Variance Method Fixed Effects SE Method Degrees of Freedom Method WORK.YIELD Yield Variance Components, Compound Symmetry Block*Variety REML Profile Model-Based Containment Class Level Information Class Levels Values Block Manure Variety 6 4 3 1 2 3 4 5 6 0 1 2 4 1 2 3 Dimensions Covariance Parameters Columns in X Columns in Z Subjects Max Obs Per Subject Number Number Number Number of of of of 3 20 6 1 72 Observations Observations Read Observations Used Observations Not Used Iteration History Iteration Evaluations 0 1 1 1 Convergence criteria met. 72 72 0 -2 Res Log Like 564.36420957 529.02850701 Criterion 0.00000000 Covariance Parameter Estimates Cov Parm Block CS Residual Subject Block*Variety Fit Statistics -2 Res Log Likelihood AIC (smaller is better) AICC (smaller is better) BIC (smaller is better) Type 3 Tests of Fixed Effects Num Den Effect DF DF Variety 2 55 Manure 3 55 Manure*Variety 6 55 Estimate 214.48 106.06 177.08 Standard Error 168.83 67.8755 37.3324 Z Value 1.27 1.56 4.74 Pr Z 0.1020 0.1181 <.0001 Alpha 0.05 0.05 0.05 Lower 70.8619 -26.9718 121.83 Upper 2575.21 239.10 280.92 529.0 535.0 535.5 534.4 F Value 1.49 37.69 0.30 Pr > F 0.2354 <.0001 0.9328 James P. Geaghan - Copyright 2011 Statistical Techniques II Split-plot and Repeated measures designs Appendix 16 SAS Example Page 306 811 PROC MIXED DATA=YIELD CL covtest; CLASSES Block Manure Variety; 812 TITLE4 'Fitted covariance structure is CSH (heterogeneous)'; 813 MODEL YIELD = Variety | Manure / htype=3; 814 RANDOM Block; 815 repeated manure / subject=block*variety type=csh; Run; NOTE:Convergence criteria met. NOTE: The PROCEDURE MIXED printed page 8. NOTE: PROCEDURE MIXED used (Total process time): real time 0.45 seconds cpu time 0.37 seconds Example of a split plot design Analysis of residuals from PROC MIXED Fitted covariance structure is CSH (heterogeneous) The Mixed Procedure Model Information Data Set Dependent Variable Covariance Structures Subject Effect Estimation Method Residual Variance Method Fixed Effects SE Method Degrees of Freedom Method WORK.YIELD Yield Variance Components, Heterogeneous Compound Symmetry Block*Variety REML None Model-Based Containment Class Level Information Class Levels Values Block 6 1 2 3 4 5 6 Manure 4 0 1 2 4 Variety 3 1 2 3 Dimensions Covariance Parameters Columns in X Columns in Z Subjects Max Obs Per Subject Number Number Number Number of of of of Observations Observations Read Observations Used Observations Not Used Iteration History Iteration Evaluations 0 1 1 2 2 1 3 1 Convergence criteria met. Covariance Cov Parm Block Var(1) Var(2) Var(3) Var(4) CSH 6 20 6 1 72 72 72 0 -2 Res Log Like 564.36420957 527.20174848 527.13089268 527.12927347 Criterion 0.00031194 0.00000763 0.00000001 Parameter Estimates Subject Block*Variety Block*Variety Block*Variety Block*Variety Block*Variety Estimate 212.17 191.77 250.74 367.41 308.88 0.3717 Fit Statistics -2 Res Log Likelihood AIC (smaller is better) AICC (smaller is better) BIC (smaller is better) Type 3 Tests of Fixed Effects Num Den Effect DF DF Variety 2 55 Manure 3 55 Manure*Variety 6 55 Standard Error 164.10 81.7809 100.90 140.80 120.76 0.1633 Z Value 1.29 2.34 2.49 2.61 2.56 2.28 Pr Z 0.0980 0.0095 0.0065 0.0045 0.0053 0.0228 Alpha 0.05 0.05 0.05 0.05 0.05 0.05 Lower 71.0776 96.2302 129.96 195.51 162.62 0.05160 Upper 2382.59 552.92 671.15 928.22 798.64 0.6918 527.1 539.1 540.7 537.9 F Value 1.52 42.14 0.29 Pr > F 0.2267 <.0001 0.9398 James P. Geaghan - Copyright 2011 Statistical Techniques II Split-plot and Repeated measures designs Appendix 16 SAS Example Page 307 817 PROC MIXED DATA=YIELD CL covtest; CLASSES Block Manure Variety; 818 TITLE4 'Fitted covariance structure is UN (unstructured)'; 819 MODEL YIELD = Variety | Manure / htype=3; 820 RANDOM Block; 821 repeated manure / subject=block*variety type=un; Run; NOTE:Convergence criteria met. NOTE: The PROCEDURE MIXED printed page 9. NOTE: PROCEDURE MIXED used (Total process time): real time 0.57 seconds cpu time 0.46 seconds Example of a split plot design Analysis of residuals from PROC MIXED Fitted covariance structure is UN (unstructured) The Mixed Procedure Model Information Data Set Dependent Variable Covariance Structures Subject Effect Estimation Method Residual Variance Method Fixed Effects SE Method Degrees of Freedom Method WORK.YIELD Yield Variance Components, Unstructured Block*Variety REML None Model-Based Containment Class Level Information Class Levels Values Block 6 1 2 3 4 5 6 Manure 4 0 1 2 4 Variety 3 1 2 3 Dimensions Covariance Parameters Columns in X Columns in Z Subjects Max Obs Per Subject Number Number Number Number of of of of 11 20 6 1 72 Observations Observations Read Observations Used Observations Not Used Iteration History Iteration Evaluations 0 1 1 2 2 1 Convergence criteria met. 72 72 0 -2 Res Log Like 564.36420957 522.79846496 522.79759269 Criterion 0.00000417 0.00000000 Covariance Parameter Estimates Cov Parm Block UN(1,1) UN(2,1) UN(2,2) UN(3,1) UN(3,2) UN(3,3) UN(4,1) UN(4,2) UN(4,3) UN(4,4) Subject Block*Variety Block*Variety Block*Variety Block*Variety Block*Variety Block*Variety Block*Variety Block*Variety Block*Variety Block*Variety Fit Statistics -2 Res Log Likelihood AIC (smaller is better) AICC (smaller is better) BIC (smaller is better) Estimate 211.93 179.20 59.2363 249.06 56.6071 68.8404 342.81 111.59 209.46 160.93 381.68 Standard Error 158.66 76.7884 64.9116 102.03 73.7230 85.1941 128.95 92.4130 111.23 115.12 162.70 Z Value 1.34 2.33 0.91 2.44 0.77 0.81 2.66 1.21 1.88 1.40 2.35 Pr Z 0.0908 0.0098 0.3615 0.0073 0.4426 0.4191 0.0039 0.2272 0.0597 0.1621 0.0095 Alpha 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 Lower 72.8281 89.6775 -67.9881 127.83 -87.8872 -98.1370 184.21 -69.5394 -8.5425 -64.6984 191.57 Upper 2114.96 520.02 186.46 681.65 201.10 235.82 848.12 292.71 427.46 386.56 1099.86 522.8 544.8 550.3 542.5 James P. Geaghan - Copyright 2011 Statistical Techniques II Split-plot and Repeated measures designs Type 3 Tests of Fixed Effects Num Den Effect DF DF Variety 2 55 Manure 3 55 Manure*Variety 6 55 824 825 826 827 828 829 NOTE: 830 831 832 NOTE: 832 NOTE: NOTE: Appendix 16 F Value 1.44 40.65 0.35 SAS Example Page 308 Pr > F 0.2464 <.0001 0.9068 PROC GLM DATA=YIELD; CLASSES Block Manure Variety; TITLE3 'Split plot Analysis of Variance with PROC GLM'; TITLE4 'Model to show correct EMS with Manure and Variety as FIXED effects'; MODEL YIELD = Block Variety Block*Variety Manure Variety*Manure; TEST H=Block Variety E=Block*Variety; RANDOM Block Block*Variety / TEST; RUN; TYPE I EMS not available without the E1 option. TITLE4 'Model to show what EMS would be if Manure was a Random effect'; RANDOM Block Block*Variety Manure Manure*Variety; RUN; TYPE I EMS not available without the E1 option. ! QUIT; The PROCEDURE GLM printed pages 10-14. PROCEDURE GLM used (Total process time): real time 0.43 seconds cpu time 0.28 seconds Example of a split plot design Analysis of residuals from PROC MIXED Split plot Analysis of Variance with PROC GLM Model to show correct EMS with Manure and Variety as FIXED effects The GLM Procedure Class Level Information Class Levels Values Block 6 1 2 3 4 5 6 Manure 4 0 1 2 4 Variety 3 1 2 3 Number of Observations Read Number of Observations Used 72 72 Dependent Variable: Yield Sum of Squares 44017.19444 7968.75000 51985.94444 Source Model Error Corrected Total DF 26 45 71 R-Square 0.846713 Root MSE 13.30727 Coeff Var 12.79887 Mean Square 1692.96902 177.08333 F Value 9.56 Pr > F <.0001 Yield Mean 103.9722 Source Block Variety Block*Variety Manure Manure*Variety DF 5 2 10 3 6 Type I SS 15875.27778 1786.36111 6013.30556 20020.50000 321.75000 Mean Square 3175.05556 893.18056 601.33056 6673.50000 53.62500 F Value 17.93 5.04 3.40 37.69 0.30 Pr > F <.0001 0.0106 0.0023 <.0001 0.9322 Source Block Variety Block*Variety Manure Manure*Variety DF 5 2 10 3 6 Type III SS 15875.27778 1786.36111 6013.30556 20020.50000 321.75000 Mean Square 3175.05556 893.18056 601.33056 6673.50000 53.62500 F Value 17.93 5.04 3.40 37.69 0.30 Pr > F <.0001 0.0106 0.0023 <.0001 0.9322 Tests of Hypotheses Using the Type III MS for Block*Variety as an Error Term Source DF Type III SS Mean Square F Value Pr > F Block 5 15875.27778 3175.05556 5.28 0.0124 Variety 2 1786.36111 893.18056 1.49 0.2724 James P. Geaghan - Copyright 2011 Statistical Techniques II Split-plot and Repeated measures designs Source Block Variety Block*Variety Manure Manure*Variety Appendix 16 SAS Example Page 309 Type III Expected Mean Square Var(Error) + 4 Var(Block*Variety) + 12 Var(Block) Var(Error) + 4 Var(Block*Variety) + Q(Variety,Manure*Variety) Var(Error) + 4 Var(Block*Variety) Var(Error) + Q(Manure,Manure*Variety) Var(Error) + Q(Manure*Variety) Tests of Hypotheses for Mixed Model Analysis of Variance Dependent Variable: Yield Source DF Type III SS Mean Square Block 5 15875 3175.055556 * Variety 2 1786.361111 893.180556 Error 10 6013.305556 601.330556 Error: MS(Block*Variety) * This test assumes one or more other fixed effects are zero. F Value 5.28 1.49 Pr > F 0.0124 0.2724 Source DF Type III SS Mean Square Block*Variety 10 6013.305556 601.330556 * Manure 3 20021 6673.500000 Manure*Variety 6 321.750000 53.625000 Error: MS(Error) 45 7968.750000 177.083333 * This test assumes one or more other fixed effects are zero. F Value 3.40 37.69 0.30 Pr > F 0.0023 <.0001 0.9322 Model to show what EMS would be if Manure was a Random effect Source Block Variety Block*Variety Manure Manure*Variety Type III Expected Mean Square Var(Error) + 4 Var(Block*Variety) + 12 Var(Block) Var(Error) + 6 Var(Manure*Variety) + 4 Var(Block*Variety) + Q(Variety) Var(Error) + 4 Var(Block*Variety) Var(Error) + 6 Var(Manure*Variety) + 18 Var(Manure) Var(Error) + 6 Var(Manure*Variety) 835 ODS HTML close; 836 837 GOPTIONS DEVICE=CGMLT97L ctitle=black ctext=black htext=1 htitle=1 838 ftext='TimesRoman' ftitle='TimesRoman'; 839 *GOPTIONS VPOS=48 HPOS=90; 840 841 data YIELD; set YIELD; 842 if variety = 1 then v1=yield; else v1=.; 843 if variety = 2 then v2=yield; else v2=.; 844 if variety = 3 then v3=yield; else v3=.; 845 RUN; NOTE: There were 72 observations read from the data set WORK.YIELD. NOTE: The data set WORK.YIELD has 72 observations and 7 variables. NOTE: DATA statement used (Total process time): real time 0.00 seconds cpu time 0.00 seconds 846 847 TITLE1; 848 GOPTIONS GSFNAME=OUT1; 849 PROC GPLOT DATA=YIELD; 850 TITLE2 'Joined means with standard error bars to examine interaction'; 851 PLOT V1*Manure=1 V2*Manure=2 V3*Manure=3 / OVERLAY HAXIS=AXIS1 VAXIS=AXIS2; 852 AXIS1 LABEL=( 'Manure treatment') WIDTH=5 MINOR=(N=4); 853 AXIS2 LABEL=('Yield') WIDTH=6 854 MINOR=(N=4) ORDER= 70 TO 140 BY 10; 855 SYMBOL1 C=RED L=1 V=NONE I=STD1mjtp W=1 H=1 mode=include; 856 SYMBOL2 C=BLUE L=1 V=NONE I=STD1mjtp W=1 H=1 mode=include; 857 SYMBOL3 C=GREEN L=1 V=NONE I=STD1mjtp W=1 H=1 mode=include; 858 **** V = dot would place a dot for each point; 859 **** P = variance calculations uses a pooled calculation as in ANOVA; 860 **** I = requests STD (std dev) 1 (1 width, 2 or 3) M (of mean=std err) 861 J (join means of bars) t (add top & bottom hash) p (use pooled variance); 862 **** Other options: omit M=std dev, use B to get bar for min/max; 863 * SYMBOL1 C=green L=1 V=dot I=none W=1 H=1 mode=include; 864 * SYMBOL2 C=magenta L=1 V=dot I=none W=1 H=1 mode=include; 865 RUN; NOTE: The axis frame outline was drawn with line width 6 as specified on the left vertical axis. Any other axis line widths were ignored. NOTE: 48 observation(s) contained a MISSING value for the v1 * Manure request. James P. Geaghan - Copyright 2011 Statistical Techniques II Split-plot and Repeated measures designs NOTE: NOTE: NOTE: NOTE: NOTE: NOTE: 865 NOTE: NOTE: Appendix 16 SAS Example Page 310 7 observation(s) outside the axis range for the v1 * Manure request. 48 observation(s) contained a MISSING value for the v2 * Manure request. 5 observation(s) outside the axis range for the v2 * Manure request. 48 observation(s) contained a MISSING value for the v3 * Manure request. 3 observation(s) outside the axis range for the v3 * Manure request. 10 records written to C:\SAS\Appendix16 SplitPlot (Barley))01.CGM ! QUIT; There were 72 observations read from the data set WORK.YIELD. PROCEDURE GPLOT used (Total process time): real time 0.11 seconds cpu time 0.06 seconds 866 867 GOPTIONS GSFNAME=OUT2; 868 TITLE2 'Block chart of variety and manure'; 869 PROC GCHART DATA=YIELD; 870 Block Manure / GROUP=Variety SUMVAR=YIELD DISCRETE TYPE=MEAN; 871 format yield 5.1; 872 RUN; NOTE: 15 records written to C:\SAS\Appendix16 SplitPlot (Barley))02.CGM 873 quit; NOTE: There were 72 observations read from the data set WORK.YIELD. NOTE: PROCEDURE GCHART used (Total process time): real time 0.06 seconds cpu time 0.04 seconds 874 NOTE: SAS Institute Inc., SAS Campus Drive, Cary, NC USA 27513-2414 NOTE: The SAS System used: real time 6.45 seconds cpu time 4.10 seconds James P. Geaghan - Copyright 2011 ...
View Full Document

This note was uploaded on 12/29/2011 for the course EXST 7015 taught by Professor Wang,j during the Fall '08 term at LSU.

Ask a homework question - tutors are online