Math Treibergs. Peanut Oil Data: 2 5 Factorial design with 1/2 Replication. Name: Example April 22, Data File Used in this Analysis:

Similar documents
R version ( ) Copyright (C) 2009 The R Foundation for Statistical Computing ISBN

R version ( ) Copyright (C) 2009 The R Foundation for Statistical Computing ISBN

Straw Example: Randomized Block ANOVA

Spectrophotometer Example: One-Factor Random Effects ANOVA

Pumpkin Example: Flaws in Diagnostics: Correcting Models

(1) (AE) (BE) + (AB) + (CE) (AC) (BE) + (ABCE) +(DE) (AD) (BD) + (ABDE) + (CD) (ACDE) (BCDE) + (ABCD)

Math Treibergs. Turbine Blade Example: 2 6 Factorial Name: Example Experiment with 1 4 Replication February 22, 2016

ST3232: Design and Analysis of Experiments

Beam Example: Identifying Influential Observations using the Hat Matrix

Gas Transport Example: Confidence Intervals in the Wilcoxon Rank-Sum Test

Suppose we needed four batches of formaldehyde, and coulddoonly4runsperbatch. Thisisthena2 4 factorial in 2 2 blocks.

Natural language support but running in an English locale

Chapter 11: Factorial Designs

Answer Keys to Homework#10

Carapace Example: Confidence Intervals in the Wilcoxon Sign-rank Test

Assignment 9 Answer Keys

Munitions Example: Negative Binomial to Predict Number of Accidents

CS 5014: Research Methods in Computer Science

The One-Quarter Fraction

19. Blocking & confounding

Experimental design (DOE) - Design

Horse Kick Example: Chi-Squared Test for Goodness of Fit with Unknown Parameters

23. Fractional factorials - introduction

f Simulation Example: Simulating p-values of Two Sample Variance Test. Name: Example June 26, 2011 Math Treibergs

R version ( ) Copyright (C) 2009 The R Foundation for Statistical Computing ISBN

Session 3 Fractional Factorial Designs 4

USE OF COMPUTER EXPERIMENTS TO STUDY THE QUALITATIVE BEHAVIOR OF SOLUTIONS OF SECOND ORDER NEUTRAL DIFFERENTIAL EQUATIONS

Strategy of Experimentation III

Problem 4.4 and 6.16 of Devore discuss the Rayleigh Distribution, whose pdf is x, x > 0; x x 0. x 2 f(x; θ) dx x=0. pe p dp.

R version ( ) Copyright (C) 2009 The R Foundation for Statistical Computing ISBN

Institutionen för matematik och matematisk statistik Umeå universitet November 7, Inlämningsuppgift 3. Mariam Shirdel

CS 5014: Research Methods in Computer Science. Experimental Design. Potential Pitfalls. One-Factor (Again) Clifford A. Shaffer.

STAT451/551 Homework#11 Due: April 22, 2014

Fractional Factorial Designs

a) Prepare a normal probability plot of the effects. Which effects seem active?

TWO-LEVEL FACTORIAL EXPERIMENTS: REGULAR FRACTIONAL FACTORIALS

X = S 2 = 1 n. X i. i=1

Fractional Replications

20g g g Analyze the residuals from this experiment and comment on the model adequacy.

3.4. A computer ANOVA output is shown below. Fill in the blanks. You may give bounds on the P-value.

CSCI 688 Homework 6. Megan Rose Bryant Department of Mathematics William and Mary

Contents. TAMS38 - Lecture 8 2 k p fractional factorial design. Lecturer: Zhenxia Liu. Example 0 - continued 4. Example 0 - Glazing ceramic 3

A Statistical Approach to the Study of Qualitative Behavior of Solutions of Second Order Neutral Differential Equations

APPENDIX 1. Binodal Curve calculations

Homework 04. , not a , not a 27 3 III III

R version ( ) Copyright (C) 2009 The R Foundation for Statistical Computing ISBN

