One-way ANOVAfile: anova-meat-doctype-27jan04.docBasic Model: Yij = i + ij [“cell means” coding]= + i + ij [“effects” coding](constraint for estimation? 1=0 or g=0 or i=0)Error Assumption:ij ~ indep. N(0, 2)i=1,2,…,g [treatments or populations]j=1,2,…,ni [replications]H0: 1 = … = g or equivalently, H0: 1 = … = g=0/* Bacteria in meat under 4 different conditions */options ls = 75;data meat; input condition $ logcount @@; datalines;Plastic 7.66 Plastic 6.98 Plastic 7.80Vacuum 5.26 Vacuum 5.44 Vacuum 5.80Mixed 7.41 Mixed 7.33 Mixed 7.04Co2 3.51 Co2 2.91 Co2 3.66;title bacteria growth under 4 packaging conditions;ODS RTF file='D:\baileraj\Classes\Fall 2003\sta402\SAS-programs\oneway-output.rtf’;proc boxplot; plot logcount*condition;run;proc glm data=meat order=data;title2 fitting the one-way anova model via GLM; class condition; model logcount = condition; means condition / bon tukey scheffe cldiff lines;18:18 Wednesday, January 16, 2019 1lsmeans condition / cl pdiff; contrast ‘plastic vs. rest’ condition 3 –1 –1 –1; output out=new p=yhat r=resid stdr=eresid;run;proc plot data=new;title2 residual analyses; plot resid*yhat;run;proc univariate data=new plot; var resid;run;proc boxplot data=new; plot resid*condition;run;ODS RTF CLOSE;18:18 Wednesday, January 16, 2019 218:18 Wednesday, January 16, 2019 3bacteria growth under 4 packaging conditionsfitting the one-way anova model via GLMThe GLM ProcedureClass Level InformationClass Levels Valuescondition4 Plastic Vacuum Mixed Co2Number of observations 1218:18 Wednesday, January 16, 2019 4bacteria growth under 4 packaging conditionsfitting the one-way anova model via GLMThe GLM ProcedureDependent Variable: logcountSource DFSum ofSquares Mean Square F Value Pr > FModel3 32.87280000 10.95760000 94.58 <.0001Error8 0.92680000 0.11585000Corrected Total11 33.79960000R-Square Coeff Var Root MSE logcount Mean0.972580 5.768940 0.340367 5.900000Source DF Type I SS Mean Square F Value Pr > Fcondition3 32.87280000 10.95760000 94.58 <.0001Source DF Type III SS Mean Square F Value Pr > Fcondition3 32.87280000 10.95760000 94.58<.000118:18 Wednesday, January 16, 2019 5bacteria growth under 4 packaging conditionsfitting the one-way anova model via GLMThe GLM ProcedureTukey's Studentized Range (HSD) Test for logcountNOTE: This test controls the Type I experimentwise error rate.Alpha0.05Error Degrees of Freedom8Error Mean Square0.11585Critical Value of Studentized Range4.52880Minimum Significant Difference0.89Comparisons significant at the 0.05 level are indicatedby ***.conditionComparisonDifferenceBetweenMeansSimultaneous95%ConfidenceLimitsPlastic - Mixed0.2200 -0.6700 1.1100Plastic - Vacuum1.9800 1.0900 2.8700 ***Plastic - Co24.1200 3.2300 5.0100 ***Mixed - Plastic-0.2200 -1.1100 0.6700Mixed - Vacuum1.7600 0.8700 2.6500 ***Mixed - Co23.9000 3.0100 4.7900 ***Vacuum - Plastic-1.9800 -2.8700 -1.0900 ***Vacuum - Mixed-1.7600 -2.6500 -0.8700 ***Vacuum - Co22.1400 1.2500 3.0300 ***Co2 - Plastic-4.1200 -5.0100 -3.2300 ***Co2 - Mixed-3.9000 -4.7900 -3.0100 ***Co2 - Vacuum-2.1400 -3.0300 -1.2500***18:18 Wednesday, January 16, 2019 6bacteria growth under 4 packaging conditionsfitting the one-way anova model via GLMThe GLM ProcedureBonferroni (Dunn) t Tests for logcountNOTE: This test controls the Type I experimentwise error rate, but it generally has a higher Type II error rate than Tukey's for all pairwise comparisons.Alpha0.05Error Degrees of Freedom8Error Mean Square0.11585Critical Value of t3.47888Minimum Significant Difference0.9668Comparisons significant at the 0.05 level are indicatedby ***.conditionComparisonDifferenceBetweenMeansSimultaneous95%ConfidenceLimitsPlastic - Mixed0.2200 -0.7468 1.1868Plastic - Vacuum1.9800 1.0132 2.9468 ***Plastic - Co24.1200 3.1532 5.0868 ***Mixed - Plastic-0.2200 -1.1868 0.7468Mixed - Vacuum1.7600 0.7932 2.7268 ***Mixed - Co23.9000 2.9332 4.8668 ***Vacuum - Plastic-1.9800 -2.9468 -1.0132 ***Vacuum - Mixed-1.7600 -2.7268 -0.7932 ***Vacuum - Co22.1400 1.1732 3.1068 ***Co2 - Plastic-4.1200 -5.0868 -3.1532 ***Co2 - Mixed-3.9000 -4.8668 -2.9332 ***Co2 - Vacuum-2.1400 -3.1068 -1.1732***18:18 Wednesday, January 16, 2019 7bacteria growth under 4 packaging conditionsfitting the one-way anova model via GLMThe GLM ProcedureScheffe's Test for logcountNOTE: This test controls the Type I experimentwise error rate, but it generally has a higher Type II error rate than Tukey's for all pairwise comparisons.Alpha0.05Error Degrees of Freedom8Error Mean Square0.11585Critical Value of F4.06618Minimum Significant Difference0.9706Comparisons significant at the 0.05 level are indicatedby ***.conditionComparisonDifferenceBetweenMeansSimultaneous95%ConfidenceLimitsPlastic - Mixed0.2200 -0.7506 1.1906Plastic - Vacuum1.9800 1.0094 2.9506 ***Plastic - Co24.1200 3.1494 5.0906 ***Mixed - Plastic-0.2200 -1.1906 0.7506Mixed - Vacuum1.7600 0.7894 2.7306 ***Mixed - Co23.9000 2.9294 4.8706 ***Vacuum - Plastic-1.9800 -2.9506 -1.0094 ***Vacuum - Mixed-1.7600 -2.7306 -0.7894 ***Vacuum - Co22.1400 1.1694 3.1106 ***Co2 - Plastic-4.1200 -5.0906 -3.1494 ***Co2 - Mixed-3.9000 -4.8706 -2.9294 ***Co2 - Vacuum-2.1400 -3.1106 -1.1694***18:18 Wednesday, January 16, 2019 8bacteria growth under 4 packaging conditionsfitting the one-way anova model via GLMThe GLM ProcedureTukey's Studentized Range (HSD) Test for logcountNOTE: This test controls the Type I experimentwise error rate, but it generally has a higher Type II error rate than REGWQ.Alpha0.05Error Degrees of Freedom8Error Mean Square0.11585Critical Value of Studentized Range4.52880Minimum Significant Difference0.89Means with the same letter are notsignificantly different.Tukey Grouping Mean N conditionA 7.4800 3 PlasticAA 7.2600 3 MixedB 5.5000 3 VacuumC 3.3600 3Co218:18 Wednesday, January 16, 2019 9bacteria growth under 4 packaging conditionsfitting the one-way anova model via GLMThe GLM ProcedureBonferroni (Dunn) t Tests for logcountNOTE: This test controls the Type I experimentwise error rate, but it generally has a higher Type II error rate than REGWQ.Alpha0.05Error Degrees of Freedom8Error Mean Square0.11585Critical Value of t3.47888Minimum Significant Difference0.9668Means with the same letter are notsignificantly different.Bon Grouping Mean N conditionA 7.4800 3 PlasticAA 7.2600 3 MixedB 5.5000 3 VacuumC 3.3600 3Co218:18
View Full Document