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

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

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

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

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

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

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

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.

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

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

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?

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

SJS SDI_511

SJS SDI_512

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?

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

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

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

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

SJS SDI_518 Solutions

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

SJS SDI_520 Indentifiability continued Predictions are also identifiable

SJS SDI_521 Exp_5: Means

SJS SDI_522 Exp_5: Means

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.

SJS SDI_524 Exp_5 Predicted Values

SJS SDI_525 Exp_5 Residuals

SJS SDI_526 Sums of Squares Expanding we get….

SJS SDI_527 Hence we get...

SJS SDI_528 ANOVA Identity

SJS SDI_529 ANOVA Table

SJS SDI_530 Computational Approaches Reminder In general

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

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

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

SJS SDI_534 Exp_5: Calculation 1

SJS SDI_535 Exp_5: Calculation 2

SJS SDI_536 Exp_5: Calculation 3

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

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)

SJS SDI_539 Exp_5 SPlus Results > 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 > #ANOVA just fitting treat and patient fit2 <- aov(pef ~ patient + treat) > 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

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?

Similar presentations