revealing the riddle of reml

46
Revealing the Revealing the riddle of REML riddle of REML Mick O’Neill Mick O’Neill Faculty of Agriculture, Faculty of Agriculture, Food & Natural Resources, Food & Natural Resources, University of Sydney University of Sydney

Upload: shae

Post on 11-Jan-2016

33 views

Category:

Documents


1 download

DESCRIPTION

Revealing the riddle of REML. Mick O’Neill Faculty of Agriculture, Food & Natural Resources, University of Sydney. Background. Biometry 1 and 2 are core units with an applied stats focus. Many students have only Maths in Society on entry to the Faculty Biometry 3 is a Third Year elective - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Revealing the riddle of REML

Revealing the Revealing the riddle of REMLriddle of REML

Mick O’NeillMick O’Neill

Faculty of Agriculture, Food Faculty of Agriculture, Food & Natural Resources, & Natural Resources, University of SydneyUniversity of Sydney

Page 2: Revealing the riddle of REML

BackgroundBackground

• Biometry 1 and 2 are core units with an Biometry 1 and 2 are core units with an applied stats focus. Many students have applied stats focus. Many students have only Maths in Society on entry to the only Maths in Society on entry to the FacultyFaculty

• Biometry 3 is a Third Year electiveBiometry 3 is a Third Year elective• Biometry 4 is (still) a possible majorBiometry 4 is (still) a possible major• All students are now expected to design All students are now expected to design

and analyse their fourth year and analyse their fourth year experiments with little or no help from experiments with little or no help from the Biometry Unitthe Biometry Unit

Page 3: Revealing the riddle of REML

Third year Biometry Third year Biometry students can:students can:

• Design and analyse multi-strata factorial Design and analyse multi-strata factorial experiments (split-plots, strip-plots)experiments (split-plots, strip-plots)

• Perform binomial & ordinal logistic Perform binomial & ordinal logistic regression, Poisson regression, …regression, Poisson regression, …

• Analyse repeated measures data using Analyse repeated measures data using REMLREML

Page 4: Revealing the riddle of REML

Step 1. What is Step 1. What is MMaximum aximum LLikelihood?ikelihood?The likelihood is the prior

probability of obtaining the actual data in your sample

This requires you to assume that the data follow some distribution, typically:

• Binomial or Poisson for count data

• Normal or LogNormal for continuous data

Page 5: Revealing the riddle of REML

Step 1. What is Step 1. What is MMaximum aximum LLikelihood?ikelihood?The likelihood is the prior

probability of obtaining the actual data in your sample

Each of these distributions involves at least one unknown parameter (probability, mean, standard deviation, …) which must be estimated from the data.

Page 6: Revealing the riddle of REML

Step 1. What is Step 1. What is MMaximum aximum LLikelihood?ikelihood?The likelihood is the prior

probability of obtaining the actual data in your sample

Estimation is achieved by finding that parameter value which maximises the likelihood (or equivalently the log-likelihood)

Page 7: Revealing the riddle of REML

Example 1. Binomial dataExample 1. Binomial data

Number of seeds germinating in packets of 50 seeds

3939 4040 2929 ……

3131 2929 3636 ……

2727 2828 2929 ……

• Guess p = P(seed germinates)

• Evaluate LogL

• Maximise LogL by varying p

Page 8: Revealing the riddle of REML

Example 2. Normal dataExample 2. Normal data

calcium concentration (%) from a single turnip leaf

DiscDisc LeafLeaf

11 3.283.28

22 3.093.09

33 3.033.03

44 3.033.03

• Guess and

• Evaluate LogL

• Maximise LogL by varying and

Page 9: Revealing the riddle of REML

Step 2. What is REML?Step 2. What is REML?

• a likelihood that involves (as well as 2)

and

• a residual likelihood that involves only 2

It is possible to partition the likelihood into two terms:

Page 10: Revealing the riddle of REML

Step 2. What is REML?Step 2. What is REML?

