Presentation is loading. Please wait.

Presentation is loading. Please wait.

SJS SDI_71 Design of Statistical Investigations Stephen Senn 7. Orthogonal Designs Two (plus) Blocking Factors.

Similar presentations

Presentation on theme: "SJS SDI_71 Design of Statistical Investigations Stephen Senn 7. Orthogonal Designs Two (plus) Blocking Factors."— Presentation transcript:

1 SJS SDI_71 Design of Statistical Investigations Stephen Senn 7. Orthogonal Designs Two (plus) Blocking Factors

2 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

3 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

4 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")

5 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

6 SJS SDI_76 Exp_5: Three Fits 95 % non-simultaneous confidence intervals for specified linear combinations, by the Fisher LSD method critical point: 2.0639 intervals excluding 0 are flagged by '****' Estimate Std.Error Lower Bound Upper Bound salbutamol-formoterol -45.4 28.3 -104 13.1 critical point: 2.1788 Estimate Std.Error Lower Bound Upper Bound salbutamol-formoterol -45.4 11.3 -69.9 -20.9 **** critical point: 2.201 Estimate Std.Error Lower Bound Upper Bound salbutamol-formoterol -46.6 10.8 -70.3 -22.9 ****

7 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

8 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?

9 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

10 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

11 SJS SDI_711 How the Variances are Affected

12 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.

13 SJS SDI_713 Variances in the Linear Model

14 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

15 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

16 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

17 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

18 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

19 SJS SDI_719 Latin Squares Examples

20 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

21 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.

22 SJS SDI_722 Exp_7 A four period cross-over in four subjects The four sequences chosen form a Latin square.

23 SJS SDI_723

Download ppt "SJS SDI_71 Design of Statistical Investigations Stephen Senn 7. Orthogonal Designs Two (plus) Blocking Factors."

Similar presentations

Ads by Google