Download presentation

Presentation is loading. Please wait.

Published byAmia Schneider Modified over 2 years ago

1
SJS SDI_81 Design of Statistical Investigations Stephen Senn 8 Factorial Designs

2
SJS SDI_82 Introduction So far we have been looking at complications with blocking structure However, we now introduce complications in treatment structure We now look at factorial designs These are designs in which there are two or more dimensions to the treatments

3
SJS SDI_83 Exp_8 (From Clarke and Kempson) The yield of a chemical reaction is presumed to depend on two things A: The amount (low or high) in the mixture of a certain chemical B: The presence or absence of a catalyst An experiment is run to determine the importance of these in affecting yield.

4
SJS SDI_84 Treatments in Terms of Factors

5
SJS SDI_85 Terminology A and B are factors low and high are levels of the factor A absence and presence are levels of the factor B An experiment studying combinations of factors is called a factorial experiment If all four combinations are studied, then this is a 2 x 2 or 2 2 factorial.

6
SJS SDI_86 Usual Notation for 2 2 Factorials A and B are the factors a and b are the higher levels ab = the combination of both factors at higher level a = A at higher level B at lower level b = A at lower level B at higher level (1) = both factors at lower level

7
SJS SDI_87 Main Effects and Interactions The Main Effect of a factor is the average response (averaged over all levels of the other factors) to a change in the level of that factor. Thus the main effect of A is the average of the difference between a and (1) and the difference between ab and b. The interaction between two factors A and B is the difference between the effect of A at the higher level of B (ab - b) and the difference at the lower level of B (a- (1)). Sometimes, by convention, this double difference is divided by 2.

8
SJS SDI_ Factorials Definition of Effects

9
SJS SDI_89 Exp_9 (Clarke and Kempson) Factor S: source of supply of a particular material –Two sources s when first is used Factor M: the speed of running a machine –Two speeds m whenever higher is used Experiment run on five days Response: Average number of defectives per batch

10
SJS SDI_810 Exp_9 (Clarke and Kempson) The days determine the block structure of the experiment The treatment structure is that of a 2 2 factorial –S M –(1), s, m, sm

11
SJS SDI_811 Exp_9 Data

12
SJS SDI_812 Exp_9 Analysis

13
SJS SDI_813 Exp_9 Analysis Continued

14
SJS SDI_814 Treatment Structure The above analysis uses a one dimensional treatment structure –Single factor with four unordered levels We wish, however, to distinguish between constituent factors This can be done as follows

15
SJS SDI_815 Factorial Analysis

16
SJS SDI_816 ANOVA (Factorial)

17
SJS SDI_817 Exp_9 SPlus #Input data Block<-factor(rep(c(seq(1:5)),4)) Supply<-factor(rep(c(1,2),each=10)) Machine<-factor(rep(rep(c(1,2),each=5),2)) #Create new factor treatment with 4 levels Treat<-ifelse((Supply==1 & Machine==1),1,0) Treat<-ifelse((Supply==1 & Machine==2),2,Treat) Treat<-ifelse((Supply==2 & Machine==1),3,Treat) Treat<-ifelse((Supply==2 & Machine==2),4,Treat) Treat<-factor(Treat) Y<-c(5.3,5.7,5.1,5.3,5.6,11.8,13,12.6,12.1,11.5, 20,19,20.3,19.5,20.2,26.7,24.1,25.7,26,25.5)

18
SJS SDI_818 Exp_9 SPlus: Treatment as Factor with 4 Levels fit1 <- aov(Y ~ Block + Treat) > summary(fit1) Df Sum of Sq Mean Sq F Value Pr(F) Block Treat Residuals

19
SJS SDI_819 Exp_9 SPlus: Two equivalent statements using two factors with interactions > fit2 <- aov(Y ~ Block + Supply * Machine) summary(fit2) Df Sum of Sq Mean Sq F Value Pr(F) Block Supply Machine Supply:Machine Residuals > fit3 <- aov(Y ~ Block + Supply + Machine + Supply:Machine) > summary(fit3) Df Sum of Sq Mean Sq F Value Pr(F) Block Supply Machine Supply:Machine Residuals