• the first likelihood can be maximised to estimate (and its solution does not depend on the value of 2)

• the residual likelihood can be maximised to estimate 2 REML estimate

It is possible to partition the likelihood into two terms, in such a way that:

Page 11: Revealing the riddle of REML

How?How?

22

1

1( )

2

2

1

2

n

ii

ny

Likelihood e

22

12

2

1( )

2

1

1ReL

2

n

ii

y y

ne

n

2

2( )22

2L ,

2

nyn

e

=

Page 12: Revealing the riddle of REML

SolutionsSolutions

• MLML estimate of variance is estimate of variance is

• REMLREML estimate is estimate is

• In each case the estimate of In each case the estimate of is is the the sample meansample mean

2

12ˆ( )

n

ii

y y

n

2

12

( )ˆ

1

n

ii

y y

n

Page 13: Revealing the riddle of REML

n n-1

y

ML estimate

REML estimate

Page 14: Revealing the riddle of REML

ExtensionsExtensions

22

1

1( )

2

2

1

2

n

ii

ny

Likelihood e

22

12

2

1( )

2

1

1ReL

2

n

ii

y y

ne

n

2

2( )22

2L ,

2

nyn

e

=

Page 15: Revealing the riddle of REML
Page 16: Revealing the riddle of REML

Example 3. One-way (no Example 3. One-way (no blocking)blocking)

Fixed effectsFixed effectsWeight gain (g) of chicks fed on one of Weight gain (g) of chicks fed on one of 4 diets4 diets

Diet 1Diet 1 Diet 2Diet 2 Diet 3Diet 3 Diet 4Diet 4

3.283.28 3.093.09 3.033.03 3.033.03

3.093.09 3.483.48 3.383.38 3.383.38

3.033.03 2.802.80 2.812.81 2.762.76

3.033.03 3.383.38 3.233.23 3.263.26

MeanMeanss

3.10753.1075 3.18753.1875 3.11253.1125 3.10753.1075

Page 17: Revealing the riddle of REML

ANOVA vs REMLANOVA vs REMLANOVA:ANOVA:Source of variation d.f. s.s. m.s. v.r. F pr.Source of variation d.f. s.s. m.s. v.r. F pr.Chick stratumChick stratumDietDiet 3 0.01847 0.00616 3 0.01847 0.00616 0.10 0.9580.10 0.958ResidualResidual 12 0.73230 12 0.73230 0.061030.06103Total 15 0.75078Total 15 0.75078

REMLREML Variance Components Analysis: Variance Components Analysis:Fixed model : Constant+DietFixed model : Constant+DietRandom model : ChickRandom model : Chick

Chick used as residual termChick used as residual term

*** Residual variance model ****** Residual variance model ***Term Factor Model(order) Parameter Estimate S.e.Term Factor Model(order) Parameter Estimate S.e.Chick Identity Chick Identity Sigma2Sigma2 0.06100.0610 0.02491 0.02491

*** Wald tests for fixed effects ****** Wald tests for fixed effects ***Fixed term Wald statistic d.f. Wald/d.f. Chi-sq probFixed term Wald statistic d.f. Wald/d.f. Chi-sq probDietDiet 0.30 3 0.30 3 0.100.10 0.9600.960

Page 18: Revealing the riddle of REML

ANOVA:ANOVA:***** Tables of means ********** Tables of means *****

Grand mean 3.129Grand mean 3.129 Diet Diet_1 Diet_2 Diet_3 Diet_4Diet Diet_1 Diet_2 Diet_3 Diet_4 3.107 3.188 3.112 3.1073.107 3.188 3.112 3.107

*** Standard errors of differences of means ****** Standard errors of differences of means ***Table DietTable Dietrep. 4rep. 4d.f. 12d.f. 12s.e.d. 0.1747s.e.d. 0.1747

REMLREML Variance Components Analysis: Variance Components Analysis:

*** Table of predicted means for Diet ****** Table of predicted means for Diet ***