Unit 6: Fractional Factorial Experiments at Three Levels

Design and Analysis of Multi-Factored Experiments

2.830J / 6.780J / ESD.63J Control of Manufacturing Processes (SMA 6303) Spring 2008

Fractional Factorial Designs

Unreplicated 2 k Factorial Designs

Construction of Mixed-Level Orthogonal Arrays for Testing in Digital Marketing

Confounding and fractional replication in 2 n factorial systems

Statistics GIDP Ph.D. Qualifying Exam Methodology May 26 9:00am-1:00pm

Reference: Chapter 8 of Montgomery (8e)

2 k, 2 k r and 2 k-p Factorial Designs

Statistics GIDP Ph.D. Qualifying Exam Methodology May 26 9:00am-1:00pm

Design and Analysis of

Unit 9: Confounding and Fractional Factorial Designs

The 2 k Factorial Design. Dr. Mohammad Abuhaiba 1

MATH 251 MATH 251: Multivariate Calculus MATH 251 FALL 2006 EXAM-II FALL 2006 EXAM-II EXAMINATION COVER PAGE Professor Moseley

CS 484 Data Mining. Association Rule Mining 2

MATH 251 MATH 251: Multivariate Calculus MATH 251 FALL 2005 EXAM-I FALL 2005 EXAM-I EXAMINATION COVER PAGE Professor Moseley

Lecture 12: 2 k p Fractional Factorial Design

ESTIMATION METHODS FOR MISSING DATA IN UN-REPLICATED 2 FACTORIAL AND 2 FRACTIONAL FACTORIAL DESIGNS

Basic Data Analysis. Stephen Turnbull Business Administration and Public Policy Lecture 9: June 6, Abstract. Regression and R.

Reference: Chapter 6 of Montgomery(8e) Maghsoodloo

Soo King Lim Figure 1: Figure 2: Figure 3: Figure 4: Figure 5: Figure 6: Figure 7: Figure 8: Figure 9: Figure 10: Figure 11: Figure 12: Figure 13:

Design and Analysis of Multi-Factored Experiments

FRACTIONAL FACTORIAL

Higher Order Factorial Designs. Estimated Effects: Section 4.3. Main Effects: Definition 5 on page 166.

UNIT 3 BOOLEAN ALGEBRA (CONT D)

FRACTIONAL REPLICATION

On the Compounds of Hat Matrix for Six-Factor Central Composite Design with Fractional Replicates of the Factorial Portion

Confounding and Fractional Replication in Factorial Design

Design theory for relational databases

Fractional Factorials

MATH 251 MATH 251: Multivariate Calculus MATH 251 FALL 2005 EXAM-IV FALL 2005 EXAM-IV EXAMINATION COVER PAGE Professor Moseley

Reference: CHAPTER 7 of Montgomery(8e)

TWO-LEVEL FACTORIAL EXPERIMENTS: BLOCKING. Upper-case letters are associated with factors, or regressors of factorial effects, e.g.

Fractional Replication of The 2 k Design

Lecture 10: 2 k Factorial Design Montgomery: Chapter 6

Karnaugh Maps Objectives

LECTURE 10: LINEAR MODEL SELECTION PT. 1. October 16, 2017 SDS 293: Machine Learning

A B CDE F B FD D A C AF DC A F

MATH602: APPLIED STATISTICS

MATH 251 MATH 251: Multivariate Calculus MATH 251 FALL 2005 EXAM-3 FALL 2005 EXAM-III EXAMINATION COVER PAGE Professor Moseley

Strategy of Experimentation II

MATH 556 Homework 13 Due: Nov 21, Wednesday

Unit 5: Fractional Factorial Experiments at Two Levels

CHAPTER 5 KARNAUGH MAPS

Geometry Problem Solving Drill 08: Congruent Triangles

Statistical Design and Analysis of Experiments Part Two

Exercise 1. min_sup = 0.3. Items support Type a 0.5 C b 0.7 C c 0.5 C d 0.9 C e 0.6 F

