Presentation is loading. Please wait.

Presentation is loading. Please wait.

SJS SDI_51 Design of Statistical Investigations Stephen Senn 5. Orthogonal Designs Randomised Blocks.

Similar presentations

Presentation on theme: "SJS SDI_51 Design of Statistical Investigations Stephen Senn 5. Orthogonal Designs Randomised Blocks."— Presentation transcript:

1 SJS SDI_51 Design of Statistical Investigations Stephen Senn 5. Orthogonal Designs Randomised Blocks

2 SJS SDI_52 Blocks So far we have ignored differences in experimental units Some subsets of units may be similar to each other but different from other subsets Such similar subsets are called blocks The presence of blocks can be exploited –By design –And by analysis

3 SJS SDI_53 Randomised Block Design We identify blocks of experimental material We allocate treatments to block at random in such a way that –each treatment appears in every block –if a treatment appears m times in one block it appears m times in all blocks –but subject to no further restriction Referred to as a randomised block design

4 SJS SDI_54 # to create randomized blocks n.b<-6 # number of blocks n.t<-3 # number of treatments n.r<-2 # number of replicates #create vector of treatments treat<-c(rep(seq(1,n.t),n.r)) #creat vector of blocks block<-seq(1,n.b) #create one permuted block unit<-sample(treat) #create other permuted blocks #and join them for(i in 1:(n.b-1)){ unit<-rbind(unit,sample(treat)) } design.frame<-data.frame(block,unit) design.frame #print design Note use of sample function

5 SJS SDI_55 Randomised Blocks SPlus Output > design.frame block unit.1 unit.2 unit.3 unit.4 unit.5 unit

6 SJS SDI_56 Exp_5 Graff-Lonnevig and Browaldh (1990), Senn and Auclair (1990) Cross-over trial of single doses of 12 g formoterol compared with 200 g salbutamol in 13 asthmatic children. Main outcome measure peak expiratory flow (PEF) 8 hours after treatment. Two sequences used with wash-out in between.

7 SJS SDI_57 Design Points Treatments are given in two periods Washout is used to allow possible carry-over to disappear Two sequences were used –Permits blinding –A voids associating particular treatment with particular period We shall assume patients were randomised to the two sequences

8 SJS SDI_58 Exp_5 The Data We shall ignore the sequence information for the moment. If we have assigned patients at random to the two possible sequences, this is a randomised blocks design

9 SJS SDI_59 Questions What do we note about the precision of measurement? –What possible explanation is there? What do we note about the patient numbers? –What possible explanation is there?

10 SJS SDI_510 Blocks in a Cross-over In this design the units are episodes of treatment As the graphs that follow will show, there is a correlation between results from the same patient Patients form the blocks of the experiment –Naturally –And by design

11 SJS SDI_511

12 SJS SDI_512

13 SJS SDI_513 Points and Questions The graph plots the salbutamol reading against the formoterol reading Each point represents a patient –triangles salbutamol/formoterol sequence –squares formoterol/salbutamol sequence All the points except one are to the right of the line of equality –What does this suggest?

14 SJS SDI_514 Blocking From field trials in agriculture A block was a set of plots of presumed similar fertility Design trick was to use each treatment within a given block –Compare like with like –Eliminate a source of variation Now used to describe any set of similar units use in design

15 SJS SDI_515 Blocks - Examples Centres in a multi-centre trial –Units are patients Cars in a fuel consumption experiment –Units are runs Patients in a cross-over trial –Units are episodes of treatment Fermentation tanks in a plant –Units are runs

16 SJS SDI_516 Model for Randomised Blocks Assume for simplicity every treatment appears once in each block Quantity to be minimised Normal equations obtain by differentiating sum of squares with respect to unknown parameters and setting equal to zero Basic model

17 SJS SDI_517 Some Notation Total of all observations Number of observations Total on treatment i Total in block j

18 SJS SDI_518 Solutions

19 SJS SDI_519 Identifiability (5.1) Is over-parameterised Not all effects are identifiable However contrasts of the form below are uniquely identifiable These are of particular interest These are not

20 SJS SDI_520 Indentifiability continued Predictions are also identifiable

21 SJS SDI_521 Exp_5: Means

22 SJS SDI_522 Exp_5: Means

23 SJS SDI_523 Predicted Value and Residual Patient 7, Formoterol Note that the data are laid out in columns for treatments and rows for blocks ( patients) for convenience but that our notation suggested rows for treatments columns for blocks. Our subscripts reflect this latter convention. Note also that since patient 8 is missing we have a potential ambiguity regarding subscripts for patients 9 onwards.

24 SJS SDI_524 Exp_5 Predicted Values

25 SJS SDI_525 Exp_5 Residuals

26 SJS SDI_526 Sums of Squares Expanding we get….

27 SJS SDI_527 Hence we get...

28 SJS SDI_528 ANOVA Identity

29 SJS SDI_529 ANOVA Table

30 SJS SDI_530 Computational Approaches Reminder In general

31 SJS SDI_531 Computational Approaches (cont) Thus to calculate the Total Sum of Squares we may proceed as follows

32 SJS SDI_532 Computational Approaches (cont) Sum of squares between blocks

33 SJS SDI_533 Computational Approaches (cont) Sum of squares between treatments

34 SJS SDI_534 Exp_5: Calculation 1

35 SJS SDI_535 Exp_5: Calculation 2

36 SJS SDI_536 Exp_5: Calculation 3

37 SJS SDI_537 Exp_5 Analysis using Excel This uses the data analysis menu of Excel

38 SJS SDI_538 Exp_5 ANOVA Analysis using SPlus (Data input details omitted) #ANOVA just fitting treat fit1<-aov(pef~treat) summary(fit1) #ANOVA fitting treat and patient fit2<-aov(pef~patient+treat) summary(fit2)

39 SJS SDI_539 Exp_5 SPlus Results > summary(fit1) Df Sum of Sq Mean Sq F Value Pr(F) treat Residuals > #ANOVA just fitting treat and patient fit2 <- aov(pef ~ patient + treat) > summary(fit2) Df Sum of Sq Mean Sq F Value Pr(F) patient treat Residuals

40 SJS SDI_540 Questions Has the treatment sum of squares changed in fitting patient? Are the degrees of freedom for treatment different? What has changed? Why has it changed? What is the net effect?

Download ppt "SJS SDI_51 Design of Statistical Investigations Stephen Senn 5. Orthogonal Designs Randomised Blocks."

Similar presentations

Ads by Google