Diet Diet_1 Diet_2 Diet_3 Diet_4Diet Diet_1 Diet_2 Diet_3 Diet_4 3.107 3.187 3.112 3.1073.107 3.187 3.112 3.107 Standard error of differences: 0.1747Standard error of differences: 0.1747

Page 19: Revealing the riddle of REML

Example 4a. One-way (in Example 4a. One-way (in randomised blocks) – fixed randomised blocks) – fixed

treatmentstreatmentsANOVA:ANOVA:Source of variation d.f. s.s. m.s. v.r. F pr.Source of variation d.f. s.s. m.s. v.r. F pr. Block stratum 5 5.410 1.082 0.29Block stratum 5 5.410 1.082 0.29 Block.*Units* stratumBlock.*Units* stratumSpacingSpacing 4 125.661 31.415 4 125.661 31.415 8.50 <.0018.50 <.001Residual Residual 20 73.919 20 73.919 3.6963.696 REMLREML Variance Components Analysis Variance Components Analysis

(a) With Block + Spacing both (a) With Block + Spacing both fixedfixed effects: effects:

Term Factor Model(order) Parameter Estimate S.e.Term Factor Model(order) Parameter Estimate S.e.ResidualResidual Identity Sigma2 Identity Sigma2 3.6963.696 1.169 1.169

Fixed term Wald statistic d.f. Wald/d.f. Chi-sq probFixed term Wald statistic d.f. Wald/d.f. Chi-sq prob Block 1.46 5 0.29 0.917Block 1.46 5 0.29 0.917 Spacing 34.00 4 Spacing 34.00 4 8.50 <0.0018.50 <0.001

Page 20: Revealing the riddle of REML

Random blocks, fixed Random blocks, fixed treatmentstreatments

ANOVAANOVA::Source of variation d.f. s.s. m.s. v.r. F pr.Source of variation d.f. s.s. m.s. v.r. F pr.Block stratum 5 5.410 1.082 0.29Block stratum 5 5.410 1.082 0.29 Block.*Units* stratumBlock.*Units* stratumSpacing Spacing 4 125.661 31.415 4 125.661 31.415 8.50 <.0018.50 <.001Residual Residual 20 73.919 20 73.919 3.6963.696 REMLREML Variance Components Analysis Variance Components Analysis(b) With Spacing (b) With Spacing fixedfixed and Block and Block randomrandom::

*** Estimated Variance Components ****** Estimated Variance Components ***Random term Component S.e.Random term Component S.e.Block Block 0.000 BOUND0.000 BOUND *** Residual variance model ****** Residual variance model ***Term Factor Model(order) Parameter Estimate S.e.Term Factor Model(order) Parameter Estimate S.e.ResidualResidual Identity Sigma2 Identity Sigma2 3.173 3.173 0.897 0.897 *** Wald tests for fixed effects ****** Wald tests for fixed effects ***Fixed term Wald statistic d.f. Wald/d.f. Chi-sq probFixed term Wald statistic d.f. Wald/d.f. Chi-sq probSpacingSpacing 39.60 4 39.60 4 9.90 <0.0019.90 <0.001

EstimatedSource ValueBlock -0.5228Error 3.6959

Page 21: Revealing the riddle of REML

Model for RCBDModel for RCBD

Yield of soybean = Yield of soybean = Overall meanOverall mean + + Block effectBlock effect + + Spacing effectSpacing effect

+ + ErrorError

• Overall meanOverall mean and and Spacing effectsSpacing effects are are fixedfixed effectseffects

• Block effectBlock effect is a is a random term random term

• ErrorError is a is a random term random term

Page 22: Revealing the riddle of REML

General Linear Mixed General Linear Mixed ModelModel

Yield of soybean = Yield of soybean = Overall meanOverall mean + + Block effectBlock effect + + Spacing effectSpacing effect

+ + ErrorError

Y = Y = FixedFixed effects + effects + RandomRandom effects + effects + ErrorError term term