(U 338-E) 2018 Nuclear Decommissioning Cost Triennial Proceeding A Workpapers

Solutions to Exercises

Karnaugh Map & Boolean Expression Simplification

Probability Distribution

Lecture 11: Blocking and Confounding in 2 k design

Lec 10: Fractions of 2 k Factorial Design

Transcription:

Math 3080 1. Treibergs Peanut Oil Data: 2 5 Factorial design with 1/2 Replication. Name: Example April 22, 2010 Data File Used in this Analysis: # Math 3080-1 Peanut Oil Data April 22, 2010 # Treibergs # # From Navidi, "Principles of Statistics for Engineers and Scientists," # McGraw Hill 2010. Taken from a study "Application of Fractional # Factorial Designs," (Quarterly Engineering, 1988) to compare factors # that affect high pressure CO2 oil extraction from peanuts. The # outcome is solubility for the peanut oil of the CO2 (mg oil/liter CO2) # # Treatment # A CO2 pressure # CO2 temperature # C peanut moisture # D CO2 flow rate # E peanut particle size # "A" "" "C" "D" "E" "Outcome" -1-1 -1-1 1 29.2 1-1 -1-1 -1 23.0-1 1-1 -1-1 37.0 1 1-1 -1 1 139.7-1 -1 1-1 -1 23.3 1-1 1-1 1 38.3-1 1 1-1 1 42.6 1 1 1-1 -1 141.4-1 -1-1 1-1 22.4 1-1 -1 1 1 37.2-1 1-1 1 1 31.3 1 1-1 1-1 48.6-1 -1 1 1 1 22.9 1-1 1 1-1 36.2-1 1 1 1-1 33.6 1 1 1 1 1 172.6 1

R Session: R version 2.10.1 (2009-12-14) Copyright (C) 2009 The R Foundation for Statistical Computing ISN 3-900051-07-0 R is free software and comes with ASOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type license() or licence() for distribution details. Natural language support but running in an English locale R is a collaborative project with many contributors. Type contributors() for more information and citation() on how to cite R or R packages in publications. Type demo() for some demos, help() for on-line help, or help.start() for an HTML browser interface to help. Type q() to quit R. [R.app GUI 1.31 (5537) powerpc-apple-darwin9.8.0] > tt <- read.table("m3081datapeanutoil.txt",header=true) Error in file(file, "rt") : cannot open the connection In addition: Warning message: In file(file, "rt") : cannot open file M3081DataPeanutOil.txt : No such file or directory > tt <- read.table("m3081datapeanutoil.txt",header=true) Error in file(file, "rt") : cannot open the connection In addition: Warning message: In file(file, "rt") : cannot open file M3081DataPeanutOil.txt : No such file or directory > tt <- read.table("m3081datapeanutoil.txt",header=true) > attach(tt) > tt A C D E Outcome 1-1 -1-1 -1 1 29.2 2 1-1 -1-1 -1 23.0 3-1 1-1 -1-1 37.0 4 1 1-1 -1 1 139.7 5-1 -1 1-1 -1 23.3 6 1-1 1-1 1 38.3 7-1 1 1-1 1 42.6 8 1 1 1-1 -1 141.4 9-1 -1-1 1-1 22.4 10 1-1 -1 1 1 37.2 11-1 1-1 1 1 31.3 12 1 1-1 1-1 48.6 13-1 -1 1 1 1 22.9 14 1-1 1 1-1 36.2 15-1 1 1 1-1 33.6 16 1 1 1 1 1 172.6 2

