Table Of ContentTrimsize:170mmx244mm Galwey ffirs.tex V2-07/25/2014 11:34A.M. Pageii
Trimsize:170mmx244mm Galwey ffirs.tex V2-07/25/2014 11:34A.M. Pagei
Introduction to Mixed Modelling
Trimsize:170mmx244mm Galwey ffirs.tex V2-07/25/2014 11:34A.M. Pageii
Trimsize:170mmx244mm Galwey ffirs.tex V2-07/25/2014 11:34A.M. Pageiii
Introduction to Mixed Modelling
Beyond Regression and Analysis of Variance
Second Edition
N. W. Galwey
Statistical Consulting Group, GlaxoSmithKline, UK
Trimsize:170mmx244mm Galwey ffirs.tex V2-07/25/2014 11:34A.M. Pageiv
Thiseditionfirstpublished2014
©2014JohnWiley&Sons,Ltd
Registeredoffice
JohnWiley&SonsLtd,TheAtrium,SouthernGate,Chichester,WestSussex,PO198SQ,United
Kingdom
Fordetailsofourglobaleditorialoffices,forcustomerservicesandforinformationabouthowtoapply
forpermissiontoreusethecopyrightmaterialinthisbookpleaseseeourwebsiteatwww.wiley.com.
Therightoftheauthortobeidentifiedastheauthorofthisworkhasbeenassertedinaccordancewith
theCopyright,DesignsandPatentsAct1988.
Allrightsreserved.Nopartofthispublicationmaybereproduced,storedinaretrievalsystem,or
transmitted,inanyformorbyanymeans,electronic,mechanical,photocopying,recordingor
otherwise,exceptaspermittedbytheUKCopyright,DesignsandPatentsAct1988,withouttheprior
permissionofthepublisher.
Wileyalsopublishesitsbooksinavarietyofelectronicformats.Somecontentthatappearsinprint
maynotbeavailableinelectronicbooks.
Designationsusedbycompaniestodistinguishtheirproductsareoftenclaimedastrademarks.All
brandnamesandproductnamesusedinthisbookaretradenames,servicemarks,trademarksor
registeredtrademarksoftheirrespectiveowners.Thepublisherisnotassociatedwithanyproductor
vendormentionedinthisbook.
LimitofLiability/DisclaimerofWarranty:Whilethepublisherandauthorhaveusedtheirbestefforts
inpreparingthisbook,theymakenorepresentationsorwarrantieswithrespecttotheaccuracyor
completenessofthecontentsofthisbookandspecificallydisclaimanyimpliedwarrantiesof
merchantabilityorfitnessforaparticularpurpose.Itissoldontheunderstandingthatthepublisheris
notengagedinrenderingprofessionalservicesandneitherthepublishernortheauthorshallbeliable
fordamagesarisingherefrom.Ifprofessionaladviceorotherexpertassistanceisrequired,theservices
ofacompetentprofessionalshouldbesought.
LibraryofCongressCataloging-in-PublicationData
Galwey,Nicholas
Introductiontomixedmodelling:beyondregressionandanalysisofvariance/N.W.Galwey. –
Secondedition.
pagescm
Includesbibliographicalreferencesandindex.
ISBN978-1-119-94549-9(cloth)
1. Multilevelmodels(Statistics) 2. Experimentaldesign. 3. Regressionanalysis. 4. Analysisof
variance. I.Title.
QA276.G332014
519.5–dc23
2014021670
AcataloguerecordforthisbookisavailablefromtheBritishLibrary.
ISBN:978-1-119-94549-9
Setin10/11.5ptTimesLTstd-RomanbyLaserwordsPrivateLimited,Chennai,India.
1 2014
Trimsize:170mmx244mm Galwey ftoc.tex V1-07/25/2014 6:00P.M. Pagev
Contents
Preface xi
1 Theneedformorethanonerandom-effecttermwhenfittingaregressionline 1
1.1 AdatasetwithseveralobservationsofvariableYateachvalueof
variableX 1
1.2 Simpleregressionanalysis:UseofthesoftwareGenStattoperform
theanalysis 2
1.3 Regressionanalysisonthegroupmeans 9
1.4 Aregressionmodelwithatermforthegroups 10
1.5 ConstructionoftheappropriateFtestforthesignificanceofthe
explanatoryvariablewhengroupsarepresent 13
1.6 Thedecisiontospecifyamodeltermasrandom:Amixedmodel 14
1.7 Comparisonofthetestsinamixedmodelwithatestoflackoffit 16
1.8 TheuseofREsidualMaximumLikelihood(REML)tofitthemixed
model 17
1.9 Equivalenceofthedifferentanalyseswhenthenumberofobservations
pergroupisconstant 21
1.10 Testingtheassumptionsoftheanalyses:Inspectionoftheresidualvalues 26
1.11 UseofthesoftwareRtoperformtheanalyses 28
1.12 UseofthesoftwareSAStoperformtheanalyses 33
1.13 FittingamixedmodelusingGenStat’sGraphicalUserInterface(GUI) 40
1.14 Summary 46
1.15 Exercises 47
References 51
2 Theneedformorethanonerandom-effectterminadesignedexperiment 52
2.1 Thesplitplotdesign:Adesignwithmorethanonerandom-effectterm 52
2.2 Theanalysisofvarianceofthesplitplotdesign:Arandom-effecttermfor
themainplots 54
2.3 Consequencesoffailuretorecognizethemainplotswhenanalysingthe
splitplotdesign 62
2.4 Theuseofmixedmodellingtoanalysethesplitplotdesign 64
2.5 AmoreconservativealternativetotheFandWaldstatistics 66
2.6 Justificationforregardingblockeffectsasrandom 67
Trimsize:170mmx244mm Galwey ftoc.tex V1-07/25/2014 6:00P.M. Pagevi
vi
Contents
2.7 Testingtheassumptionsoftheanalyses:Inspectionoftheresidualvalues 68
2.8 UseofRtoperformtheanalyses 71
2.9 UseofSAStoperformtheanalyses 77
2.10 Summary 81
2.11 Exercises 82
References 86
3 Estimationofthevariancesofrandom-effectterms 87
3.1 Theneedtoestimatevariancecomponents 87
3.2 Ahierarchicalrandom-effectsmodelforathree-stageassayprocess 87
3.3 Therelationshipbetweenvariancecomponentsandstratummeansquares 91
3.4 Estimationofthevariancecomponentsinthehierarchicalrandom-effects
model 93
3.5 Designofanoptimumstrategyforfuturesampling 95
3.6 UseofRtoanalysethehierarchicalthree-stageassayprocess 98
3.7 UseofSAStoanalysethehierarchicalthree-stageassayprocess 100
3.8 Geneticvariation:Acropfieldtrialwithanunbalanceddesign 102
3.9 Productionofabalancedexperimentaldesignby‘padding’with
missingvalues 106
3.10 Specificationofatreatmenttermasarandom-effectterm:Theuseof
mixed-modelanalysistoanalyseanunbalanceddataset 110
3.11 Comparisonofavariancecomponentestimatewithitsstandarderror 112
3.12 Analternativesignificancetestforvariancecomponents 113
3.13 Comparisonamongsignificancetestsforvariancecomponents 116
3.14 Inspectionoftheresidualvalues 117
3.15 Heritability:Thepredictionofgeneticadvanceunderselection 117
3.16 UseofRtoanalysetheunbalancedfieldtrial 122
3.17 UseofSAStoanalysetheunbalancedfieldtrial 125
3.18 Estimationofvariancecomponentsintheregressionanalysison
groupeddata 128
3.19 Estimationofvariancecomponentsforblockeffectsinthesplit-plot
experimentaldesign 130
3.20 Summary 132
3.21 Exercises 133
References 136
4 Intervalestimatesforfixed-effecttermsinmixedmodels 137
4.1 Theconceptofanintervalestimate 137
4.2 Standarderrorsforregressioncoefficientsinamixed-modelanalysis 138
4.3 Standarderrorsfordifferencesbetweentreatmentmeansinthesplit-plot
design 142
4.4 Asignificancetestforthedifferencebetweentreatmentmeans 144
4.5 Theleastsignificantdifference(LSD)betweentreatmentmeans 147
4.6 Standarderrorsfortreatmentmeansindesignedexperiments:
Adifferenceinapproachbetweenanalysisofvarianceand
mixed-modelanalysis 151
4.7 UseofRtoobtainSEsofmeansinadesignedexperiment 157
Trimsize:170mmx244mm Galwey ftoc.tex V1-07/25/2014 6:00P.M. Pagevii
vii
Contents
4.8 UseofSAStoobtainSEsofmeansinadesignedexperiment 159
4.9 Summary 161
4.10 Exercises 163
References 164
5 Estimationofrandomeffectsinmixedmodels:BestLinearUnbiased
Predictors(BLUPs) 165
5.1 Thedifferencebetweentheestimatesoffixedandrandomeffects 165
5.2 Themethodforestimationofrandomeffects:Thebestlinearunbiased
predictor(BLUP)or‘shrunkestimate’ 168
5.3 TherelationshipbetweentheshrinkageofBLUPsandregressiontowards
themean 170
5.4 UseofRfortheestimationoffixedandrandomeffects 176
5.5 UseofSASfortheestimationofrandomeffects 178
5.6 TheBayesianinterpretationofBLUPs:Justificationofarandom-effect
termwithoutinvokinganunderlyinginfinitepopulation 182
5.7 Summary 187
5.8 Exercises 188
References 191
6 Moreadvancedmixedmodelsformoreelaboratedatasets 192
6.1 Featuresofthemodelsintroducedsofar:Areview 192
6.2 Furthercombinationsofmodelfeatures 192
6.3 Thechoiceofmodeltermstobespecifiedasrandom 195
6.4 Disagreementconcerningtheappropriatesignificancetestwhenfixed-
andrandom-effecttermsinteract:‘Thegreatmixed-modelmuddle’ 197
6.5 Argumentsforspecifyingblockeffectsasrandom 204
6.6 Examplesofthechoiceoffixed-andrandom-effectspecificationofterms 209
6.7 Summary 213
6.8 Exercises 215
References 216
7 Threecasestudies 217
7.1 Furtherdevelopmentofmixedmodellingconceptsthroughtheanalysis
ofspecificdatasets 217
7.2 Afixed-effectsmodelwithseveralvariatesandfactors 218
7.3 UseofRtofitthefixed-effectsmodelwithseveralvariatesandfactors 233
7.4 UseofSAStofitthefixed-effectsmodelwithseveralvariatesandfactors 237
7.5 Arandomcoefficientregressionmodel 242
7.6 UseofRtofittherandomcoefficientsmodel 246
7.7 UseofSAStofittherandomcoefficientsmodel 247
7.8 Arandom-effectsmodelwithseveralfactors 249
7.9 UseofRtofittherandom-effectsmodelwithseveralfactors 266
7.10 UseofSAStofittherandom-effectsmodelwithseveralfactors 274
7.11 Summary 282
7.12 Exercises 282
References 294
Trimsize:170mmx244mm Galwey ftoc.tex V1-07/25/2014 6:00P.M. Pageviii
viii
Contents
8 Meta-analysisandthemultipletestingproblem 295
8.1 Meta-analysis:Combinedanalysisofasetofstudies 295
8.2 Fixed-effectmeta-analysiswithestimationonlyofthemaineffectof
treatment 296
8.3 Random-effectsmeta-analysiswithestimationofstudy×treatment
interactioneffects 301
8.4 Arandom-effectinteractionbetweentwofixed-effectterms 303
8.5 Meta-analysisofindividual-subjectdatausingR 307
8.6 Meta-analysisofindividual-subjectdatausingSAS 312
8.7 Meta-analysiswhenonlysummarydataareavailable 318
8.8 Themultipletestingproblem:ShrinkageofBLUPsasadefenceagainst
theWinner’sCurse 326
8.9 FittingofmultiplemodelsusingR 338
8.10 FittingofmultiplemodelsusingSAS 340
8.11 Summary 342
8.12 Exercises 343
References 348
9 Theuseofmixedmodelsfortheanalysisofunbalancedexperimentaldesigns 350
9.1 Abalancedincompleteblockdesign 350
9.2 Imbalanceduetoamissingblock:Mixed-modelanalysisofthe
incompleteblockdesign 354
9.3 UseofRtoanalysetheincompleteblockdesign 358
9.4 UseofSAStoanalysetheincompleteblockdesign 360
9.5 Relaxationoftherequirementforbalance:Alphadesigns 362
9.6 Approximatebalanceintwodirections:Thealphalphadesign 368
9.7 UseofRtoanalysethealphalphadesign 373
9.8 UseofSAStoanalysethealphalphadesign 374
9.9 Summary 376
9.10 Exercises 377
References 378
10 Beyondmixedmodelling 379
10.1 Reviewoftheusesofmixedmodels 379
10.2 Thegeneralizedlinearmixedmodel(GLMM):Fittingalogistic
(sigmoidal)curvetoproportionsofobservations 380
10.3 UseofRtofitthelogisticcurve 388
10.4 UseofSAStofitthelogisticcurve 390
10.5 FittingaGLMMtoacontingencytable:Trouble-shootingwhenthe
mixedmodellingprocessfails 392
10.6 Thehierarchicalgeneralizedlinearmodel(HGLM) 403
10.7 UseofRtofitaGLMMandaHGLMtoacontingencytable 410
10.8 UseofSAStofitaGLMMtoacontingencytable 415
10.9 Theroleofthecovariancematrixinthespecificationofamixedmodel 418
10.10 Amoregeneralpatterninthecovariancematrix:Analysisofpedigrees
andgeneticdata 421