YY = = XX + + ZuZu + + ee

• The The randomrandom effects can be effects can be correlatedcorrelated• The The errorerror term can be term can be correlatedcorrelated• The The randomrandom effects are effects are uncorrelateduncorrelated with the with the

errorerror term term

Page 23: Revealing the riddle of REML

General Linear Mixed General Linear Mixed ModelModel

Y = Y = FixedFixed effects + effects + RandomRandom effects + effects + ErrorError termterm

YY = = XX + + ZuZu + + ee

2H

2N , independently of H ,u 0 G

2 HN , e 0 R

is a scaling factor, often set to 1

Page 24: Revealing the riddle of REML

2 THvar Y R ΖGΖ

• REML is used as the default to estimate to variance and covariance parameters of the model

• The algorithm does not depend on the data being balanced

Page 25: Revealing the riddle of REML

• an appropriate repeated measures analysis for normal data

• an appropriate spatial analysis for field trials

Furthermore, different choices for the variance matrices allow for :

Nested models can be compared using the change in deviance which is approximately 2 with df = change in number of parameters

Page 26: Revealing the riddle of REML

Example 5. Adjusting thesis Example 5. Adjusting thesis marks for random markersmarks for random markers

Marker Marker 11

Marker Marker 22

……Marker Marker

1010

Student Student 11

7474 6464 …… 7575

Student Student 22

6969 …… 7878

Student Student 33

7070 ……

…… …… …… …… ……

Student Student 2828 8080 …… 9696

Page 27: Revealing the riddle of REML

Average

82.1+6.

371.3 -4.571.3 -4.570.2 -5.6

77.0+1.

2

79.6+3.

873.0 -2.8

78.0+2.

269.5 -6.3

85.3+9.

5

For markers:

For students:

unadj. adj. adj.

#Marke

r:fixed

random

1 66.3 70.5 70.12 77.7 75.8 76.6

3 68.0 66.7 67.5

4 90.3 87.2 87.95 77.5 71.6 73.1

… … … …28 65.0 69.8 69.6

29 76.3 74.3 75.1

30 81.3 83.4 83.5

Page 28: Revealing the riddle of REML

Example 6. Use of devianceExample 6. Use of devianceWidths (in Widths (in m) of the dorsal shield of larvae of ticks m) of the dorsal shield of larvae of ticks

found on 4 rabbitsfound on 4 rabbits

Rabbit (host)Rabbit (host)

TickTick 11 22 33 44

11 380380 350350 354354 376376

…… …… …… …… ……

66 366366 342342 372372 360360

77 374374 366366 362362

88 382382 350350 344344

99 344344 342342

1010 364364 358358

1111 351351

1212 348348

1313 348348

Page 29: Revealing the riddle of REML

Minitab’s analysisMinitab’s analysis

SourceSource DFDF Adj MS F PAdj MS F PRabbitRabbit 3 3 602.6 5.26 0.004602.6 5.26 0.004ErrorError 3333 114.5114.5

EstimatedEstimatedSourceSource TermTerm Source Source ValueValue

11 RabbitRabbit (2) + 9.0090 (1)(2) + 9.0090 (1) Rabbit Rabbit 54.1854.18

2 Error2 Error (2) (2) ErrorError 114.48 114.48

Rabbit MeanRabbit Mean1 372.31 372.32 354.42 354.43 355.33 355.34 361.34 361.3 these are sample meansthese are sample means

Page 30: Revealing the riddle of REML

GenStat’s Linear Mixed Models analysisGenStat’s Linear Mixed Models analysis

Random term Component S.e.Random term Component S.e.Rabbit 55.0 55.8Rabbit 55.0 55.8 *** Residual variance model ****** Residual variance model ***Term Model(order) Parameter Estimate S.e.Term Model(order) Parameter Estimate S.e.Residual Identity Sigma2 114.4 28.2Residual Identity Sigma2 114.4 28.2