>#===========================================RUN ADDITIVE MODEL ANOVA============ > f1 <- aov(outcome~a++c+d+e);anova(f1) Analysis of Variance Table Response: Outcome Df Sum Sq Mean Sq F value Pr(>F) A 1 9736.8 9736.8 7.8954 0.01848 * 1 10727.8 10727.8 8.6990 0.01455 * C 1 1269.1 1269.1 1.0291 0.33428 D 1 303.6 303.6 0.2462 0.63048 E 1 1374.6 1374.6 1.1146 0.31592 Residuals 10 12332.2 1233.2 --- Signif. codes: 0 *** 0.001 ** 0.01 * 0.05. 0.1 1 >#========================SET UP CONTRASTS MATRIX================================ > E1<-rep(1,times=32);EA<-c(A,A);E<-c(,);EC<-c(C,C);ED<-c(D,D) > EE <- rep(c(-1,1),each=16);ea<-ea*e;eac<-ea*ec;ead<-ea*ed;eae<-ea*ee > EC<-E*EC;ED<-E*ED;EE<-E*EE;ECD<-EC*ED;ECE<-EC*EE;EDE<-ED*EE > EAC<-EA*EC;EAD<-EA*ED;EAE<-EA*EE;EACD<-EA*ECD;EACE<-EA*EC*EE > EADE<-EA*EDE;ECD<-E*ECD;ECE<-EC*EE;ECDE<-EC*EDE;EACD<-EA*ECD > EACE<-EAC*EE;EADE<-EA*EDE;EACDE<-EA*ECDE;ECDE<-EC*EDE > EACDE<-EAC*EDE; EDE<-E*EDE > labl<-c("1","a","b","ab","c","ac","bc","abc","d","ad","bd","abd","cd","acd","bcd", "abcd","e","ae","be","abe","ce","ace","bce","abce","de","ade","bde","abde","cde", "acde","bcde","abcde") >#=============OSERVE THAT ACD AND E ARE ALIASES (HAVE THE SAME CONTRAST)===== > A**C*D-E [1] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 > #====DEFINING FACTOR IS ACDE ECAUSE TREATMENTS ARE THOSE WITH================== > #==== ACDE=1 =================================================================== >#=============THE EXPERIMENTAL TREATMENTS ARE ALL TREATMENT COMINATIONS WITH===== >#=============DEFINING CONTRAST ACDE=1 ========================================= >#==================== "order" GIVES THE SUSCRIPTS SO ACDE[I] ARE INCREASING===== >#==================== IN THIS CASE THE ACDE=-1 ARE THE FIRST SIXTEEN============ > I <- order(eacde) >#======THE FIRST "LOCK" ARE TREATMENTS WITH ACDE=-1 OR HAVE EVEN NO. FACTORS IN== >#======COMMON WITH THE DEFINING FACTOR ACDE====================================== > labl[i[1:16]] [1] "1" "ab" "ac" "bc" "ad" "bd" "cd" "abcd" [9] "ae" "be" "ce" "abce" "de" "abde" "acde" "bcde" >#====THE OTHER TREATMENT LOCK IS THE ONE USED IN THIS 1/2 REPLICATE EXPERIMENT==== > labl[i[17:32]] [1] "a" "b" "c" "abc" "d" "abd" "acd" [8] "bcd" "e" "abe" "ace" "bce" "ade" "bde" [15] "cde" "abcde" 3

>#=================COMPUTE CELL TOTALS. EVERY OTHER CELL IS EMPTY (1/2 REP.!)====== > xtabs(outcome~a++c+d+e),, C = -1, D = -1, E = -1-1 0.0 37.0 1 23.0 0.0,, C = 1, D = -1, E = -1-1 23.3 0.0 1 0.0 141.4,, C = -1, D = 1, E = -1-1 22.4 0.0 1 0.0 48.6,, C = 1, D = 1, E = -1-1 0.0 33.6 1 36.2 0.0,, C = -1, D = -1, E = 1-1 29.2 0.0 1 0.0 139.7,, C = 1, D = -1, E = 1-1 0.0 42.6 1 38.3 0.0,, C = -1, D = 1, E = 1-1 0.0 31.3 1 37.2 0.0,, C = 1, D = 1, E = 1-1 22.9 0.0 1 0.0 172.6 4

