EXST7015 Fall2011 Appendix 14

EXST7015 Fall2011 Appendix 14 - 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 Experimental Design examples Appendix 14a CRD SAS Example Page 255 1 dm'log;clear;output;clear'; 2 options ps=512 ls=105 nocenter nodate nonumber nolabel; 3 TITLE1 'Appendix17: Percent fat in dried eggs'; 4 5 ODS HTML style=minimal body='C:\SAS\Appendix 17 Eggs.html'; NOTE: Writing HTML Body file: C:\SAS\Appendix 17 Eggs.html 6 7 *****************************************************************; 8 *** A single can of dried eggs was stirred well. Samples ***; 9 *** were drawn and a pair of samples (claimed to be of two ***; 10 *** "types"), was sent to each of six commercial laboratories ***; 11 *** to be analyzed for fat content. Each laboratory assigned ***; 12 *** two technicians, who each analyzed two replicates of ***; 13 *** both "types". Since the data were all drawn from a single ***; 14 *** well-mixed can, the null hypothesis for ANOVA that the ***; 15 *** mean fat content of each sample is equal is true. The ***; 16 *** experiment is thus really a study of the laboratories. ***; 17 *****************************************************************; 18 19 data Eggs; infile cards missover; 20 input FatContent Lab $ Tech Sample $; 21 datalines; NOTE: The data set WORK.EGGS has 48 observations and 4 variables. NOTE: DATA statement used (Total process time): real time 0.00 seconds cpu time 0.00 seconds 21 ! run; 70 ; 71 proc sort data=eggs; by Lab Tech Sample; run; NOTE: There were 48 observations read from the data set WORK.EGGS. NOTE: The data set WORK.EGGS has 48 observations and 4 variables. NOTE: PROCEDURE SORT used (Total process time): real time 0.01 seconds cpu time 0.00 seconds 72 data eggs; set eggs; by Lab Tech Sample; rep+1; 73 if first.sample then rep=1; 74 run; NOTE: There were 48 observations read from the data set WORK.EGGS. NOTE: The data set WORK.EGGS has 48 observations and 5 variables. NOTE: DATA statement used (Total process time): real time 0.00 seconds cpu time 0.00 seconds 75 PROC PRINT DATA=Eggs; TITLE2 'Data Listing'; RUN; NOTE: There were 48 observations read from the data set WORK.EGGS. NOTE: The PROCEDURE PRINT printed page 1. NOTE: PROCEDURE PRINT used (Total process time): real time 0.10 seconds cpu time 0.01 seconds Appendix17: Percent fat in dried eggs Data Listing Obs 1 2 3 4 5 6 7 Fat Content 0.62 0.55 0.34 0.24 0.80 0.68 0.76 Lab I I I I I I I Tech 1 1 1 1 2 2 2 Sample G G H H G G H rep 1 2 1 2 1 2 1 8 9 10 11 12 13 14 15 16 17 18 19 0.65 0.30 0.40 0.33 0.43 0.39 0.40 0.29 0.18 0.46 0.38 0.27 I II II II II II II II II III III III 2 1 1 1 1 2 2 2 2 1 1 1 H G G H H G G H H G G H 2 1 2 1 2 1 2 1 2 1 2 1 James P. Geaghan - Copyright 2011 Statistical Techniques II Experimental Design examples 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 0.37 0.37 0.42 0.45 0.54 0.18 0.47 0.53 0.32 0.40 0.37 0.31 0.43 0.35 0.39 III III III III III IV IV IV IV IV IV IV IV V V Appendix 14a CRD 1 2 2 2 2 1 1 1 1 2 2 2 2 1 1 H G G H H G G H H G G H H G G 35 36 37 38 39 40 41 42 43 44 45 46 47 48 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 SAS Example Page 256 0.37 0.33 0.42 0.36 0.20 0.41 0.37 0.43 0.28 0.36 0.18 0.20 0.26 0.06 V V V V V V VI VI VI VI VI VI VI VI 1 1 2 2 2 2 1 1 1 1 2 2 2 2 H H G G H H G G H H G G H H 1 2 1 2 1 2 1 2 1 2 1 2 1 2 77 PROC mixed DATA=Eggs cl covtest; class Lab Tech Sample; 78 Title2 'Nested CRD - types as reps'; 79 MODEL FatContent = Lab / outp=resids01; 80 RANDOM Tech(lab) Sample(Lab*Tech); 81 lsmeans lab / adjust=tukey cl; 82 run; NOTE:Convergence criteria met. NOTE: The data set WORK.RESIDS01 has 48 observations and 12 variables. NOTE: The PROCEDURE MIXED printed page 2. NOTE: PROCEDURE MIXED used (Total process time): real time 0.10 seconds cpu time 0.06 seconds Appendix17: Percent fat in dried eggs Nested CRD - types as reps 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.EGGS FatContent Variance Components REML Profile Model-Based Containment Class Level Information Class Levels Values Lab Tech Sample 6 2 2 I II III IV V VI 1 2 G H 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 3 7 36 1 48 48 48 0 James P. Geaghan - Copyright 2011 Statistical Techniques II Experimental Design examples Appendix 14b CRD Iteration History Iteration Evaluations 0 1 1 1 Convergence criteria met. -2 Res Log Like -48.18774861 -57.70117974 SAS Example Page 257 Criterion 0.00000000 Covariance Parameter Estimates Cov Parm Tech(Lab) Sample(Lab*Tech) Residual Estimate 0.006980 0.003065 0.007196 Standard Error 0.006107 0.002912 0.002077 Fit Statistics -2 Res Log Likelihood AIC (smaller is better) AICC (smaller is better) BIC (smaller is better) Z Value 1.14 1.05 3.46 Pr Z 0.1265 0.1463 0.0003 Alpha 0.05 0.05 0.05 Lower 0.002118 0.000868 0.004387 Upper 0.1320 0.08907 0.01393 Alpha 0.05 0.05 0.05 0.05 0.05 0.05 Lower 0.4043 0.1643 0.2318 0.2006 0.1781 0.09180 Upper 0.7557 0.5157 0.5832 0.5519 0.5294 0.4432 -57.7 -51.7 -51.1 -50.2 Type 3 Tests of Fixed Effects Num Den Effect DF DF F Value Lab 5 6 2.15 Pr > F 0.1895 Least Squares Means Effect Lab Lab Lab Lab Lab Lab Lab I II III IV V VI Estimate 0.5800 0.3400 0.4075 0.3763 0.3538 0.2675 Standard Error 0.07180 0.07180 0.07180 0.07180 0.07180 0.07180 Differences of Least Squares Means Standard Effect Lab _Lab Estimate Error Lab Lab Lab Lab Lab Lab Lab Lab Lab Lab Lab Lab Lab Lab Lab I I I I I II II II II III III III IV IV V II III IV V VI III IV V VI IV V VI V VI VI 0.2400 0.1725 0.2038 0.2263 0.3125 -0.06750 -0.03625 -0.01375 0.07250 0.03125 0.05375 0.1400 0.02250 0.1088 0.08625 0.1015 0.1015 0.1015 0.1015 0.1015 0.1015 0.1015 0.1015 0.1015 0.1015 0.1015 0.1015 0.1015 0.1015 0.1015 DF 6 6 6 6 6 6 t Value 8.08 4.74 5.68 5.24 4.93 3.73 Pr > |t| 0.0002 0.0032 0.0013 0.0019 0.0026 0.0098 DF t Value Pr > |t| 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 2.36 1.70 2.01 2.23 3.08 -0.66 -0.36 -0.14 0.71 0.31 0.53 1.38 0.22 1.07 0.85 0.0560 0.1403 0.0916 0.0674 0.0217 0.5309 0.7333 0.8967 0.5021 0.7687 0.6156 0.2172 0.8320 0.3254 0.4283 Adjustment Tukey Tukey Tukey Tukey Tukey Tukey Tukey Tukey Tukey Tukey Tukey Tukey Tukey Tukey Tukey Adj P Alpha 0.2972 0.5760 0.4315 0.3435 0.1344 0.9799 0.9988 1.0000 0.9730 0.9994 0.9926 0.7387 0.9999 0.8769 0.9462 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 James P. Geaghan - Copyright 2011 Statistical Techniques II Experimental Design examples Appendix 14b CRD SAS Example Page 258 Differences of Least Squares Means Effect Lab Lab Lab Lab Lab Lab Lab Lab Lab Lab Lab Lab Lab Lab Lab Lab I I I I I II II II II III III III IV IV V _Lab II III IV V VI III IV V VI IV V VI V VI VI Lower -0.00847 -0.07597 -0.04472 -0.02222 0.06403 -0.3160 -0.2847 -0.2622 -0.1760 -0.2172 -0.1947 -0.1085 -0.2260 -0.1397 -0.1622 Upper 0.4885 0.4210 0.4522 0.4747 0.5610 0.1810 0.2122 0.2347 0.3210 0.2797 0.3022 0.3885 0.2710 0.3572 0.3347 Adj Lower -0.1641 -0.2316 -0.2004 -0.1779 -0.09165 -0.4716 -0.4404 -0.4179 -0.3316 -0.3729 -0.3504 -0.2641 -0.3816 -0.2954 -0.3179 Adj Upper 0.6441 0.5766 0.6079 0.6304 0.7166 0.3366 0.3679 0.3904 0.4766 0.4354 0.4579 0.5441 0.4266 0.5129 0.4904 84 options ps=512 ls=132; 85 PROC UNIVARIATE DATA=Resids01 PLOT NORMAL; VAR resid; 86 ods exclude basicmeasures extremeobs quantiles testsforlocation; 87 TITLE2 'Analysis of residuals from PROC MIXED'; 88 RUN; NOTE: The PROCEDURE UNIVARIATE printed page 3. NOTE: PROCEDURE UNIVARIATE used (Total process time): real time 0.06 seconds cpu time 0.01 seconds 88 ! QUIT; Appendix17: Percent fat in dried eggs Analysis of residuals from PROC MIXED The UNIVARIATE Procedure Variable: Resid N Mean Std Deviation Skewness Uncorrected SS Coeff Variation Moments 48 Sum Weights 0 Sum Observations 0.06947578 Variance -0.4800918 Kurtosis 0.22686356 Corrected SS . Std Error Mean Test Shapiro-Wilk Kolmogorov-Smirnov Cramer-von Mises Anderson-Darling Tests for Normality --Statistic--W 0.978443 D 0.064117 W-Sq 0.035825 A-Sq 0.280259 48 0 0.00482688 -0.0208165 0.22686356 0.01002797 -----p Value-----Pr < W 0.5156 Pr > D >0.1500 Pr > W-Sq >0.2500 Pr > A-Sq >0.2500 James P. Geaghan - Copyright 2011 Statistical Techniques II Experimental Design examples Stem Leaf 12 2 10 8 8 104 6 028069 4 4626 2 0645 0 2578669 -0 84118 -2 8640 -4 54550 -6 84 -8 4 -10 3 -12 94 -14 5 -16 2 ----+----+----+----+ Multiply Stem.Leaf by 10**-2 Appendix 14b CRD SAS Example Page 259 # 1 1 3 6 4 4 7 5 4 5 2 1 1 2 1 1 Boxplot Normal Probability Plot | 0.13+ +++ * | | +++* | | +** * | 0.07+ ***** +-----+ | ***+ | | | *** *--+--* 0.01+ ***** | | | **** | | | **++ +-----+ -0.05+ ***+ | | **+ | | ++* | -0.11+ +++ * | | +++ * * | | +++ * | -0.17+++ * +----+----+----+----+----+----+----+----+----+----+ -2 -1 0 +1 +2 89 options ps=42 ls=99; 90 proc plot data=resids01; plot resid*pred / vref=0; run; 91 options ps=512 ls=99; 92 NOTE: There were 48 observations read from the data set WORK.RESIDS01. NOTE: The PROCEDURE PLOT printed page 4. NOTE: PROCEDURE PLOT used (Total process time): real time 0.09 seconds cpu time 0.00 seconds Appendix17: Percent fat in dried eggs Nested CRD - types as reps Plot of Resid*Pred. Legend: A = 1 obs, B = 2 obs, etc. Resid | 0.15 + | A | | A 0.10 + A | A | A A A A | AA A 0.05 + B AA | A A | A A A | A BA 0.00 +-------------A---------------------------A-------------------------------------------------| A AAA A | A A A | A A -0.05 + A A A A | A | A | A -0.10 + A | | A A | -0.15 + A | | A | -0.20 + | -+------------+------------+------------+------------+------------+------------+------------+ 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 Pred James P. Geaghan - Copyright 2011 Statistical Techniques II Experimental Design examples Appendix 14b CRD SAS Example Page 260 93 PROC mixed DATA=Eggs cl covtest METHOD=TYPE3; 94 class Lab Tech Sample; 95 Title2 'Nested CRD'; 96 MODEL FatContent = / outp=resids02; 97 random Lab Tech(lab) Sample(Lab*Tech); 98 run; NOTE: The data set WORK.RESIDS02 has 48 observations and 12 variables. NOTE: The PROCEDURE MIXED printed page 5. NOTE: PROCEDURE MIXED used (Total process time): real time 0.32 seconds cpu time 0.25 seconds Appendix17: Percent fat in dried eggs Nested CRD 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.EGGS FatContent Variance Components Type 3 Factor Model-Based Containment Class Level Information Class Levels Values Lab 6 I II III IV V VI Tech 2 1 2 Sample 2 G H Dimensions Covariance Parameters Columns in X Columns in Z Subjects Max Obs Per Subject Number Number Number Number of of of of 4 1 42 1 48 Observations Observations Read Observations Used Observations Not Used 48 48 0 Type 3 Analysis of Variance Source Lab Tech(Lab) Sample(Lab*Tech) Residual DF 5 Sum of Squares 0.443025 Mean Square 0.088605 6 0.247475 0.041246 12 24 0.159900 0.172700 0.013325 0.007196 Expected Mean Square Var(Residual) + 2 Var(Sample(Lab*Tech)) + 4 Var(Tech(Lab)) + 8 Var(Lab) Var(Residual) + 2 Var(Sample(Lab*Tech)) + 4 Var(Tech(Lab)) Var(Residual) + 2 Var(Sample(Lab*Tech)) Var(Residual) Type 3 Analysis of Variance Source Lab Tech(Lab) Sample(Lab*Tech) Residual Error Term MS(Tech(Lab)) MS(Sample(Lab*Tech)) MS(Residual) . Error DF 6 12 24 . F Value 2.15 3.10 1.85 . Pr > F 0.1895 0.0453 0.0962 . James P. Geaghan - Copyright 2011 Statistical Techniques II Experimental Design examples Appendix 14b CRD Covariance Parameter Estimates Standard Cov Parm Estimate Error Lab 0.005920 0.007611 Tech(Lab) 0.006980 0.006107 Sample(Lab*Tech) 0.003065 0.002912 Residual 0.007196 0.002077 Fit Statistics -2 Res Log Likelihood AIC (smaller is better) AICC (smaller is better) BIC (smaller is better) Z Value 0.78 1.14 1.05 3.46 Pr Z 0.4367 0.2530 0.2925 0.0003 SAS Example Page 261 Alpha 0.05 0.05 0.05 0.05 Lower -0.00900 -0.00499 -0.00264 0.004387 Upper 0.02084 0.01895 0.008771 0.01393 -64.2 -56.2 -55.3 -57.1 99 options ps=512 ls=132; 100 PROC UNIVARIATE DATA=Resids01 PLOT NORMAL; VAR resid; 101 ods exclude basicmeasures extremeobs quantiles testsforlocation; 102 TITLE2 'Analysis of residuals from PROC MIXED'; 103 RUN; NOTE: The PROCEDURE UNIVARIATE printed page 6. NOTE: PROCEDURE UNIVARIATE used (Total process time): real time 0.06 seconds cpu time 0.03 seconds 103 ! QUIT; 104 options ps=512 ls=99; Appendix17: Percent fat in dried eggs Analysis of residuals from PROC MIXED The UNIVARIATE Procedure Variable: Resid N Mean Std Deviation Skewness Uncorrected SS Coeff Variation Moments 48 Sum Weights 0 Sum Observations 0.06947578 Variance -0.4800918 Kurtosis 0.22686356 Corrected SS . Std Error Mean Test Shapiro-Wilk Kolmogorov-Smirnov Cramer-von Mises Anderson-Darling Tests for Normality --Statistic--W 0.978443 D 0.064117 W-Sq 0.035825 A-Sq 0.280259 Stem Leaf 12 2 10 8 8 104 6 028069 4 4626 2 0645 0 2578669 -0 84118 -2 8640 -4 54550 -6 84 -8 4 -10 3 -12 94 -14 5 -16 2 ----+----+----+----+ Multiply Stem.Leaf by 10**-2 48 0 0.00482688 -0.0208165 0.22686356 0.01002797 -----p Value-----Pr < W 0.5156 Pr > D >0.1500 Pr > W-Sq >0.2500 Pr > A-Sq >0.2500 # 1 1 3 6 4 4 7 5 4 5 2 1 1 2 1 1 Boxplot Normal Probability Plot | 0.13+ +++ * | | +++* | | +** * | 0.07+ ***** +-----+ | ***+ | | | *** *--+--* 0.01+ ***** | | | **** | | | **++ +-----+ -0.05+ ***+ | | **+ | | ++* | -0.11+ +++ * | | +++ * * | | +++ * | -0.17+++ * +----+----+----+----+----+----+----+----+----+----+ -2 -1 0 +1 +2 James P. Geaghan - Copyright 2011 Statistical Techniques II Experimental Design examples Appendix 14b CRD SAS Example Page 262 1 dm'log;clear;output;clear'; 2 options ps=512 ls=105 nocenter nodate nonumber nolabel; 3 TITLE1 'Wheat yields (g / 0.00009 acre)'; 4 TITLE2 'CRD with unequal number of experimental and sampling units)'; 5 6 ODS HTML style=minimal body='C:\SAS\Appendix17b Farms.html' ; NOTE: Writing HTML Body file: C:\SAS\Appendix17b Farms.html 7 8 **EXAMPLE 3****************************************************; 9 *** Example of nested design with unequal number ***; 10 *** From Snedecor & Cochran, 1967 (pg 293) ***; 11 ***************************************************************; 12 OPTIONS PS=256 LS=111 NOCENTER NODATE NONUMBER; 13 DATA WHEAT; INFILE CARDS MISSOVER; 14 INPUT YIELD FIELD FARM DISTRICT $; 15 CARDS; NOTE: The data set WORK.WHEAT has 36 observations and 4 variables. NOTE: DATA statement used (Total process time): real time 0.12 seconds cpu time 0.01 seconds 15 ! RUN; 52 ; 53 PROC PRINT; TITLE3 'RAW DATA LISTING'; RUN; NOTE: There were 36 observations read from the data set WORK.WHEAT. NOTE: The PROCEDURE PRINT printed page 1. NOTE: PROCEDURE PRINT used (Total process time): real time 0.31 seconds cpu time 0.01 seconds Wheat yields (g / 0.00009 acre) CRD with unequal number of experimental and sampling units) RAW DATA LISTING Obs YIELD DISTRICT 1 23 2 19 3 31 4 37 5 33 6 29 7 29 8 36 9 29 10 33 11 11 12 21 13 23 14 18 15 33 16 23 17 26 FIELD 1 2 1 2 1 2 1 1 2 3 1 2 1 2 1 1 1 FARM 1 1 2 2 1 1 2 1 1 1 1 1 2 2 3 4 5 A A A A B B B C C C D D D D D D D 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 39 20 24 36 25 33 28 31 25 42 32 36 41 35 16 30 40 32 44 1 1 1 1 1 2 1 2 1 2 1 2 1 1 1 1 1 1 1 6 7 8 9 1 1 1 1 2 2 3 3 4 5 6 7 8 9 10 D D D D E E F F F F F F F F F F F F F 55 PROC MIXED DATA=WHEAT cl COVTEST; CLASSES FIELD FARM DISTRICT; 56 TITLE3 'ANOVA with PROC MIXED - unequal sized nested Errors'; 57 MODEL YIELD = / htype=1 DDFM=KR outp=ResidDataP; 58 RANDOM DISTRICT FARM(DISTRICT); 59 RUN; NOTE:Convergence criteria met. NOTE: The data set WORK.RESIDDATAP has 36 observations and 11 variables. NOTE: The PROCEDURE MIXED printed page 2. James P. Geaghan - Copyright 2011 Statistical Techniques II Experimental Design examples Appendix 14b CRD SAS Example Page 263 NOTE: PROCEDURE MIXED used (Total process time): real time 0.48 seconds cpu time 0.04 seconds 59 ! QUIT; Wheat yields (g / 0.00009 acre) CRD with unequal number of experimental and sampling units) ANOVA with PROC MIXED - unequal sized nested Errors 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.WHEAT YIELD Variance Components REML Profile Prasad-Rao-JeskeKackar-Harville Kenward-Roger Class Level Information Class Levels Values FIELD 3 1 2 3 FARM 10 1 2 3 4 5 6 7 8 9 10 DISTRICT 6 A B C D E F Dimensions Covariance Parameters Columns in X Columns in Z Subjects Max Obs Per Subject Number Number Number Number of of of of 3 1 31 1 36 Observations Observations Read Observations Used Observations Not Used Iteration History Iteration Evaluations 0 1 1 3 2 2 3 1 4 1 5 1 Convergence criteria met. -2 Res Log Like 246.55907914 243.48928235 242.71561388 242.51666454 242.50058397 242.50044987 Covariance Parameter Estimates Standard Cov Parm Estimate Error DISTRICT 6.3148 9.1543 FARM(DISTRICT) 26.0928 18.6720 Residual 29.8395 13.2217 Fit Statistics -2 Res Log Likelihood AIC (smaller is better) AICC (smaller is better) BIC (smaller is better) 36 36 0 Z Value 0.69 1.40 2.26 Pr Z 0.2452 0.0811 0.0120 Criterion 0.00694802 0.00192010 0.00017057 0.00000150 0.00000000 Alpha 0.05 0.05 0.05 Lower 1.2289 9.2820 14.6468 Upper 9022.02 223.79 90.6929 242.5 248.5 249.3 247.9 James P. Geaghan - Copyright 2011 Statistical Techniques II Experimental Design examples 61 62 63 64 65 66 NOTE: NOTE: NOTE: NOTE: 66 Appendix 14b CRD SAS Example Page 264 PROC MIXED DATA=WHEAT cl COVTEST method=TYPE1; CLASSES FIELD FARM DISTRICT; TITLE3 'ANOVA with Type I SS - unequal sized nested Errors'; MODEL YIELD = / htype=1 DDFM=KR outp=ResidDataP; RANDOM DISTRICT FARM(DISTRICT); RUN; Estimated G matrix is not positive definite. The data set WORK.RESIDDATAP has 36 observations and 11 variables. The PROCEDURE MIXED printed page 3. PROCEDURE MIXED used (Total process time): real time 0.62 seconds cpu time 0.06 seconds ! QUIT; Wheat yields (g / 0.00009 acre) CRD with unequal number of experimental and sampling units) ANOVA with Type I SS - unequal sized nested Errors 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.WHEAT YIELD Variance Components Type 1 Factor Prasad-Rao-JeskeKackar-Harville Kenward-Roger Class Level Information Class Levels Values FIELD FARM DISTRICT 3 10 6 1 2 3 1 2 3 4 5 6 7 8 9 10 A B C D E F Dimensions Covariance Parameters Columns in X Columns in Z Subjects Max Obs Per Subject Number Number Number Number of of of of 3 1 31 1 36 Observations Observations Read Observations Used Observations Not Used 36 36 0 Type 1 Analysis of Variance Source DISTRICT FARM(DISTRICT) Residual 5 Sum of Squares 461.422106 19 11 1349.383450 310.166667 DF Mean Square Expected Mean Square 92.284421 Var(Residual) + 1.965 Var(FARM(DISTRICT)) + 5.3778 Var(DISTRICT) 71.020182 Var(Residual) + 1.2899 Var(FARM(DISTRICT)) 28.196970 Var(Residual) Type 1 Analysis of Variance Source DISTRICT FARM(DISTRICT) Residual Error Term 1.5234 MS(FARM(DISTRICT)) - 0.5234 MS(Residual) MS(Residual) . Error DF 13.729 11 . F Value 0.99 2.52 . Pr > F 0.4601 0.0597 . James P. Geaghan - Copyright 2011 Statistical Techniques II Experimental Design examples Appendix 14b CRD SAS Example Page 265 Covariance Parameter Estimates Cov Parm DISTRICT FARM(DISTRICT) Residual Standard Error 3.7702 24.0001 13.3949 Estimate -0.2137 33.1988 28.1970 Fit Statistics -2 Res Log Likelihood AIC (smaller is better) AICC (smaller is better) BIC (smaller is better) Z Value -0.06 1.38 2.11 Pr Z 0.9548 0.1666 0.0176 Alpha 0.05 0.05 0.05 Lower -7.6031 -13.8405 14.1499 Upper 7.1757 80.2380 81.2859 243.6 249.6 250.4 249.0 68 options ps=512 ls=132; 69 PROC UNIVARIATE DATA=ResidDataP PLOT NORMAL; VAR resid; 70 ods exclude basicmeasures extremeobs quantiles testsforlocation; 71 TITLE4 'Analysis of residuals from PROC MIXED'; 72 RUN; NOTE: The PROCEDURE UNIVARIATE printed page 4. NOTE: PROCEDURE UNIVARIATE used (Total process time): real time 0.10 seconds cpu time 0.03 seconds 72 ! QUIT; 73 options ps=512 ls=105; Wheat yields (g / 0.00009 acre) CRD with unequal number of experimental and sampling units) ANOVA with Type I SS - unequal sized nested Errors Analysis of residuals from PROC MIXED The UNIVARIATE Procedure Variable: Resid N Mean Std Deviation Skewness Uncorrected SS Coeff Variation Moments 36 Sum Weights 0 Sum Observations 4.11793027 Variance -0.059663 Kurtosis 593.50724 Corrected SS . Std Error Mean Test Shapiro-Wilk Kolmogorov-Smirnov Cramer-von Mises Anderson-Darling Tests for Normality --Statistic--W 0.994152 D 0.053846 W-Sq 0.015867 A-Sq 0.114678 Stem Leaf 8 6 6 6 4 02282 2 45838 0 280145 -0 88657643 -2 207 -4 3662 -6 43 -8 2 ----+----+----+----+ # 1 1 5 5 6 8 3 4 2 1 Boxplot | | | +-----+ | + | *-----* +-----+ | | | 36 0 16.9573497 -0.1028235 593.50724 0.68632171 -----p Value-----Pr < W 0.9994 Pr > D >0.1500 Pr > W-Sq >0.2500 Pr > A-Sq >0.2500 Normal Probability Plot 9+ +*+++ | ++*++ | **+*+* 3+ ***** | ***** | ****** -3+ +***+ | +*+*** | ++*+* -9+ +++*+ +----+----+----+----+----+----+----+----+----+----+ -2 -1 0 +1 +2 James P. Geaghan - Copyright 2011 Statistical Techniques II Experimental Design examples Appendix 14c RBD SAS Example Page 266 1 dm'log;clear;output;clear'; 2 options ps=512 ls=88 nocenter nodate nonumber nolabel; 3 TITLE1 'FAILURES TO GERMINATE OF SOYBEANS'; 4 TITLE2 '4 TREATMENTS AND A CONTROL, 5 BLOCKS'; 5 6 ODS HTML style=minimal body='C:\SAS\Appendix17c Germination failures.html' ; NOTE: Writing HTML Body file: C:\SAS\Appendix17c Germination failures.html 7 8 **EXAMPLE 4*****************************************************; 9 *** Example of RBD ***; 10 *** From Snedecor & Cochran, 1980 (pg 256) ***; 11 ****************************************************************; 12 OPTIONS PS=256 LS=111 NOCENTER NODATE NONUMBER; 13 DATA SOYBEAN; INFILE CARDS MISSOVER; 14 INPUT treatment $ BLOCK FAILURES; 15 CARDS; NOTE: The data set WORK.SOYBEAN has 25 observations and 3 variables. NOTE: DATA statement used (Total process time): real time 0.31 seconds cpu time 0.00 seconds 15 ! RUN; 41 ; 42 PROC PRINT; TITLE3 'RAW DATA LISTING'; RUN; NOTE: There were 25 observations read from the data set WORK.SOYBEAN. NOTE: The PROCEDURE PRINT printed page 1. NOTE: PROCEDURE PRINT used (Total process time): real time 0.15 seconds cpu time 0.03 seconds FAILURES TO GERMINATE OF SOYBEANS 4 TREATMENTS AND A CONTROL, 5 BLOCKS RAW DATA LISTING Obs 1 2 3 4 5 6 7 8 9 10 treatment CHECK CHECK CHECK CHECK CHECK ARASAN ARASAN ARASAN ARASAN ARASAN BLOCK 1 2 3 4 5 1 2 3 4 5 FAILURES 8 10 12 13 11 2 6 7 11 5 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 SPERGON SPERGON SPERGON SPERGON SPERGON SEMESAN SEMESAN SEMESAN SEMESAN SEMESAN FERMATE FERMATE FERMATE FERMATE FERMATE 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 4 10 9 8 10 3 5 9 10 6 9 7 5 5 3 43 44 PROC MIXED DATA=SOYBEAN cl COVTEST; CLASSES treatment BLOCK; 45 TITLE3 'ANOVA with PROC MIXED - RBD without reps'; 46 MODEL FAILURES = treatment / htype=3 DDFM=Satterthwaite outp=ResidDataP; 47 RANDOM BLOCK; 48 lsmeans treatment / pdiff adjust=tukey CL; 49 ods output diffs=ppp lsmeans=mmm; 50 *ods listing exclude diffs lsmeans; 51 run; NOTE:Convergence criteria met. NOTE: The data set WORK.MMM has 5 observations and 10 variables. NOTE: The data set WORK.PPP has 10 observations and 15 variables. NOTE: The data set WORK.RESIDDATAP has 25 observations and 10 variables. NOTE: The PROCEDURE MIXED printed page 2. NOTE: PROCEDURE MIXED used (Total process time): James P. Geaghan - Copyright 2011 Statistical Techniques II Experimental Design examples Appendix 14c RBD SAS Example Page 267 real time 1.28 seconds cpu time 0.20 seconds 52 %include 'C:\SAS\pdmix800.sas'; 725 %pdmix800(ppp,mmm,alpha=0.05,sort=yes); PDMIX800 08.08.2003 processing 4.3326883872 Tukey-Kramer values for treatment are 4.50683 (avg) 4.50683 (min) 4.50683 (max). 726 RUN; QUIT; FAILURES TO GERMINATE OF SOYBEANS 4 TREATMENTS AND A CONTROL, 5 BLOCKS ANOVA with PROC MIXED - RBD without reps 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.SOYBEAN FAILURES Variance Components REML Profile Model-Based Satterthwaite Class Level Information Class Levels Values treatment BLOCK 5 5 ARASAN CHECK FERMATE SEMESAN SPERGON 1 2 3 4 5 Dimensions Covariance Parameters Columns in X Columns in Z Subjects Max Obs Per Subject Number Number Number Number of of of of 2 6 5 1 25 Observations Observations Read Observations Used Observations Not Used Iteration History Iteration Evaluations 0 1 1 1 Convergence criteria met. 25 25 0 -2 Res Log Like 103.20192033 101.90681043 Criterion 0.00000000 Covariance Parameter Estimates Cov Parm BLOCK Residual Estimate 1.4100 5.4100 Standard Error 1.8032 1.9127 Fit Statistics -2 Res Log Likelihood AIC (smaller is better) AICC (smaller is better) BIC (smaller is better) Z Value 0.78 2.83 Pr Z 0.2171 0.0023 Alpha 0.05 0.05 Lower 0.3075 3.0008 Upper 430.52 12.5310 101.9 105.9 106.6 105.1 James P. Geaghan - Copyright 2011 Statistical Techniques II Experimental Design examples Appendix 14c RBD Type 3 Tests of Fixed Effects Num Den Effect DF DF F Value treatment 4 16 3.87 Pr > F 0.0219 Least Squares Means Effect treatment treatment ARASAN treatment CHECK treatment FERMATE treatment SEMESAN treatment SPERGON DF 17.1 17.1 17.1 17.1 17.1 SAS Example Page 268 Estimate 6.2000 10.8000 5.8000 6.6000 8.2000 Standard Error 1.1679 1.1679 1.1679 1.1679 1.1679 Differences of east Squares Means Standard Effect treatment _treatment Estimate Error treatment ARASAN CHECK -4.6000 1.4711 treatment ARASAN FERMATE 0.4000 1.4711 treatment ARASAN SEMESAN -0.4000 1.4711 treatment ARASAN SPERGON -2.0000 1.4711 treatment CHECK FERMATE 5.0000 1.4711 treatment CHECK SEMESAN 4.2000 1.4711 treatment CHECK SPERGON 2.6000 1.4711 treatment FERMATE SEMESAN -0.8000 1.4711 treatment FERMATE SPERGON -2.4000 1.4711 treatment SEMESAN SPERGON -1.6000 1.4711 Differences ofLeast Squares Means Effect treatment _treatment treatment ARASAN CHECK treatment ARASAN FERMATE treatment ARASAN SEMESAN treatment ARASAN SPERGON treatment CHECK FERMATE treatment CHECK SEMESAN treatment CHECK SPERGON treatment FERMATE SEMESAN treatment FERMATE SPERGON treatment SEMESAN SPERGON Lower -7.7185 -2.7185 -3.5185 -5.1185 1.8815 1.0815 -0.5185 -3.9185 -5.5185 -4.7185 t Value 5.31 9.25 4.97 5.65 7.02 Pr > |t| <.0001 <.0001 0.0001 <.0001 <.0001 DF t Value 16 -3.13 16 0.27 16 -0.27 16 -1.36 16 3.40 16 2.86 16 1.77 16 -0.54 16 -1.63 16 -1.09 Pr > |t| 0.0065 0.7892 0.7892 0.1928 0.0037 0.0115 0.0962 0.5941 0.1223 0.2929 Upper -1.4815 3.5185 2.7185 1.1185 8.1185 7.3185 5.7185 2.3185 0.7185 1.5185 Alpha 0.05 0.05 0.05 0.05 0.05 Lower 3.7368 8.3368 3.3368 4.1368 5.7368 Adjustment Tukey-Kramer Tukey-Kramer Tukey-Kramer Tukey-Kramer Tukey-Kramer Tukey-Kramer Tukey-Kramer Tukey-Kramer Tukey-Kramer Tukey-Kramer Adj Lower -9.1068 -4.1068 -4.9068 -6.5068 0.4932 -0.3068 -1.9068 -5.3068 -6.9068 -6.1068 Upper 8.6632 13.2632 8.2632 9.0632 10.6632 Adj P 0.0443 0.9987 0.9987 0.6602 0.0261 0.0740 0.4242 0.9812 0.4999 0.8102 Alpha 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 0.05 Adj Upper -0.09317 4.9068 4.1068 2.5068 9.5068 8.7068 7.1068 3.7068 2.1068 2.9068 FAILURES TO GERMINATE OF SOYBEANS 4 TREATMENTS AND A CONTROL, 5 BLOCKS ANOVA with PROC MIXED - RBD without reps Effect=treatment ADJUSTMENT=Tukey-Kramer(P<0.05) bygroup=1 Obs treatment Estimate StdErr Alpha Lower 1 CHECK 10.8000 1.1679 0.05 8.3368 2 SPERGON 8.2000 1.1679 0.05 5.7368 3 SEMESAN 6.6000 1.1679 0.05 4.1368 4 ARASAN 6.2000 1.1679 0.05 3.7368 5 FERMATE 5.8000 1.1679 0.05 3.3368 Upper 13.2632 10.6632 9.0632 8.6632 8.2632 MSGROUP A AB AB B B 728 options ps=512 ls=132; 729 PROC UNIVARIATE DATA=ResidDataP PLOT NORMAL; VAR resid; 730 ods exclude basicmeasures extremeobs quantiles testsforlocation; 731 TITLE2 'Analysis of residuals from PROC MIXED'; 732 RUN; NOTE: The PROCEDURE UNIVARIATE printed page 4. NOTE: PROCEDURE UNIVARIATE used (Total process time): real time 0.04 seconds cpu time 0.03 seconds 732 ! QUIT; James P. Geaghan - Copyright 2011 Statistical Techniques II Experimental Design examples Appendix 14c RBD SAS Example Page 269 FAILURES TO GERMINATE OF SOYBEANS Analysis of residuals from PROC MIXED The UNIVARIATE Procedure Variable: Resid N Mean Std Deviation Skewness Uncorrected SS Coeff Variation Moments 25 Sum Weights 0 Sum Observations 1.99954014 Variance 0.48805915 Kurtosis 95.9558587 Corrected SS . Std Error Mean Test Shapiro-Wilk Kolmogorov-Smirnov Cramer-von Mises Anderson-Darling Tests for Normality --Statistic--W 0.963523 D 0.103754 W-Sq 0.033262 A-Sq 0.249495 Stem Leaf 4 5 3 7 2 13 1 1289 0 3357 -0 9832 -1 96533 -2 9953 ----+----+----+----+ Boxplot | | | +-----+ | + | *-----* +-----+ | -----p Value-----Pr < W 0.4890 Pr > D >0.1500 Pr > W-Sq >0.2500 Pr > A-Sq >0.2500 # 1 1 2 4 4 4 5 4 25 0 3.99816078 -0.3291607 95.9558587 0.39990803 Normal Probability Plot 4.5+ | | | | | | -2.5+ *+++++ *+++++ *+*++ **+**+ +****+ ++**** +**+*** * *+*+* +----+----+----+----+----+----+----+----+----+----+ -2 -1 0 +1 +2 734 PROC CHART DATA=SOYBEAN; OPTIONS PS=45 LS=88; 735 TITLE3 'Histogram of MIXED analysis - RBD without reps'; 736 VBAR treatment / SUMVAR=FAILURES TYPE=MEAN; RUN; NOTE: The PROCEDURE CHART printed page 5. NOTE: PROCEDURE CHART used (Total process time): real time 0.03 seconds cpu time 0.00 seconds FAILURES TO GERMINATE OF SOYBEANS 4 TREATMENTS AND A CONTROL, 5 BLOCKS Histogram of MIXED analysis - RBD without reps FAILURES Mean | ***** | ***** 10 + ***** | ***** | ***** | ***** 8 + ***** ***** | ***** ***** | ***** ***** | ***** ***** ***** 6 + ***** ***** ***** ***** ***** | ***** ***** ***** ***** ***** | ***** ***** ***** ***** ***** | ***** ***** ***** ***** ***** 4 + ***** ***** ***** ***** ***** | ***** ***** ***** ***** ***** | ***** ***** ***** ***** ***** | ***** ***** ***** ***** ***** 2 + ***** ***** ***** ***** ***** | ***** ***** ***** ***** ***** | ***** ***** ***** ***** ***** | ***** ***** ***** ***** ***** -------------------------------------------------------------------ARASAN CHECK FERMATE SEMESAN SPERGON Treatment James P. Geaghan - Copyright 2011 Statistical Techniques II Experimental Design examples Appendix 14d RBD SAS Example Page 270 1 dm'log;clear;output;clear'; 2 options ps=512 ls=109 nocenter nodate nonumber; 3 TITLE1 'Number of wire worms found for 2 fumigants and a control'; 4 TITLE2 'Fumigants are C and S, control is 0, 5 BLOCKS'; 5 6 ODS HTML style=minimal body='C:\SAS\Appendix17d Fumigants.HTML' ; NOTE: Writing HTML Body file: C:\SAS\Appendix17d Fumigants.HTML 7 8 **EXAMPLE 5********************************************; 9 *** Example of RBD with sampling error ***; 10 *** From Snedecor & Cochran, 1980 (pg 267) ***; 11 *******************************************************; 12 OPTIONS PS=256 LS=111 NOCENTER NODATE NONUMBER; 13 14 DATA FUMIGANT; INFILE CARDS MISSOVER; 15 INPUT FUMIGANT $ BLOCK $ W1 W2 W3 W4; 16 REP=1; WORMS=W1; LWORMS=LOG(WORMS+1); OUTPUT; 17 REP=2; WORMS=W2; LWORMS=LOG(WORMS+1); OUTPUT; 18 REP=3; WORMS=W3; LWORMS=LOG(WORMS+1); OUTPUT; 19 REP=4; WORMS=W4; LWORMS=LOG(WORMS+1); OUTPUT; 20 KEEP FUMIGANT BLOCK REP WORMS LWORMS; 21 CARDS; NOTE: The data set WORK.FUMIGANT has 60 observations and 5 variables. NOTE: DATA statement used (Total process time): real time 0.00 seconds cpu time 0.01 seconds 21 ! RUN; 37 ; 38 PROC PRINT; TITLE3 'RAW DATA LISTING'; RUN; NOTE: There were 60 observations read from the data set WORK.FUMIGANT. NOTE: The PROCEDURE PRINT printed page 1. NOTE: PROCEDURE PRINT used (Total process time): real time 0.10 seconds cpu time 0.01 seconds Number of wire worms found for 2 fumigants and a control Fumigants are C and S, control is 0, 5 BLOCKS RAW DATA LISTING Obs 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 FUMIGANT C C C C C C C C C C C C C C C C C C C C S S S S S S S S S S BLOCK I I I I II II II II III III III III IV IV IV IV V V V V I I I I II II II II III III REP 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 WORMS 5 4 5 2 0 9 3 3 4 4 3 9 7 3 5 12 4 9 8 6 5 5 1 2 6 4 5 4 2 9 LWORMS 1.79176 1.60944 1.79176 1.09861 0.00000 2.30259 1.38629 1.38629 1.60944 1.60944 1.38629 2.30259 2.07944 1.38629 1.79176 2.56495 1.60944 2.30259 2.19722 1.94591 1.79176 1.79176 0.69315 1.09861 1.94591 1.60944 1.79176 1.60944 1.09861 2.30259 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 S S S S S S S S S S 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 III III IV IV IV IV V V V V I I I I II II II II III III III III IV IV IV IV V V V V 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 3 7 6 4 8 4 2 9 7 3 12 20 8 8 7 4 4 5 9 6 7 11 12 22 17 13 7 8 5 9 1.38629 2.07944 1.94591 1.60944 2.19722 1.60944 1.09861 2.30259 2.07944 1.38629 2.56495 3.04452 2.19722 2.19722 2.07944 1.60944 1.60944 1.79176 2.30259 1.94591 2.07944 2.48491 2.56495 3.13549 2.89037 2.63906 2.07944 2.19722 1.79176 2.30259 James P. Geaghan - Copyright 2011 Statistical Techniques II Experimental Design examples Appendix 14d RBD SAS Example Page 271 39 40 41 42 PROC mixed DATA=FUMIGANT cl COVTEST; CLASSES FUMIGANT BLOCK REP; TITLE3 'ANOVA with PROC MIXED - RBD with reps'; MODEL WORMS = FUMIGANT / htype=3 DDFM=Satterthwaite outp=ResidDataP outpM=ResidDataPM; 43 RANDOM BLOCK FUMIGANT*BLOCK; 44 lsmeans fumigant / pdiff ADJUST=DUNNETT diff=controll('0'); 45 lsmeans fumigant / pdiff ADJUST=tukey; 46 *** FUMIGANT levels (in order)-----0 C S; 47 CONTRAST 'Control v othrs' FUMIGANT -2 1 1; 48 CONTRAST 'C v S' FUMIGANT 0 -1 1; 49 RUN; NOTE:Convergence criteria met. NOTE: The data set WORK.RESIDDATAP has 60 observations and 12 variables. NOTE: The data set WORK.RESIDDATAPM has 60 observations and 12 variables. NOTE: The PROCEDURE MIXED printed page 2. NOTE: PROCEDURE MIXED used (Total process time): real time 0.12 seconds cpu time 0.06 seconds 49 ! QUIT; Number of wire worms found for 2 fumigants and a control Fumigants are C and S, control is 0, 5 BLOCKS ANOVA with PROC MIXED - RBD with reps 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.FUMIGANT WORMS Variance Components REML Profile Model-Based Satterthwaite Class Level Information Class Levels Values FUMIGANT BLOCK REP 3 5 4 0 C S I II III IV V 1 2 3 4 Dimensions Covariance Parameters Columns in X Columns in Z Subjects Max Obs Per Subject Number Number Number Number of of of of 3 4 20 1 60 Observations Observations Read Observations Used Observations Not Used Iteration History Iteration Evaluations 0 1 1 1 Convergence criteria met. 60 60 0 -2 Res Log Like 318.17726625 310.27325992 Criterion 0.00000000 James P. Geaghan - Copyright 2011 Statistical Techniques II Experimental Design examples Appendix 14d RBD Covariance Parameter Estimates Standard Cov Parm Estimate Error BLOCK 1.1052 2.4502 FUMIGANT*BLOCK 3.8559 3.1035 Residual 9.1056 1.9196 Fit Statistics -2 Res Log Likelihood AIC (smaller is better) AICC (smaller is better) BIC (smaller is better) Z Value 0.45 1.24 4.74 SAS Example Page 272 Pr Z 0.3260 0.1070 <.0001 Alpha 0.05 0.05 0.05 Lower 0.1473 1.2517 6.2643 Upper 25730931 50.5437 14.4450 310.3 316.3 316.7 315.1 Type 3 Tests of Fixed Effects Num Den Effect DF DF F Value FUMIGANT 2 8 5.98 Pr > F 0.0258 Contrasts Num DF 1 1 Label Control v othrs C v S Den DF 8 8 F Value 11.88 0.08 Pr > F 0.0087 0.7812 Least Squares Means Effect FUMIGANT FUMIGANT FUMIGANT FUMIGANT FUMIGANT FUMIGANT FUMIGANT 0 C S 0 C S Estimate 9.7000 5.2500 4.8000 9.7000 5.2500 4.8000 Standard Error 1.2031 1.2031 1.2031 1.2031 1.2031 1.2031 DF 11.5 11.5 11.5 11.5 11.5 11.5 t Value 8.06 4.36 3.99 8.06 4.36 3.99 Pr > |t| <.0001 0.0010 0.0020 <.0001 0.0010 0.0020 Differences of Least Squares Means Effect FUMIGANT _FUMIGANT FUMIGANT FUMIGANT FUMIGANT FUMIGANT FUMIGANT 0 0 0 0 C C S C S S Estimate Standard Error DF t Value Tails Pr t 4.4500 4.9000 4.4500 4.9000 0.4500 1.5662 1.5662 1.5662 1.5662 1.5662 8 8 8 8 8 2.84 3.13 2.84 3.13 0.29 Upper Upper Both Both Both 0.0109 0.0070 0.0218 0.0140 0.7812 Adjustment Dunnett-Hsu Dunnett-Hsu Tukey-Kramer Tukey-Kramer Tukey-Kramer Adj P 0.0194 0.0126 0.0512 0.0336 0.9558 51 proc print data=residdataP; TITLE4 'Output from the OUTP option'; run; NOTE: There were 60 observations read from the data set WORK.RESIDDATAP. NOTE: The PROCEDURE PRINT printed page 3. NOTE: PROCEDURE PRINT used (Total process time): real time 0.06 seconds cpu time 0.01 seconds James P. Geaghan - Copyright 2011 Statistical Techniques II Experimental Design examples Appendix 14d RBD SAS Example Page 273 Number of wire worms found for 2 fumigants and a control Fumigants are C and S, control is 0, 5 BLOCKS ANOVA with PROC MIXED - RBD with reps Output from the OUTP option Obs 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 FUMIGANT C C C C C C C C C C C C C C C C C C C C S S S S S S S S S S S S S S S S S S S S 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 BLOCK I I I I II II II II III III III III IV IV IV IV V V V V I I I I II II II II III III III III IV IV IV IV V V V V I I I I II II II II III III III III IV IV IV IV V V V V REP 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 WORMS 5 4 5 2 0 9 3 3 4 4 3 9 7 3 5 12 4 9 8 6 5 5 1 2 6 4 5 4 2 9 3 7 6 4 8 4 2 9 7 3 12 20 8 8 7 4 4 5 9 6 7 11 12 22 17 13 7 8 5 9 LWORMS 1.79176 1.60944 1.79176 1.09861 0.00000 2.30259 1.38629 1.38629 1.60944 1.60944 1.38629 2.30259 2.07944 1.38629 1.79176 2.56495 1.60944 2.30259 2.19722 1.94591 1.79176 1.79176 0.69315 1.09861 1.94591 1.60944 1.79176 1.60944 1.09861 2.30259 1.38629 2.07944 1.94591 1.60944 2.19722 1.60944 1.09861 2.30259 2.07944 1.38629 2.56495 3.04452 2.19722 2.19722 2.07944 1.60944 1.60944 1.79176 2.30259 1.94591 2.07944 2.48491 2.56495 3.13549 2.89037 2.63906 2.07944 2.19722 1.79176 2.30259 Pred 4.4423 4.4423 4.4423 4.4423 4.0354 4.0354 4.0354 4.0354 5.0385 5.0385 5.0385 5.0385 6.5623 6.5623 6.5623 6.5623 6.1715 6.1715 6.1715 6.1715 3.8037 3.8037 3.8037 3.8037 4.4972 4.4972 4.4972 4.4972 5.0287 5.0287 5.0287 5.0287 5.6093 5.6093 5.6093 5.6093 5.0612 5.0612 5.0612 5.0612 11.1245 11.1245 11.1245 11.1245 6.4733 6.4733 6.4733 6.4733 8.7340 8.7340 8.7340 8.7340 14.0305 14.0305 14.0305 14.0305 8.1378 8.1378 8.1378 8.1378 StdErr Pred 1.29594 1.29594 1.29594 1.29594 1.29594 1.29594 1.29594 1.29594 1.29594 1.29594 1.29594 1.29594 1.29594 1.29594 1.29594 1.29594 1.29594 1.29594 1.29594 1.29594 1.29594 1.29594 1.29594 1.29594 1.29594 1.29594 1.29594 1.29594 1.29594 1.29594 1.29594 1.29594 1.29594 1.29594 1.29594 1.29594 1.29594 1.29594 1.29594 1.29594 1.29594 1.29594 1.29594 1.29594 1.29594 1.29594 1.29594 1.29594 1.29594 1.29594 1.29594 1.29594 1.29594 1.29594 1.29594 1.29594 1.29594 1.29594 1.29594 1.29594 DF 49.6771 49.6771 49.6771 49.6771 49.6771 49.6771 49.6771 49.6771 49.6771 49.6771 49.6771 49.6771 49.6771 49.6771 49.6771 49.6771 49.6771 49.6771 49.6771 49.6771 49.6771 49.6771 49.6771 49.6771 49.6771 49.6771 49.6771 49.6771 49.6771 49.6771 49.6771 49.6771 49.6771 49.6771 49.6771 49.6771 49.6771 49.6771 49.6771 49.6771 49.6771 49.6771 49.6771 49.6771 49.6771 49.6771 49.6771 49.6771 49.6771 49.6771 49.6771 49.6771 49.6771 49.6771 49.6771 49.6771 49.6771 49.6771 49.6771 49.6771 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 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 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 0.05 0.05 0.05 Lower 1.8389 1.8389 1.8389 1.8389 1.4320 1.4320 1.4320 1.4320 2.4351 2.4351 2.4351 2.4351 3.9589 3.9589 3.9589 3.9589 3.5681 3.5681 3.5681 3.5681 1.2003 1.2003 1.2003 1.2003 1.8938 1.8938 1.8938 1.8938 2.4253 2.4253 2.4253 2.4253 3.0059 3.0059 3.0059 3.0059 2.4579 2.4579 2.4579 2.4579 8.5211 8.5211 8.5211 8.5211 3.8699 3.8699 3.8699 3.8699 6.1306 6.1306 6.1306 6.1306 11.4271 11.4271 11.4271 11.4271 5.5344 5.5344 5.5344 5.5344 Upper 7.0457 7.0457 7.0457 7.0457 6.6388 6.6388 6.6388 6.6388 7.6419 7.6419 7.6419 7.6419 9.1657 9.1657 9.1657 9.1657 8.7748 8.7748 8.7748 8.7748 6.4071 6.4071 6.4071 6.4071 7.1005 7.1005 7.1005 7.1005 7.6321 7.6321 7.6321 7.6321 8.2126 8.2126 8.2126 8.2126 7.6646 7.6646 7.6646 7.6646 13.7279 13.7279 13.7279 13.7279 9.0767 9.0767 9.0767 9.0767 11.3374 11.3374 11.3374 11.3374 16.6338 16.6338 16.6338 16.6338 10.7411 10.7411 10.7411 10.7411 Resid 0.55770 -0.44230 0.55770 -2.44230 -4.03542 4.96458 -1.03542 -1.03542 -1.03852 -1.03852 -2.03852 3.96148 0.43771 -3.56229 -1.56229 5.43771 -2.17147 2.82853 1.82853 -0.17147 1.19633 1.19633 -2.80367 -1.80367 1.50284 -0.49716 0.50284 -0.49716 -3.02867 3.97133 -2.02867 1.97133 0.39074 -1.60926 2.39074 -1.60926 -3.06124 3.93876 1.93876 -2.06124 0.87550 8.87550 -3.12450 -3.12450 0.52670 -2.47330 -2.47330 -1.47330 0.26602 -2.73398 -1.73398 2.26602 -2.03046 7.96954 2.96954 -1.03046 -1.13776 -0.13776 -3.13776 0.86224 James P. Geaghan - Copyright 2011 Statistical Techniques II Experimental Design examples 52 NOTE: NOTE: NOTE: Appendix 14d RBD SAS Example Page 274 proc print data=residdataPM; TITLE4 'Output from the OUTPM option'; run; There were 60 observations read from the data set WORK.RESIDDATAPM. The PROCEDURE PRINT printed page 4. PROCEDURE PRINT used (Total process time): real time 0.07 seconds cpu time 0.01 seconds Number of wire worms found for 2 fumigants and a control Fumigants are C and S, control is 0, 5 BLOCKS ANOVA with PROC MIXED - RBD with reps Output from the OUTPM option Obs 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 FUMIGANT C C C C C C C C C C C C C C C C C C C C S S S S S S S S S S S S S S S S S S S S 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 BLOCK I I I I II II II II III III III III IV IV IV IV V V V V I I I I II II II II III III III III IV IV IV IV V V V V I I I I II II II II III III III III IV IV IV IV V V V V REP 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 WORMS 5 4 5 2 0 9 3 3 4 4 3 9 7 3 5 12 4 9 8 6 5 5 1 2 6 4 5 4 2 9 3 7 6 4 8 4 2 9 7 3 12 20 8 8 7 4 4 5 9 6 7 11 12 22 17 13 7 8 5 9 LWORMS 1.79176 1.60944 1.79176 1.09861 0.00000 2.30259 1.38629 1.38629 1.60944 1.60944 1.38629 2.30259 2.07944 1.38629 1.79176 2.56495 1.60944 2.30259 2.19722 1.94591 1.79176 1.79176 0.69315 1.09861 1.94591 1.60944 1.79176 1.60944 1.09861 2.30259 1.38629 2.07944 1.94591 1.60944 2.19722 1.60944 1.09861 2.30259 2.07944 1.38629 2.56495 3.04452 2.19722 2.19722 2.07944 1.60944 1.60944 1.79176 2.30259 1.94591 2.07944 2.48491 2.56495 3.13549 2.89037 2.63906 2.07944 2.19722 1.79176 2.30259 Pred 5.25 5.25 5.25 5.25 5.25 5.25 5.25 5.25 5.25 5.25 5.25 5.25 5.25 5.25 5.25 5.25 5.25 5.25 5.25 5.25 4.80 4.80 4.80 4.80 4.80 4.80 4.80 4.80 4.80 4.80 4.80 4.80 4.80 4.80 4.80 4.80 4.80 4.80 4.80 4.80 9.70 9.70 9.70 9.70 9.70 9.70 9.70 9.70 9.70 9.70 9.70 9.70 9.70 9.70 9.70 9.70 9.70 9.70 9.70 9.70 StdErr Pred 1.20312 1.20312 1.20312 1.20312 1.20312 1.20312 1.20312 1.20312 1.20312 1.20312 1.20312 1.20312 1.20312 1.20312 1.20312 1.20312 1.20312 1.20312 1.20312 1.20312 1.20312 1.20312 1.20312 1.20312 1.20312 1.20312 1.20312 1.20312 1.20312 1.20312 1.20312 1.20312 1.20312 1.20312 1.20312 1.20312 1.20312 1.20312 1.20312 1.20312 1.20312 1.20312 1.20312 1.20312 1.20312 1.20312 1.20312 1.20312 1.20312 1.20312 1.20312 1.20312 1.20312 1.20312 1.20312 1.20312 1.20312 1.20312 1.20312 1.20312 DF 11.4653 11.4653 11.4653 11.4653 11.4653 11.4653 11.4653 11.4653 11.4653 11.4653 11.4653 11.4653 11.4653 11.4653 11.4653 11.4653 11.4653 11.4653 11.4653 11.4653 11.4653 11.4653 11.4653 11.4653 11.4653 11.4653 11.4653 11.4653 11.4653 11.4653 11.4653 11.4653 11.4653 11.4653 11.4653 11.4653 11.4653 11.4653 11.4653 11.4653 11.4653 11.4653 11.4653 11.4653 11.4653 11.4653 11.4653 11.4653 11.4653 11.4653 11.4653 11.4653 11.4653 11.4653 11.4653 11.4653 11.4653 11.4653 11.4653 11.4653 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 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 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 0.05 0.05 0.05 Lower 2.61500 2.61500 2.61500 2.61500 2.61500 2.61500 2.61500 2.61500 2.61500 2.61500 2.61500 2.61500 2.61500 2.61500 2.61500 2.61500 2.61500 2.61500 2.61500 2.61500 2.16500 2.16500 2.16500 2.16500 2.16500 2.16500 2.16500 2.16500 2.16500 2.16500 2.16500 2.16500 2.16500 2.16500 2.16500 2.16500 2.16500 2.16500 2.16500 2.16500 7.06500 7.06500 7.06500 7.06500 7.06500 7.06500 7.06500 7.06500 7.06500 7.06500 7.06500 7.06500 7.06500 7.06500 7.06500 7.06500 7.06500 7.06500 7.06500 7.06500 Upper 7.8850 7.8850 7.8850 7.8850 7.8850 7.8850 7.8850 7.8850 7.8850 7.8850 7.8850 7.8850 7.8850 7.8850 7.8850 7.8850 7.8850 7.8850 7.8850 7.8850 7.4350 7.4350 7.4350 7.4350 7.4350 7.4350 7.4350 7.4350 7.4350 7.4350 7.4350 7.4350 7.4350 7.4350 7.4350 7.4350 7.4350 7.4350 7.4350 7.4350 12.3350 12.3350 12.3350 12.3350 12.3350 12.3350 12.3350 12.3350 12.3350 12.3350 12.3350 12.3350 12.3350 12.3350 12.3350 12.3350 12.3350 12.3350 12.3350 12.3350 Resid -0.25 -1.25 -0.25 -3.25 -5.25 3.75 -2.25 -2.25 -1.25 -1.25 -2.25 3.75 1.75 -2.25 -0.25 6.75 -1.25 3.75 2.75 0.75 0.20 0.20 -3.80 -2.80 1.20 -0.80 0.20 -0.80 -2.80 4.20 -1.80 2.20 1.20 -0.80 3.20 -0.80 -2.80 4.20 2.20 -1.80 2.30 10.30 -1.70 -1.70 -2.70 -5.70 -5.70 -4.70 -0.70 -3.70 -2.70 1.30 2.30 12.30 7.30 3.30 -2.70 -1.70 -4.70 -0.70 James P. Geaghan - Copyright 2011 Statistical Techniques II Experimental Design examples Appendix 14d RBD SAS Example Page 275 54 proc univariate data=ResidDataP plot normal; var resid; 55 TITLE3 'Univariate analysis for PROC MIXED - RBD with reps'; 56 run; NOTE: The PROCEDURE UNIVARIATE printed page 5. NOTE: PROCEDURE UNIVARIATE used (Total process time): real time 0.10 seconds cpu time 0.01 seconds Number of wire worms found for 2 fumigants and a control Fumigants are C and S, control is 0, 5 BLOCKS Univariate analysis for PROC MIXED - RBD with reps The UNIVARIATE Procedure Variable: Resid (Residual) Moments N Mean Std Deviation Skewness Uncorrected SS Coeff Variation 60 0 2.74808542 1.14385572 445.566435 . Sum Weights Sum Observations Variance Kurtosis Corrected SS Std Error Mean Basic Statistical Measures Location Variability Mean 0.00000 Std Deviation Median -0.49716 Variance Mode -3.12450 Range Interquartile Range 60 0 7.55197347 1.43592384 445.566435 0.3547763 2.74809 7.55197 12.91092 3.38408 NOTE: The mode displayed is the smallest of 8 modes with a count of 2. Tests for Location: Mu0=0 Test -StatisticStudent's t t 0 Sign M -4 Signed Rank S -110 Tests for Normality Test Shapiro-Wilk Kolmogorov-Smirnov Cramer-von Mises Anderson-Darling -----p Value-----Pr > |t| 1.0000 Pr >= |M| 0.3663 Pr >= |S| 0.4227 --Statistic--W 0.918552 D 0.129494 W-Sq 0.185609 A-Sq 1.226204 -----p Value-----Pr < W 0.0007 Pr > D 0.0136 Pr > W-Sq 0.0080 Pr > A-Sq <0.0050 Quantiles (Definition 5) Quantile 100% Max 99% 95% 90% 75% Q3 50% Median 25% Q1 10% 5% 1% 0% Min Estimate 8.875503 8.875503 5.201148 3.950118 1.349586 -0.497159 -2.034492 -3.044958 -3.131129 -4.035419 -4.035419 James P. Geaghan - Copyright 2011 Statistical Techniques II Experimental Design examples Extreme Observations ------Lowest----Value Obs -4.03542 5 -3.56229 14 -3.13776 59 -3.12450 44 -3.12450 43 Stem 8 8 7 7 6 6 5 5 4 4 3 3 2 2 1 1 0 0 -0 -0 -1 -1 -2 -2 -3 -3 -4 Leaf 9 0 Appendix 14d RBD SAS Example Page 276 -----Highest----Value Obs 3.97133 30 4.96458 6 5.43771 16 7.96954 54 8.87550 42 Boxplot 1 1 0 0 04 2 00 9 0 8 034 589 22 556699 344 421 55 100000 876665 421000 8755 11110 6 0 ----+----+----+----+ 2 1 1 1 3 3 2 6 3 3 2 6 6 6 4 5 1 1 | | | | | | | | +-----+ | | | + | | | *-----* | | | | +-----+ | | | | Normal Probability Plot 8.75+ * | | * | | ++ | ++ | + | * ++ | *++ | ++ | *** | ++ | +* 2.25+ +** | +*** | ++* | +*** | ++** | +** | ++ | ++*** | ++** | ***** | *+ | ** **+ | * ++ -4.25+ * ++ +----+----+----+----+----+----+----+----+----+----+ -2 -1 0 +1 +2 68 69 PROC mixed DATA=FUMIGANT cl COVTEST; CLASSES FUMIGANT BLOCK REP; 70 TITLE3 'ANOVA with PROC MIXED - RBD with reps - using Logs'; 71 MODEL LWORMS = FUMIGANT / htype=3 DDFM=KR outp=ResidDataP; 72 RANDOM BLOCK FUMIGANT*BLOCK; 73 lsmeans fumigant / pdiff ADJUST=DUNNETT diff=controll('0'); 74 lsmeans fumigant / pdiff ADJUST=tukey; 75 RUN; NOTE:Convergence criteria met. NOTE: The data set WORK.RESIDDATAP has 60 observations and 12 variables. NOTE: The PROCEDURE MIXED printed page 8. NOTE: PROCEDURE MIXED used (Total process time): real time 0.12 seconds cpu time 0.09 seconds 75 ! QUIT; James P. Geaghan - Copyright 2011 Statistical Techniques II Experimental Design examples Appendix 14d RBD SAS Example Page 277 Number of wire worms found for 2 fumigants and a control Fumigants are C and S, control is 0, 5 BLOCKS ANOVA with PROC MIXED - RBD with reps - using Logarithms 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.FUMIGANT LWORMS Variance Components REML Profile Model-Based Satterthwaite Class Level Information Class Levels Values FUMIGANT 3 0 C S BLOCK 5 I II III IV V REP 4 1 2 3 4 Dimensions Covariance Parameters Columns in X Columns in Z Subjects Max Obs Per Subject Number Number Number Number of of of of 3 4 20 1 60 Observations Observations Read Observations Used Observations Not Used Iteration History Iteration Evaluations 0 1 1 1 Convergence criteria met. 60 60 0 -2 Res Log Like 88.06288591 84.95995798 Criterion 0.00000000 Covariance Parameter Estimates Cov Parm BLOCK FUMIGANT*BLOCK Residual Estimate 0.02554 0.02017 0.1959 Fit Statistics -2 Res Log Likelihood AIC (smaller is better) AICC (smaller is better) BIC (smaller is better) Standard Error 0.03624 0.03609 0.04131 Z Value 0.70 0.56 4.74 Pr Z 0.2405 0.2881 <.0001 Alpha 0.05 0.05 0.05 Lower 0.005068 0.003244 0.1348 Upper 27.2141 1200.67 0.3108 85.0 91.0 91.4 89.8 Type 3 Tests of Fixed Effects Num Den Effect DF DF F Value FUMIGANT 2 8 8.30 Pr > F 0.0112 James P. Geaghan - Copyright 2011 Statistical Techniques II Experimental Design examples Appendix 14d RBD SAS Example Page 278 Least Squares Means Effect FUMIGANT FUMIGANT FUMIGANT FUMIGANT FUMIGANT FUMIGANT Effect FUMIGANT FUMIGANT FUMIGANT FUMIGANT FUMIGANT FUMIGANT 0 C S 0 C S FUMIGANT 0 0 0 0 C _FUMIGANT C S C S S Estimate 2.2754 1.7076 1.6714 2.2754 1.7076 1.6714 Standard Error 0.1376 0.1376 0.1376 0.1376 0.1376 0.1376 DF 10.5 10.5 10.5 10.5 10.5 10.5 t Value 16.53 12.41 12.14 16.53 12.41 12.14 Differences ofLeast Squares Means Standard Estimate Error DF t Value Tails 0.5678 0.1663 8 3.41 Upper 0.6040 0.1663 8 3.63 Upper 0.5678 0.1663 8 3.41 Both 0.6040 0.1663 8 3.63 Both 0.03622 0.1663 8 0.22 Both Pr t 0.0046 0.0033 0.0092 0.0067 0.8331 Pr > |t| <.0001 <.0001 <.0001 <.0001 <.0001 <.0001 Adjustment Dunnett-Hsu Dunnett-Hsu Tukey-Kramer Tukey-Kramer Tukey-Kramer Adj P 0.0083 0.0061 0.0223 0.0163 0.9743 77 proc univariate data=ResidDataP plot normal; var resid; 78 TITLE3 'Univariate analysis for PROC MIXED on Logs - RBD with reps'; 79 run; NOTE: The PROCEDURE UNIVARIATE printed page 9. NOTE: PROCEDURE UNIVARIATE used (Total process time): real time 0.09 seconds cpu time 0.03 seconds Number of wire worms found for 2 fumigants and a control Fumigants are C and S, control is 0, 5 BLOCKS Univariate analysis for PROC MIXED on Logs - RBD with reps The UNIVARIATE Procedure Variable: Resid (Residual) Moments N Mean Std Deviation Skewness Uncorrected SS Coeff Variation 60 0 0.41560217 -0.5865127 10.1907847 . Sum Weights Sum Observations Variance Kurtosis Corrected SS Std Error Mean 60 0 0.17272516 1.54273956 10.1907847 0.05365401 Basic Statistical Measures Location Variability Mean 0.00000 Std Deviation 0.41560 Median 0.02165 Variance 0.17273 Mode -0.41081 Range 2.30259 Interquartile Range 0.47828 NOTE: The mode displayed is the smallest of 8 modes with a count of 2. Tests for Location: Mu0=0 Test -StatisticStudent's t t 0 Sign M 1 Signed Rank S 31 -----p Value-----Pr > |t| 1.0000 Pr >= |M| 0.8974 Pr >= |S| 0.8217 James P. Geaghan - Copyright 2011 Statistical Techniques II Experimental Design examples Tests for Normality Test Shapiro-Wilk Kolmogorov-Smirnov Cramer-von Mises Anderson-Darling Appendix 14d RBD --Statistic--W 0.971472 D 0.058041 W-Sq 0.025185 A-Sq 0.239627 SAS Example Page 279 -----p Value-----Pr < W 0.1722 Pr > D >0.1500 Pr > W-Sq >0.2500 Pr > A-Sq >0.2500 Quantiles (Definition 5) Quantile 100% Max 99% 95% 90% 75% Q3 50% Median 25% Q1 10% 5% 1% 0% Min Estimate 0.831431 0.831431 0.643056 0.588689 0.249212 0.021650 -0.229068 -0.481377 -0.596016 -1.471154 -1.471154 Extreme Observations ------Lowest-----Value -1.471154 -0.853315 -0.606960 -0.585071 -0.540326 ------Highest----- Obs 17 11 57 33 8 Stem Leaf Boxplot 8 3 7 3 6 027 5 99 4 08 3 46678 2 13555 1 13558 0 2335669 -0 8853 -1 7611100 -2 3331 -3 3210 -4 5511 -5 941 -6 1 -7 -8 5 -9 -10 -11 -12 -13 -14 7 ----+----+----+----+ Multiply Stem.Leaf by 10**-1 Value 0.597013 0.618902 0.667211 0.732700 0.831431 1 1 3 2 2 5 5 5 7 4 7 4 4 4 3 1 1 | | | | | | +-----+ | | *--+--* | | | | +-----+ | | | | | | 1 0 Obs 58 34 44 2 18 Normal Probability Plot 0.85+ ++ * | ++* | +** | *** | +*+ | **** | *** | *** | *** | ** | *** | **** | ** | **+ | * ** | *++ | +++ | ++* | +++ |+ | | | -1.45+ * +----+----+----+----+----+----+----+----+----+----+ -2 -1 0 +1 +2 James P. Geaghan - Copyright 2011 Statistical Techniques II Experimental Design examples Appendix 14e LSD SAS Example Page 280 1 dm'log;clear;output;clear'; 2 options ps=512 ls=109 nocenter nodate nonumber; 3 TITLE1 'LATIN SQUARE WITH 5 ROWS, COLUMNS AND TREATMENTS'; 4 TITLE2 'MILLET YIELDS (G) FOR SPACINGS OF 2, 4, 6, 8 AND 10 INCHES'; 5 6 ODS HTML style=minimal body='C:\SAS\Appendix17e Millet.HTML' ; NOTE: Writing HTML Body file: C:\SAS\Appendix17e Millet.HTML 7 8 **EXAMPLE 6********************************************; 9 *** Example of Latin Square Design ***; 10 *** From Snedecor & Cochran, 1980 (pg 271) ***; 11 *******************************************************; 12 OPTIONS PS=256 LS=111 NOCENTER NODATE NONUMBER; 13 14 DATA MILLET; INFILE CARDS MISSOVER; 15 INPUT ROW COLUMN treatment $ YIELD; 16 if treatment eq 'A' then spacing = 2; 17 if treatment eq 'B' then spacing = 4; 18 if treatment eq 'C' then spacing = 6; 19 if treatment eq 'D' then spacing = 8; 20 if treatment eq 'E' then spacing = 10; 21 CARDS; NOTE: The data set WORK.MILLET has 25 observations and 5 variables. NOTE: DATA statement used (Total process time): real time 0.01 seconds cpu time 0.01 seconds 21 ! RUN; 47 ; 48 PROC SORT; BY ROW COLUMN; NOTE: There were 25 observations read from the data set WORK.MILLET. NOTE: The data set WORK.MILLET has 25 observations and 5 variables. NOTE: PROCEDURE SORT used (Total process time): real time 0.00 seconds cpu time 0.00 seconds 49 PROC PRINT; VAR ROW COLUMN treatment YIELD; RUN; NOTE: There were 25 observations read from the data set WORK.MILLET. NOTE: The PROCEDURE PRINT printed page 1. NOTE: PROCEDURE PRINT used (Total process time): real time 0.12 seconds cpu time 0.03 seconds LATIN SQUARE WITH 5 ROWS, COLUMNS AND TREATMENTS MILLET YIELDS (G) FOR SPACINGS OF 2, 4, 6, 8 AND 10 INCHES Obs 1 2 3 4 5 6 7 8 9 10 11 12 ROW 1 1 1 1 1 2 2 2 2 2 3 3 COLUMN 1 2 3 4 5 1 2 3 4 5 1 2 treatment B E A C D D A E B C E B YIELD 257 230 279 287 202 245 283 245 280 260 182 252 13 14 15 16 17 18 19 20 21 22 23 24 25 3 3 3 4 4 4 4 4 5 5 5 5 5 3 4 5 1 2 3 4 5 1 2 3 4 5 C D A A C D E B C D B A E 280 246 250 203 204 227 193 259 231 271 266 334 338 James P. Geaghan - Copyright 2011 Statistical Techniques II Experimental Design examples Appendix 14e SAS Example Page 281 50 51 PROC MIXED DATA=MILLET cl COVTEST; CLASSES ROW COLUMN treatment; 52 TITLE3 'ANOVA with PROC MIXED - Latin Square'; 53 class spacing; 54 MODEL YIELD = Spacing / htype=3 DDFM=KR outp=ResidDataP; 55 RANDOM ROW COLUMN; 56 *** Row spacing levels -----------A B C D E; 57 CONTRAST 'Linear ' Spacing -2 -1 0 1 2; 58 CONTRAST 'Quadratic' Spacing 2 -1 -2 -1 2; 59 CONTRAST 'Cubic ' Spacing -1 2 0 -2 1; 60 CONTRAST 'Quartic ' Spacing 1 -4 6 -4 1; 61 RUN; QUIT; NOTE:Convergence criteria met. NOTE: The data set WORK.RESIDDATAP has 25 observations and 12 variables. NOTE: The PROCEDURE MIXED printed page 2. NOTE: PROCEDURE MIXED used (Total process time): real time 0.10 seconds cpu time 0.03 seconds LATIN SQUARE WITH 5 ROWS, COLUMNS AND TREATMENTS MILLET YIELDS (G) FOR SPACINGS OF 2, 4, 6, 8 AND 10 INCHES ANOVA with PROC MIXED - Latin Square The Mixed Procedure Model Information Data Set Dependent Variable Covariance Structure Estimation Method Residual Variance Method Fixed Effects SE Method WORK.MILLET YIELD Variance Components REML Profile Prasad-Rao-JeskeKackar-Harville Kenward-Roger Degrees of Freedom Method Class Level Information Class Levels Values ROW COLUMN treatment spacing 5 5 5 5 1 1 A 2 2 2 B 4 3 3 C 6 4 4 D 8 5 5 E 10 Dimensions Covariance Parameters Columns in X Columns in Z Subjects Max Obs Per Subject Number Number Number Number of of of of 3 6 10 1 25 Observations Observations Read Observations Used Observations Not Used Iteration History Iteration Evaluations 0 1 1 1 Convergence criteria met. 25 25 0 -2 Res Log Like 212.61749317 210.22285841 Criterion 0.00000000 James P. Geaghan - Copyright 2011 Statistical Techniques II Experimental Design examples Appendix 14e Covariance Parameter Estimates Standard Cov Parm Estimate Error ROW 468.95 488.54 COLUMN 96.1867 233.77 Residual 1055.61 430.95 FitStatistics -2 Res Log Likelihood AIC (smaller is better) AICC (smaller is better) BIC (smaller is better) Z Value 0.96 0.41 2.45 SAS Example Page 282 Pr Z 0.1686 0.3404 0.0072 Alpha 0.05 0.05 0.05 Lower 122.70 11.8899 542.81 Upper 24267 7.401E10 2876.45 210.2 216.2 217.7 215.1 Type 3 Tests of Fixed Effects Num Den Effect DF DF F Value spacing 4 12 0.98 Pr > F 0.4523 Contrasts Label Linear Quadratic Cubic Quartic Num DF 1 1 1 1 Den DF 12 12 12 12 F Value 3.75 0.03 0.14 0.02 Pr > F 0.0766 0.8713 0.7178 0.8860 Below is the same contrasts run with the sums of squares from PROC GLM. LATIN SQUARE WITH 5 ROWS, COLUMNS AND TREATMENTS MILLET YIELDS (G) FOR SPACINGS OF 2, 4, 6, 8 AND 10 INCHES ANOVA with PROC GLM - Latin Square The GLM Procedure Dependent Variable: YIELD Contrast Linear Quadratic Cubic Quartic DF 1 1 1 1 Contrast SS 3960.500000 28.928571 144.500000 22.631429 Mean Square 3960.500000 28.928571 144.500000 22.631429 F Value 3.75 0.03 0.14 0.02 Pr > F 0.0766 0.8713 0.7178 0.8860 63 proc univariate data=ResidDataP plot normal; var resid; run; NOTE: The PROCEDURE UNIVARIATE printed page 3. NOTE: PROCEDURE UNIVARIATE used (Total process time): real time 0.09 seconds cpu time 0.00 seconds LATIN SQUARE WITH 5 ROWS, COLUMNS AND TREATMENTS MILLET YIELDS (G) FOR SPACINGS OF 2, 4, 6, 8 AND 10 INCHES ANOVA with PROC MIXED - Latin Square The UNIVARIATE Procedure Variable: Resid (Residual) James P. Geaghan - Copyright 2011 Statistical Techniques II Experimental Design examples Moments N Mean Std Deviation Skewness Uncorrected SS Coeff Variation Appendix 14e 25 0 26.519579 0.5867556 16878.9137 . Sum Weights Sum Observations Variance Kurtosis Corrected SS Std Error Mean Basic Statistical Measures Location Variability Mean 0.000000 Std Deviation Median 3.939099 Variance Mode . Range Interquartile Range Tests for Location: Mu0=0 Test -StatisticStudent's t t 0 Sign M 0.5 Signed Rank S 0.5 Tests for Normality Test Shapiro-Wilk Kolmogorov-Smirnov Cramer-von Mises Anderson-Darling SAS Example Page 283 25 0 703.288072 0.94966715 16878.9137 5.30391581 26.51958 703.28807 112.32380 32.83900 -----p Value-----Pr > |t| 1.0000 Pr >= |M| 1.0000 Pr >= |S| 0.9896 --Statistic--W 0.942024 D 0.14412 W-Sq 0.071451 A-Sq 0.461065 -----p Value-----Pr < W 0.1648 Pr > D >0.1500 Pr > W-Sq >0.2500 Pr > A-Sq 0.2428 Quantiles (Definition 5) Quantile 100% Max 99% 95% 90% 75% Q3 50% Median 25% Q1 10% 5% 1% 0% Min Estimate 72.66893 72.66893 34.52834 32.33981 9.84803 3.93910 -22.99096 -37.17456 -38.41741 -39.65487 -39.65487 Extreme Observations ------Lowest----Value Obs -39.6549 11 -38.4174 5 -37.1746 21 -33.7538 16 -25.4509 19 Stem 6 4 2 0 -0 -2 -4 Leaf 3 -----Highest----Value Obs 17.2897 20 30.4420 4 32.3398 13 34.5283 24 72.6689 25 Boxplot 025 457899017 65322 874543 0 ----+----+----+----+ Multiply Stem.Leaf by 10**+1 1 0 3 9 5 6 1 | +--+--+ | | +-----+ | Normal Probability Plot 70+ * +++ | +++++++ | +++*+*+* 10+ *******+** | ++***** | * *+*+*+** * -50+ +++++++ +----+----+----+----+----+----+----+----+----+----+ -2 -1 0 +1 +2 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