Table of predicted means for Rabbit Table of predicted means for Rabbit (these are BLUPs) (these are BLUPs)Rabbit 1 2 3 4Rabbit 1 2 3 4 369.9 355.5 356.0 361.2369.9 355.5 356.0 361.2 Standard error of differences: Average 4.613Standard error of differences: Average 4.613 Maximum 5.055Maximum 5.055 Minimum 4.133Minimum 4.133Average variance of differences: 21.38Average variance of differences: 21.38

Deviance d.f.Deviance d.f. 215.22 34215.22 34

Page 31: Revealing the riddle of REML

Test HTest H00: :

Method: drop Method: drop RabbitRabbit as a random term as a random term Deviance d.f.Deviance d.f.

221.21 35 for reduced model221.21 35 for reduced model

215.22 34215.22 34

Change in deviance = 6.0 with 1 dfChange in deviance = 6.0 with 1 df

P-value = 0.014P-value = 0.014

The variation in the widths of the dorsal shield of larvae The variation in the widths of the dorsal shield of larvae of ticks found among rabbits differs significantly across of ticks found among rabbits differs significantly across rabbits (P = 0.014) rabbits (P = 0.014)

The variance among rabbits is estimated to be 55.0 (The variance among rabbits is estimated to be 55.0 ( 55.7) compared to the variance within rabbits, namely 55.7) compared to the variance within rabbits, namely 114.4 (114.4 ( 28.2) 28.2)

2 0 Rabbit

Page 32: Revealing the riddle of REML

Example 7 - Repeated Example 7 - Repeated MeasuresMeasures

Growth of a fungus (in cm) over time

Blk TimeRhizoctonia

solaniTrichoderma harzianum

Trichoderma koningii

Blk TimeRhizoctonia

solaniTrichoderma harzianum

Trichoderma koningii

1

1 0.6 0.4 0.5

3

1 0.3 0.4 0.5

2 1.5 1.4 1.6 2 1.5 1.4 1.6

3 2.3 2.5 3.2 3 2.2 2.4 3.2

4 3.3 3.6 4.9 4 3.2 3.6 4.9

5 4.3 4.5 6.5 5 4.3 4.6 6.6

6 5.3 6.0 7.0 6 5.3 5.7 7.0

2

1 0.4 0.5 0.2

4

1 0.5 0.3 0.4

2 1.4 1.5 1.6 2 1.3 1.5 1.7

3 2.2 2.7 3.0 3 2.3 2.5 3.3

4 3.2 3.9 4.6 4 3.2 3.8 4.9

5 4.2 5.0 6.0 5 4.2 4.8 6.6

6 5.3 6.2 7.0 6 4.2 6.0 7.0

Page 33: Revealing the riddle of REML

Growth of fungusGrowth of fungus

0

1

2

3

4

5

6

7

8

0 2 4 6 8 10

Day

Le

ng

th

Rhizoctonia solani

Trichoderma harzianum

Trichoderma koningii

Page 34: Revealing the riddle of REML

Split plot Split plot withoutwithout Greenhouse-Geisser Greenhouse-Geisser adjustmmentadjustmment

(assumes equi-correlation structure among times)(assumes equi-correlation structure among times) Source of variation d.f. m.s. v.r. F pr.Source of variation d.f. m.s. v.r. F pr.Rep.Fungus stratumRep.Fungus stratumFungus 2 8.104 97.30 <.001Fungus 2 8.104 97.30 <.001Residual 9 0.083 3.37Residual 9 0.083 3.37 Rep.Fungus.Time stratumRep.Fungus.Time stratumTime 5 55.231 2233.21 <.001Time 5 55.231 2233.21 <.001Fungus.Time 10 0.933 37.71 <.001Fungus.Time 10 0.933 37.71 <.001Residual 45 0.025Residual 45 0.025

Estimated stratum variances Estimated stratum variances

Stratum variance d.f. variance componentStratum variance d.f. variance component