>#===============THESE GIVE CELL SUMS. PICK OFF THE NONZERO ONES============ > VV<-as.vector(xtabs(Outcome~A++C+D+E)) > VV [1] 0.0 23.0 37.0 0.0 23.3 0.0 0.0 141.4 22.4 0.0 [11] 0.0 48.6 0.0 36.2 33.6 0.0 29.2 0.0 0.0 139.7 [21] 0.0 38.3 42.6 0.0 0.0 37.2 31.3 0.0 22.9 0.0 [31] 0.0 172.6 >#==========NONZERO CELLS ARE THOSE WITH ACDE=+1========================== >#==========THEY ARE JUST THE 16 OSERVED VALUES============================ > VY<-VV[I[17:32]];VY [1] 23.0 37.0 23.3 141.4 22.4 48.6 36.2 33.6 29.2 139.7 [11] 38.3 42.6 37.2 31.3 22.9 172.6 >#=============COMPUTE SST, CONTRASTS AND SUM SQUARES======================= > SST<-sum(VY*VY)-sum(VY)^2/16;SST [1] 35744.02 > LA <- sum(ea[i[17:32]]*vy);ssa<-la*la/16;ssa [1] 9736.756 > L <- sum(e[i[17:32]]*vy);ss<-l*l/16;ss [1] 10727.78 > LC <- sum(ec[i[17:32]]*vy);ssc<-lc*lc/16;ssc [1] 1269.141 > LD <- sum(ed[i[17:32]]*vy);ssd<-ld*ld/16;ssd [1] 303.6306 > LE <- sum(ee[i[17:32]]*vy);sse<-le*le/16;sse [1] 1374.556 > SSError<-SST-SSA-SS-SSC-SSD-SSE;SSError [1] 12332.16 5

>#==============UILD ANOVA TALE========================================== > DF<-c(1,1,1,1,1,10,15);SS<-c(SSA,SS,SSC, SSD,SSE,SSError,SST) > MSE<-SSError/10;MS<-c(SSA,SS,SSC, SSD,SSE,MSE,-1) > F<-MS/MSE;F[6]<--1;F[7]<- -1 > P<-pf(F,1,10,lower.tail=FALSE) > matrix(c(df,ss,ms,f,p),ncol=5, dimnames=list(c("a","","c","d","e","error","total"),c("df","ss","ms","f","p(>f)"))) DF SS MS F P(>F) A 1 9736.7556 9736.7556 7.8954203 0.01847872 1 10727.7806 10727.7806 8.6990307 0.01454929 C 1 1269.1406 1269.1406 1.0291312 0.33427872 D 1 303.6306 303.6306 0.2462105 0.63048062 E 1 1374.5556 1374.5556 1.1146109 0.31592039 Error 10 12332.1563 1233.2156-1.0000000 1.00000000 Total 15 35744.0194-1.0000-1.0000000 1.00000000 >#==========================COMPARE TO======================================= > anova(f1) Analysis of Variance Table Response: Outcome Df Sum Sq Mean Sq F value Pr(>F) A 1 9736.8 9736.8 7.8954 0.01848 * 1 10727.8 10727.8 8.6990 0.01455 * C 1 1269.1 1269.1 1.0291 0.33428 D 1 303.6 303.6 0.2462 0.63048 E 1 1374.6 1374.6 1.1146 0.31592 Residuals 10 12332.2 1233.2 --- Signif. codes: 0 *** 0.001 ** 0.01 * 0.05. 0.1 1 6