20
SJS SDI_820 Exp_9 SPlus: Two equivalent statements using two factors without interactions > fit4 <- aov(Y ~ Block + Supply + Machine) > summary(fit4) Df Sum of Sq Mean Sq F Value Pr(F) Block Supply Machine Residuals > fit5 <- aov(Y ~ Block + Supply * Machine - Supply:Machine) > summary(fit5) Df Sum of Sq Mean Sq F Value Pr(F) Block Supply Machine Residuals

21
SJS SDI_821 Wilkinson and Roger Notation This is a common notation A = main effect of factor A, B = main effect of factor B A:B = interaction of A and B, A:B:C = three factor interaction of A, B and C + sign used to add effects - used to subtract them A*B = A + B+ A:B = main effects of A and B and their interactions A*B*C = A + B + C +A:B + A:C + B:C + A:B:C NB In their original paper Applied Statistics,1973,22, , W&R used instead of : as used in SPlus

22
SJS SDI_822 Exp_9 Design Notes The two factors and their interaction are orthogonal –consequence of treatment combinations chosen They are also orthogonal to the blocks –This is a consequence of how they were applied Each combination in each day of the week –This increases efficiency Effectively treatments are compared within blocks

23
SJS SDI_823 Exp_10 (Senn Example 7.1) Cross-over comparing two formulations at two doses –Solution and Suspension –12 g and 24 g per puff Four periods Four sequences in a Latin Square used 16 Patients allocated at random –4 to each sequence

24
SJS SDI_824 Treatment Combinations Sequences Patients ABDC 3,5,12,13 BCAD 4,6,10,16 CDBA 2,8,9,14 DACB 1,7,11,15

25
SJS SDI_825 Exp_10 Design Notes Two dimensional block structure –16 Patients x 4 periods Treatment structure factorial –Formulations x doses Treatments allocated in way that is orthogonal to block structure Latin square (replicated 4 times) –Actually the patient changes

26
SJS SDI_826 Exp_10 Splus Data Entry #Input data patient<-factor(rep(c(3, 5, 12, 13, 4, 6, 10, 16, 2, 8, 9, 14, 1,7, 11, 15),4)) treat<-factor(rep(c("sus12","sus24","sol12","sol24"),each=16)) form<-factor(rep(c("sus","sol"),each=32)) dose<-factor(rep(c(12,24,12,24),each=16)) period<-factor(rep(c(1,3,4,2,2,1,3,4,4,2,1,3,3,4,2,1),each=4)) fev1<-c(2.7, 2.5, 2.6, 2, 3.7, 0.9, 2.5, 2, 1.3, 2.2, 1.8, 1.9, 1.7, 2.2, 3.3, 2.2, 1.7, 2.4, 2.5, 2.2,3.6, 1.4, 2.6, 2.5, 1.3, 2.2, 1.9, 2.2, 1.7, 1.9, 3.7, 2.3, 2.2, 2.4, 2.4, 2.6, 3.7, 2.4, 2.6,2.2, 1.4, 2.3, 1, 2.2, 1.6, 1.8, 3.6, 2.4, 2.6, 2.4, 2.5, 2.6, 3.6, 1.1, 2.4, 2.7, 1.3, 2.3,2.7, 2.1, 2, 2.6, 3.3, 2.5)

27
SJS SDI_827 Exp_10 SPlus Analysis #fit treat as a factor fit1<-aov(fev1~patient+period+treat) summary(fit1) model.tables(fit1, type="effects", se=T, cterms="treat") #use the factorial approach with dose and form fit2<-aov(fev1~patient+period+form*dose) summary(fit2) model.tables(fit2, type="effects", se=T, cterms=c("form","dose","form:dose"))

28
SJS SDI_828 SPlus Results 1 summary(fit1) Df Sum of Sq Mean Sq F Value Pr(F) patient period treat Residuals Tables of effects treat sol12 sol24 sus12 sus Standard errors of effects treat replic

29
SJS SDI_829 SPlus Results 2 Df Sum of Sq Mean Sq F Value Pr(F) patient period form dose form:dose Residuals

30
SJS SDI_830 form sol sus dose form:dose Dim 1 : form Dim 2 : dose sol sus Standard errors of effects form dose form:dose replic

31
SJS SDI_831 Questions To what extent do you think that the model for analysis is appropriate? What sort of distribution might number of defectives have? How else might one analyse the data –If one knew the batch sizes? –If one did not? What further problems might there be? According to C&K in Exp_9 the response is mean faulty items per batch based on ten batches

Similar presentations

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google