Rep.Fungus 0.0833 9 0.0098Rep.Fungus 0.0833 9 0.0098

Rep.Fungus.Time 0.0247 45 0.0247Rep.Fungus.Time 0.0247 45 0.0247

Page 35: Revealing the riddle of REML

Split plot Split plot withwith Greenhouse-Geisser Greenhouse-Geisser adjustmmentadjustmment

(tests equi-correlation structure among times)(tests equi-correlation structure among times) Source of variation d.f. m.s. v.r. F pr.Source of variation d.f. m.s. v.r. F pr.Rep.Fungus stratumRep.Fungus stratumFungus 2 8.104 97.30 <.001Fungus 2 8.104 97.30 <.001Residual 9 0.083 3.37Residual 9 0.083 3.37 Rep.Fungus.Time stratumRep.Fungus.Time stratumTime 5 55.231 2233.21 <.001Time 5 55.231 2233.21 <.001Fungus.Time 10 0.933 37.71 <.001Fungus.Time 10 0.933 37.71 <.001Residual 45 0.025Residual 45 0.025

(d.f. are multiplied by the correction factors before (d.f. are multiplied by the correction factors before calculating F probabilities)calculating F probabilities)

Box's tests for symmetry of the covariance matrix:Box's tests for symmetry of the covariance matrix: Chi-square 57.47 on 19 df: probability 0.000Chi-square 57.47 on 19 df: probability 0.000 F-test 2.93 on 19, 859 df: probability 0.000F-test 2.93 on 19, 859 df: probability 0.000

Greenhouse-Geisser epsilon 0.3206Greenhouse-Geisser epsilon 0.3206

Page 36: Revealing the riddle of REML

Fixed model : Constant+Fungus+Time+Fungus.TimeFixed model : Constant+Fungus+Time+Fungus.TimeRandom model : Rep.Fungus+Rep.Fungus.TimeRandom model : Rep.Fungus+Rep.Fungus.Time

Estimated Variance ComponentsEstimated Variance ComponentsRandom term Component S.e.Random term Component S.e.Rep.Fungus Rep.Fungus 0.009760.00976 0.00660 0.00660

Residual variance modelResidual variance modelTerm Model(order) Parameter Estimate S.e.Term Model(order) Parameter Estimate S.e.Rep.Fungus.Time Identity Sigma2 Rep.Fungus.Time Identity Sigma2 0.02470.0247 0.0052 0.0052 Deviance d.f.Deviance d.f. -109.90 52-109.90 52

Fixed term Wald statistic d.f. Wald/d.f. Chi-sq probFixed term Wald statistic d.f. Wald/d.f. Chi-sq probFungus 194.60 2 97.30 <0.001Fungus 194.60 2 97.30 <0.001Time 11166.05 5 2233.21 <0.001Time 11166.05 5 2233.21 <0.001Fungus.Time 377.08 10 37.71 <0.001Fungus.Time 377.08 10 37.71 <0.001

Split plot via REML – ignoring changing Split plot via REML – ignoring changing variancesvariances

Page 37: Revealing the riddle of REML

Fixed model : Constant+Fungus+Time+Fungus.TimeFixed model : Constant+Fungus+Time+Fungus.TimeRandom model : Rep.Fungus+Rep.Fungus.TimeRandom model : Rep.Fungus+Rep.Fungus.Time

Estimated Variance ComponentsEstimated Variance ComponentsRandom term Component S.e.Random term Component S.e.Rep.Fungus Rep.Fungus 0.010530.01053 0.00539 0.00539

Residual variance modelResidual variance modelTerm Model(order) Parameter Estimate S.e.Term Model(order) Parameter Estimate S.e.Rep.Fungus.Time Identity Sigma2 Rep.Fungus.Time Identity Sigma2 0.00820.0082 .00428 .00428 Rep Identity - - -Rep Identity - - - Fungus Identity - - -Fungus Identity - - - Time DiagonalTime Diagonal d_1 d_1 1.0001.000 FIXED FIXED d_2 d_2 1.1021.102 0.815 0.815 d_3 d_3 0.2270.227 0.215 0.215 d_4 d_4 0.2620.262 0.253 0.253 d_5 d_5 1.9651.965 1.443 1.443 d_6 d_6 13.55013.550 9.580 9.580