>#===================================MEANS===================================================== > model.tables(f1,type="means") Tables of means Grand mean 54.95625 A A -1 1 30.29 79.62-1 1 29.06 80.85 C C -1 1 46.05 63.86 D D -1 1 59.31 50.60 E E -1 1 45.69 64.23 >#========================TALE OF EFFECTS & PCT. VARIAILITY "Y HAND"======================== > EFF <- c(la/16,l/16,lc/16,ld/16,le/16) > PCT <- c(ssa/sst,ss/sst,ssc/sst,ssd/sst,sse/sst) > matrix(c(eff,pct),ncol=2,dimnames=list(c("a","","c","d","e"),c("effect","frac.variability"))) Effect Frac.Variability A 24.66875 0.272402371 25.89375 0.300127988 C 8.90625 0.035506377 D -4.35625 0.008494585 E 9.26875 0.038455542 >#================R SQ = FRACTION OF VARIAILITY ACCOUNTED FOR Y MODEL======================== > 1-SSError/SST [1] 0.6549869 7

>#=======TALE OF CONTRAST COEFFICIENTS FOR TREATMENT COMINATIONS OF THEIS DESIGN===== > J<-I[17:32] > matrix(c(ea[j],e[j],ec[j],ed[j],ee[j],vy),ncol=6, dimnames=list(labl[j], c("a","","c","d","e","outcome"))) A C D E Outcome a 1-1 -1-1 -1 23.0 b -1 1-1 -1-1 37.0 c -1-1 1-1 -1 23.3 abc 1 1 1-1 -1 141.4 d -1-1 -1 1-1 22.4 abd 1 1-1 1-1 48.6 acd 1-1 1 1-1 36.2 bcd -1 1 1 1-1 33.6 e -1-1 -1-1 1 29.2 abe 1 1-1 -1 1 139.7 ace 1-1 1-1 1 38.3 bce -1 1 1-1 1 42.6 ade 1-1 -1 1 1 37.2 bde -1 1-1 1 1 31.3 cde -1-1 1 1 1 22.9 abcde 1 1 1 1 1 172.6 > >#==============TALE OF ALIASED PAIRS. FIRST IS ALIAS OF SECOND===================== >#==============SINCE FIRST * SECOND = ACDE, THE DEFINING CONTRAST, OTH============ >#==============HAVE SAME CONTRAST RESTRICTED TO THE "EXPERIMENTAL LOCK"============ >#==============LISTING COL 2 ACKWARDS MATCHES UP THE ALIASED CONTRASTS============= >#==============THE SECOND COLUMN (ACD=1) EXPERIMENTAL TREATMENT COMOS============= > matrix(c(labl[i[1:16]],labl[j[seq(from=16,to=1,by= -1)]]),ncol=2) [,1] [,2] [1,] "1" "abcde" [2,] "ab" "cde" [3,] "ac" "bde" [4,] "bc" "ade" [5,] "ad" "bce" [6,] "bd" "ace" [7,] "cd" "abe" [8,] "abcd" "e" [9,] "ae" "bcd" [10,] "be" "acd" [11,] "ce" "abd" [12,] "abce" "d" [13,] "de" "abc" [14,] "abde" "c" [15,] "acde" "b" [16,] "bcde" "a" 8

>#=============PLOT STANDARD DIAGNOSTICS & SHAPIRO-WILK TEST FOR NORMALITY============= > layout(matrix(1:2,ncol=2)) > plot.design(data.frame(outcome,factor(a),factor(),factor(c),factor(d),factor(e))) > interaction.plot(a,,outcome) > layout(matrix(1:4,ncol=2)) > plot(outcome~factor(a),xlab="a",main="peanut Oil Data") > plot(rstandard(f1)~fitted(f1),ylab="standard. Resid.",xlab="Predicted values", ylim=max(abs(rstandard(f1)))*c(-1,1));abline(h=c(0,-2,2),lty=c(2,3,3)) > plot(fitted(f1)~outcome,ylab="predicted Outcome");abline(0,1) > qqnorm(rstandard(f1),ylab="standard. Resid.",ylim=max(abs(rstandard(f1)))*c(-1,1)) > abline(h=c(0,-2,2),lty=c(2,3,3));abline(0,1) > > shapiro.test(rstandard(f1)) Shapiro-Wilk normality test data: rstandard(f1) W = 0.9403, p-value = 0.3523 > 9

10

11