Presentation on theme: "SJS SDI_71 Design of Statistical Investigations Stephen Senn 7. Orthogonal Designs Two (plus) Blocking Factors."— Presentation transcript:
SJS SDI_71 Design of Statistical Investigations Stephen Senn 7. Orthogonal Designs Two (plus) Blocking Factors
SJS SDI_72 Exp_5 (Again) This experiments was run in two sequences –Formoterol followed by salbutamol –Salbutamol followed by formoterol Suppose that values in second period tend to be higher or lower than those in first Differences formoterol -salbutamol will be affected one way or other depending on sequence
SJS SDI_73 Exp_5 A Further Factor For each PEF reading we have accounted for –the patient it was measured under –the treatment the patient was on We have not accounted for the period We now look at an analysis that does
SJS SDI_74 Exp_5 Fitting period #ANOVA fitting treat and patient # Code factor for period period<-factor(c(rep(1:2,n))) #Perform ANOVA fit3<-aov(pef~patient+period+treat) summary(fit3) multicomp(fit3,focus="treat",error.type="cwe",method="lsd")
SJS SDI_75 Exp_5 Comparison of 3 Models > summary(fit1) Df Sum of Sq Mean Sq F Value Pr(F) treat 1 13388.5 13388.46 2.56853 0.1220902 Residuals 24 125100.0 5212.50 > summary(fit2) Df Sum of Sq Mean Sq F Value Pr(F) patient 12 115213.5 9601.12 11.65357 0.000079348 treat 1 13388.5 13388.46 16.25053 0.001665618 Residuals 12 9886.5 823.88 > summary(fit3) Df Sum of Sq Mean Sq F Value Pr(F) patient 12 115213.5 9601.12 12.79457 0.0000890 period 1 984.6 984.62 1.31211 0.2763229 treat 1 14035.9 14035.92 18.70444 0.0012048 Residuals 11 8254.5 750.41
SJS SDI_77 Why the Different Estimate? Mean difference Salbutamol-Formoterol for 7 patients in seq 1 is -30.71 Mean difference Formoterol-Salbutamol for 6 patients in seq 1 is -62.50 The weighted average of these is -45.4 The un-weighted average is -46.6
SJS SDI_78 Weighted The weighted average weights the mean difference in a sequence by the number of patients Thus the difference from each patient is weighted equally This makes sense if there is no period effect. Why make a distinction between sequences if this is the case?
SJS SDI_79 Un-weighted The un-weighted average weights means equally Since there are more patients in the first sequence their individual influence is down-weighted. This makes no sense unless we regard the results as not exchangeable by sequence However, if there is a period effect then they are not exchangeable
SJS SDI_710 How the Un-weighted Approach Adjust for Bias Suppose there is a difference between period one and two and this difference is additive and equal to. Every patient will have their treatment difference affected by Those in one sequence will have added. Those in other sequence will have subtracted. Averaged over the sequences this cancels out
SJS SDI_712 The Effect of Modelling In general the variance of a treatment contrast may be expressed as the product of two factors: q and 2. For example, for the common two-sample t case q = (1/n 1 + 1/n 2 ) and 2 is the variance of the original observations within treatment groups. If further terms are added to the model the value of q will at best remain the same but in general will increase. If these terms are explanatory, however, they will reduce the value of 2.
SJS SDI_714 Efficient Experimentation and Modelling Two go hand in hand Choose explanatory factors for model –Will reduce variance, 2. Design experiment taking account of model –Minimise adverse effect on q. Randomise –Subject to constraints above
SJS SDI_715 Exp_5 and Efficiency In this case there were 14 patients initially Split 7 and 7 by sequence But one (patient 8) dropped out Hence the design is unbalanced Note that balance is not the be all and end all 7 and 6 is better than 6 and 6, although 6 and 6 is balanced
SJS SDI_716 Efficiency in General Balance in some sense produces efficiency Equal numbers per treatment etc –Provided all contrasts are of equal interest Treatments orthogonal to blocks Construct treatment plan if possible so that this happens
SJS SDI_717 Latin Squares Suppose that we have two blocking factors each at r levels. We also have r treatments and we wish to allocate these efficiently. How should we do this? One solution is to use a so-called Latin Square
SJS SDI_718 More Than one Blocking Factor - Examples Agricultural field trials –Rows and columns of a field Cross-over trials –Patients and periods Lab experiments –Technicians and days Fuel efficiency –Drivers and cars
SJS SDI_720 Latin Square 5 x 5 Latin Square: 5 levels. B A C D E A E B C D C B D E A D C E A B E D A B C Produced by SYSTAT Each treatment given once to each row and once to each column Completely orthogonal No adverse effect on q
SJS SDI_721 Design Matrices and Orthogonality Such orthogonality in design is reflected in the design matrices used for coding for the linear model. This is illustrated on the next few slides for the case of a 4 x 4 Latin square. Four subjects are treated in four periods with four treatment. The coding of the design matrix in Mathcad is illustrated.
SJS SDI_722 Exp_7 A four period cross-over in four subjects The four sequences chosen form a Latin square.