Split plot via REML – accounting for changing Split plot via REML – accounting for changing variances (a)variances (a)

Page 38: Revealing the riddle of REML

Fixed model : Constant+Fungus+Time+Fungus.TimeFixed model : Constant+Fungus+Time+Fungus.TimeRandom model : Rep.Fungus+Rep.Fungus.TimeRandom model : Rep.Fungus+Rep.Fungus.Time

Estimated Variance ComponentsEstimated Variance ComponentsRandom term Component S.e.Random term Component S.e.Rep.Fungus Rep.Fungus 0.010530.01053 0.00539 0.00539

Residual variance modelResidual variance modelTerm Model(order) Parameter Estimate S.e.Term Model(order) Parameter Estimate S.e.Rep.Fungus.Time Identity Sigma2 Rep.Fungus.Time Identity Sigma2 1.0001.000 FIXED FIXED Rep Identity - - -Rep Identity - - - Fungus Identity - - -Fungus Identity - - - Time DiagonalTime Diagonal d_1 d_1 0.0082 0.0082 0.0043 0.0043 d_2 d_2 0.0091 0.0091 0.0047 0.0047 d_3 d_3 0.0019 0.0019 0.0015 0.0015 d_4 d_4 0.00220.0022 0.0017 0.0017 d_5 d_5 0.01620.0162 0.0081 0.0081 d_6 d_6 0.11160.1116 0.0530 0.0530

Split plot via REML – accounting for Split plot via REML – accounting for changing variances (b)changing variances (b)

Page 39: Revealing the riddle of REML

Fixed model : Constant+Fungus+Time+Fungus.TimeFixed model : Constant+Fungus+Time+Fungus.TimeRandom model : Rep.Fungus+Rep.Fungus.TimeRandom model : Rep.Fungus+Rep.Fungus.Time

Estimated Variance ComponentsEstimated Variance ComponentsRandom term Component S.e.Random term Component S.e.Rep.Fungus 0.010616 0.005572Rep.Fungus 0.010616 0.005572

Residual variance modelResidual variance modelTerm Model(order) Parameter Estimate S.e.Term Model(order) Parameter Estimate S.e.Rep.Fungus.Time Identity Sigma2 0.0085 0.0045Rep.Fungus.Time Identity Sigma2 0.0085 0.0045 Rep Identity - - -Rep Identity - - - Fungus Identity - - -Fungus Identity - - - Time Time AR(1) hetAR(1) het phi_1phi_1 0.1480.148 0.209 0.209 d_1 1.000 FIXEDd_1 1.000 FIXED d_2 1.202 0.895d_2 1.202 0.895 d_3 0.260 0.249d_3 0.260 0.249 d_4 0.264 0.266d_4 0.264 0.266 d_5 1.829 1.347d_5 1.829 1.347 d_6 13.560 9.620 d_6 13.560 9.620

Split plot via REML – accounting for Split plot via REML – accounting for changing varianceschanging variances and an AR(1) and an AR(1) correlation structurecorrelation structure

Page 40: Revealing the riddle of REML

Deviance d.f. Deviance d.f. ChangeChange d.f. d.f.

Same variance, uncorrelated -109.90 52Same variance, uncorrelated -109.90 52

Different variances over time -151.03 47 Different variances over time -151.03 47 41.13 541.13 5

+ AR(1) correlation structure -151.59 46 0.56 1+ AR(1) correlation structure -151.59 46 0.56 1

Split plot via REML – accounting for Split plot via REML – accounting for changing varianceschanging variances and an AR(1) and an AR(1) correlation structurecorrelation structure

Page 41: Revealing the riddle of REML

Example 8 – Spatial analysisExample 8 – Spatial analysisRCBD (fixed) fertilisers Potato yields (t/ha)

11FF BB EE 31.5431.54 27.2527.25 29.7229.72

CC DD AA 29.6329.63 26.6826.68 16.8616.86

22FF CC AA 29.8229.82 25.3425.34 17.3417.34

EE DD BB 30.3930.39 27.0627.06 24.5824.58

33DD FF AA 27.8227.82 30.7730.77 17.6317.63

CC BB EE 28.0128.01 26.4926.49 30.6830.68

44CC BB EE 27.7227.72 24.124.1 31.2531.25

AA DD FF 18.3918.39 22.222.2 30.3930.39

Page 42: Revealing the riddle of REML

Source of variation d.f. m.s. v.r. F pr.Source of variation d.f. m.s. v.r. F pr. Block stratum 3 2.929 1.43Block stratum 3 2.929 1.43 Block.Treatment stratumBlock.Treatment stratumTreatment 5 92.359 45.07 <.001Treatment 5 92.359 45.07 <.001Residual 15 2.049Residual 15 2.049

Treatment A B C D E F Treatment A B C D E F

17.55 25.60 27.67 25.94 30.51 30.6317.55 25.60 27.67 25.94 30.51 30.63 *** Standard errors of differences of means ****** Standard errors of differences of means *** Table TreatmentTable Treatmentrep. 4rep. 4d.f. 15d.f. 15s.e.d. s.e.d. 1.0121.012

Page 43: Revealing the riddle of REML

Contour plot of residualsContour plot of residuals

X

Y

3.02.52.01.51.0

8

7

6

5

4

3

2

1

Res

-2 - -1-1 - 00 - 1

> 1

< -3-3 - -2

Contour Plot of Res vs Y, X

Page 44: Revealing the riddle of REML
Page 45: Revealing the riddle of REML

REMLREML Random term Component S.e.Random term Component S.e.Block 0.395 0.500Block 0.395 0.500 Residual variance modelResidual variance modelTerm Factor Model Parameter Estimate S.e.Term Factor Model Parameter Estimate S.e.Y.X Sigma2 2.849 1.739Y.X Sigma2 2.849 1.739 Y AR(1) phi_1Y AR(1) phi_1 0.70540.7054 0.2078 0.2078 X AR(1) phi_1X AR(1) phi_1 -0.2508 0.3397 -0.2508 0.3397

Deviance d.f.Deviance d.f.36.54 1436.54 14

Treatment A B C D E FTreatment A B C D E F 17.74 26.29 26.79 26.34 30.41 29.3717.74 26.29 26.79 26.34 30.41 29.37 Standard error of differences: Average 0.7749Standard error of differences: Average 0.7749 Maximum 0.8942Maximum 0.8942 Minimum 0.6465Minimum 0.6465Average variance of differences: 0.6050Average variance of differences: 0.6050

Page 46: Revealing the riddle of REML

Variance matrix for fertiliser Variance matrix for fertiliser meansmeans

A B C D E F

A 0.6930 0.4269 0.3314 0.3198 0.3766 0.2918

B 0.4269 0.6695 0.3220 0.3695 0.2762 0.3091

C 0.3314 0.3220 0.6812 0.4368 0.3495 0.3867

D 0.3198 0.3695 0.4368 0.6103 0.3438 0.3504

E 0.3766 0.2762 0.3495 0.3438 0.6824 0.3938

F 0.2918 0.3091 0.3867 0.3504 0.3938 0.5923

Standard errors of fertiliser Standard errors of fertiliser differencesdifferences

A B C D E

B 0.7132

C 0.8435 0.8407 Average = 0.7749Average = 0.7749

D 0.8147 0.7355 0.6465

E 0.7887 0.8942 0.8152 0.7779

F 0.8377 0.8023 0.7072 0.7084 0.6980