49
Precursors GLMMs References Generalized linear mixed models for biologists Ben Bolker, University of Florida McMaster University 7 May 2009 Ben Bolker, University of Florida GLMM for biologists

GLMMs References - glmm.wdfiles.comglmm.wdfiles.com/local--files/start/mcmaster-glmm.pdf · Precursors GLMMs References Outline 1 Precursors Examples Generalized linear models Mixed

  • Upload
    hamien

  • View
    225

  • Download
    4

Embed Size (px)

Citation preview

Page 1: GLMMs References - glmm.wdfiles.comglmm.wdfiles.com/local--files/start/mcmaster-glmm.pdf · Precursors GLMMs References Outline 1 Precursors Examples Generalized linear models Mixed

PrecursorsGLMMs

References

Generalized linear mixed models for biologists

Ben Bolker, University of Florida

McMaster University

7 May 2009

Ben Bolker, University of Florida GLMM for biologists

Page 2: GLMMs References - glmm.wdfiles.comglmm.wdfiles.com/local--files/start/mcmaster-glmm.pdf · Precursors GLMMs References Outline 1 Precursors Examples Generalized linear models Mixed

PrecursorsGLMMs

References

Outline

1 PrecursorsExamplesGeneralized linear modelsMixed models (LMMs)

2 GLMMsEstimationInference

Ben Bolker, University of Florida GLMM for biologists

Page 3: GLMMs References - glmm.wdfiles.comglmm.wdfiles.com/local--files/start/mcmaster-glmm.pdf · Precursors GLMMs References Outline 1 Precursors Examples Generalized linear models Mixed

PrecursorsGLMMs

References

ExamplesGeneralized linear modelsMixed models (LMMs)

Outline

1 PrecursorsExamplesGeneralized linear modelsMixed models (LMMs)

2 GLMMsEstimationInference

Ben Bolker, University of Florida GLMM for biologists

Page 4: GLMMs References - glmm.wdfiles.comglmm.wdfiles.com/local--files/start/mcmaster-glmm.pdf · Precursors GLMMs References Outline 1 Precursors Examples Generalized linear models Mixed

PrecursorsGLMMs

References

ExamplesGeneralized linear modelsMixed models (LMMs)

Coral protection by symbionts

none shrimp crabs both

Number of predation events

Symbionts

Num

ber

of b

lock

s

0

2

4

6

8

10

1

2

0

1

2

0

2

0

1

2

Ben Bolker, University of Florida GLMM for biologists

Page 5: GLMMs References - glmm.wdfiles.comglmm.wdfiles.com/local--files/start/mcmaster-glmm.pdf · Precursors GLMMs References Outline 1 Precursors Examples Generalized linear models Mixed

PrecursorsGLMMs

References

ExamplesGeneralized linear modelsMixed models (LMMs)

Arabidopsis response to fertilization & clipping

panel: nutrient, color: genotypeLo

g(1+

frui

t set

)

0

1

2

3

4

5

unclipped clipped

●●●●● ●

●●

●●

●●

●●●

●●● ●

● ●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●●

●●●

● ●

●●

●●

● ●

●●

●●

●●

●●● ●● ●

●●

●●

●●

●● ●

●●

● ●●● ●●● ●●● ●●● ●●

●● ●● ●

● ●● ●●● ●●●●

●●

● ●

●●●

●●●●●

●●●

● ●

: nutrient 1

unclipped clipped

●●

●●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●●

●●

●●

●●

●●

●●

● ●●

● ●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●●● ●● ●●● ●●●● ●

●●

●●●●●●● ●●● ●

●●

●●●● ●

●●●●●●

●●

: nutrient 8

Ben Bolker, University of Florida GLMM for biologists

Page 6: GLMMs References - glmm.wdfiles.comglmm.wdfiles.com/local--files/start/mcmaster-glmm.pdf · Precursors GLMMs References Outline 1 Precursors Examples Generalized linear models Mixed

PrecursorsGLMMs

References

ExamplesGeneralized linear modelsMixed models (LMMs)

Environmental stress: Glycera cell survival

H2S

Cop

per

0

33.3

66.6

133.3

0 0.03 0.1 0.32

Osm=12.8Normoxia

Osm=22.4Normoxia

0 0.03 0.1 0.32

Osm=32Normoxia

Osm=41.6Normoxia

0 0.03 0.1 0.32

Osm=51.2Normoxia

Osm=12.8Anoxia

0 0.03 0.1 0.32

Osm=22.4Anoxia

Osm=32Anoxia

0 0.03 0.1 0.32

Osm=41.6Anoxia

0

33.3

66.6

133.3

Osm=51.2Anoxia

0.0

0.2

0.4

0.6

0.8

1.0

Ben Bolker, University of Florida GLMM for biologists

Page 7: GLMMs References - glmm.wdfiles.comglmm.wdfiles.com/local--files/start/mcmaster-glmm.pdf · Precursors GLMMs References Outline 1 Precursors Examples Generalized linear models Mixed

PrecursorsGLMMs

References

ExamplesGeneralized linear modelsMixed models (LMMs)

Outline

1 PrecursorsExamplesGeneralized linear modelsMixed models (LMMs)

2 GLMMsEstimationInference

Ben Bolker, University of Florida GLMM for biologists

Page 8: GLMMs References - glmm.wdfiles.comglmm.wdfiles.com/local--files/start/mcmaster-glmm.pdf · Precursors GLMMs References Outline 1 Precursors Examples Generalized linear models Mixed

PrecursorsGLMMs

References

ExamplesGeneralized linear modelsMixed models (LMMs)

Generalized linear models (GLMs)

non-normal data, (some) nonlinear relationships; modeling vialinear predictor

presence/absence, alive/dead (binomial)count data (Poisson, negative binomial)

typical applications: logistic regression (binomial/logistic),Poisson regression (Poisson/exponential)

Ben Bolker, University of Florida GLMM for biologists

Page 9: GLMMs References - glmm.wdfiles.comglmm.wdfiles.com/local--files/start/mcmaster-glmm.pdf · Precursors GLMMs References Outline 1 Precursors Examples Generalized linear models Mixed

PrecursorsGLMMs

References

ExamplesGeneralized linear modelsMixed models (LMMs)

Generalized linear models (GLMs)

non-normal data, (some) nonlinear relationships; modeling vialinear predictor

presence/absence, alive/dead (binomial)count data (Poisson, negative binomial)

typical applications: logistic regression (binomial/logistic),Poisson regression (Poisson/exponential)

Ben Bolker, University of Florida GLMM for biologists

Page 10: GLMMs References - glmm.wdfiles.comglmm.wdfiles.com/local--files/start/mcmaster-glmm.pdf · Precursors GLMMs References Outline 1 Precursors Examples Generalized linear models Mixed

PrecursorsGLMMs

References

ExamplesGeneralized linear modelsMixed models (LMMs)

Generalized linear models (GLMs)

non-normal data, (some) nonlinear relationships; modeling vialinear predictor

presence/absence, alive/dead (binomial)count data (Poisson, negative binomial)

typical applications: logistic regression (binomial/logistic),Poisson regression (Poisson/exponential)

Ben Bolker, University of Florida GLMM for biologists

Page 11: GLMMs References - glmm.wdfiles.comglmm.wdfiles.com/local--files/start/mcmaster-glmm.pdf · Precursors GLMMs References Outline 1 Precursors Examples Generalized linear models Mixed

PrecursorsGLMMs

References

ExamplesGeneralized linear modelsMixed models (LMMs)

Outline

1 PrecursorsExamplesGeneralized linear modelsMixed models (LMMs)

2 GLMMsEstimationInference

Ben Bolker, University of Florida GLMM for biologists

Page 12: GLMMs References - glmm.wdfiles.comglmm.wdfiles.com/local--files/start/mcmaster-glmm.pdf · Precursors GLMMs References Outline 1 Precursors Examples Generalized linear models Mixed

PrecursorsGLMMs

References

ExamplesGeneralized linear modelsMixed models (LMMs)

Random effects (RE)

examples: experimental or observational “blocks” (temporal,spatial); species or genera; individuals; genotypes

inference on population of units rather than individual units

(units randomly selected from all possible units)

(reasonably large number of units)

Ben Bolker, University of Florida GLMM for biologists

Page 13: GLMMs References - glmm.wdfiles.comglmm.wdfiles.com/local--files/start/mcmaster-glmm.pdf · Precursors GLMMs References Outline 1 Precursors Examples Generalized linear models Mixed

PrecursorsGLMMs

References

ExamplesGeneralized linear modelsMixed models (LMMs)

Random effects (RE)

examples: experimental or observational “blocks” (temporal,spatial); species or genera; individuals; genotypes

inference on population of units rather than individual units

(units randomly selected from all possible units)

(reasonably large number of units)

Ben Bolker, University of Florida GLMM for biologists

Page 14: GLMMs References - glmm.wdfiles.comglmm.wdfiles.com/local--files/start/mcmaster-glmm.pdf · Precursors GLMMs References Outline 1 Precursors Examples Generalized linear models Mixed

PrecursorsGLMMs

References

ExamplesGeneralized linear modelsMixed models (LMMs)

Random effects (RE)

examples: experimental or observational “blocks” (temporal,spatial); species or genera; individuals; genotypes

inference on population of units rather than individual units

(units randomly selected from all possible units)

(reasonably large number of units)

Ben Bolker, University of Florida GLMM for biologists

Page 15: GLMMs References - glmm.wdfiles.comglmm.wdfiles.com/local--files/start/mcmaster-glmm.pdf · Precursors GLMMs References Outline 1 Precursors Examples Generalized linear models Mixed

PrecursorsGLMMs

References

ExamplesGeneralized linear modelsMixed models (LMMs)

Random effects (RE)

examples: experimental or observational “blocks” (temporal,spatial); species or genera; individuals; genotypes

inference on population of units rather than individual units

(units randomly selected from all possible units)

(reasonably large number of units)

Ben Bolker, University of Florida GLMM for biologists

Page 16: GLMMs References - glmm.wdfiles.comglmm.wdfiles.com/local--files/start/mcmaster-glmm.pdf · Precursors GLMMs References Outline 1 Precursors Examples Generalized linear models Mixed

PrecursorsGLMMs

References

ExamplesGeneralized linear modelsMixed models (LMMs)

Mixed models: classical approach

Partition sums of squares, calculate null expectations if fixedeffect is 0 (all coefficients βi = 0) or RE variance=0

Figure out numerator (model) & denominator (residual) sumsof squares and degrees of freedom

Model SSQ, df: variability explained by the “effect”(difference between model with and without the effect) andnumber of parameters usedResidual SSQ, df: variability caused by finite sample size(number of observations minus number “used up” by themodel)

Ben Bolker, University of Florida GLMM for biologists

Page 17: GLMMs References - glmm.wdfiles.comglmm.wdfiles.com/local--files/start/mcmaster-glmm.pdf · Precursors GLMMs References Outline 1 Precursors Examples Generalized linear models Mixed

PrecursorsGLMMs

References

ExamplesGeneralized linear modelsMixed models (LMMs)

Mixed models: classical approach

Partition sums of squares, calculate null expectations if fixedeffect is 0 (all coefficients βi = 0) or RE variance=0

Figure out numerator (model) & denominator (residual) sumsof squares and degrees of freedom

Model SSQ, df: variability explained by the “effect”(difference between model with and without the effect) andnumber of parameters usedResidual SSQ, df: variability caused by finite sample size(number of observations minus number “used up” by themodel)

Ben Bolker, University of Florida GLMM for biologists

Page 18: GLMMs References - glmm.wdfiles.comglmm.wdfiles.com/local--files/start/mcmaster-glmm.pdf · Precursors GLMMs References Outline 1 Precursors Examples Generalized linear models Mixed

PrecursorsGLMMs

References

ExamplesGeneralized linear modelsMixed models (LMMs)

Classical LMM cont.

Robust, practical

OK if

data are Normaldesign is (nearly) balanceddesign not too complicated (single RE, or nested REs)(crossed REs: e.g. year effects that apply across all spatialblocks)

Ben Bolker, University of Florida GLMM for biologists

Page 19: GLMMs References - glmm.wdfiles.comglmm.wdfiles.com/local--files/start/mcmaster-glmm.pdf · Precursors GLMMs References Outline 1 Precursors Examples Generalized linear models Mixed

PrecursorsGLMMs

References

ExamplesGeneralized linear modelsMixed models (LMMs)

Mixed models: modern approach

Construct a likelihood for the data(Prob(observing data|parameters)) — in mixed models,requires integrating over possible values of REs (marginallikelihood)

e.g.:

likelihood of i th obs. in block j is LNormal(xij |θi , σ2w )

likelihood of a particular block mean θj is LNormal(θj |0, σ2b)

overall likelihood is∫

L(xij |θj , σ2w )L(θj |0, σ2

b) dθj

Figure out how to do the integral

Ben Bolker, University of Florida GLMM for biologists

Page 20: GLMMs References - glmm.wdfiles.comglmm.wdfiles.com/local--files/start/mcmaster-glmm.pdf · Precursors GLMMs References Outline 1 Precursors Examples Generalized linear models Mixed

PrecursorsGLMMs

References

ExamplesGeneralized linear modelsMixed models (LMMs)

Mixed models: modern approach

Construct a likelihood for the data(Prob(observing data|parameters)) — in mixed models,requires integrating over possible values of REs (marginallikelihood)

e.g.:

likelihood of i th obs. in block j is LNormal(xij |θi , σ2w )

likelihood of a particular block mean θj is LNormal(θj |0, σ2b)

overall likelihood is∫

L(xij |θj , σ2w )L(θj |0, σ2

b) dθj

Figure out how to do the integral

Ben Bolker, University of Florida GLMM for biologists

Page 21: GLMMs References - glmm.wdfiles.comglmm.wdfiles.com/local--files/start/mcmaster-glmm.pdf · Precursors GLMMs References Outline 1 Precursors Examples Generalized linear models Mixed

PrecursorsGLMMs

References

ExamplesGeneralized linear modelsMixed models (LMMs)

Mixed models: modern approach

Construct a likelihood for the data(Prob(observing data|parameters)) — in mixed models,requires integrating over possible values of REs (marginallikelihood)

e.g.:

likelihood of i th obs. in block j is LNormal(xij |θi , σ2w )

likelihood of a particular block mean θj is LNormal(θj |0, σ2b)

overall likelihood is∫

L(xij |θj , σ2w )L(θj |0, σ2

b) dθj

Figure out how to do the integral

Ben Bolker, University of Florida GLMM for biologists

Page 22: GLMMs References - glmm.wdfiles.comglmm.wdfiles.com/local--files/start/mcmaster-glmm.pdf · Precursors GLMMs References Outline 1 Precursors Examples Generalized linear models Mixed

PrecursorsGLMMs

References

ExamplesGeneralized linear modelsMixed models (LMMs)

Shrinkage

● ●

●●

●● ● ● ●

●● ● ● ●

● ● ● ● ● ● ●●

Arabidopsis block estimates

Genotype

Mea

n(lo

g) fr

uit s

et

0 5 10 15 20 25

−15

−3

0

3

●● ●

●●

●● ● ● ●

●● ● ● ●

● ● ● ●● ● ●

23 10

810

43

9 9 4 64 2 6 10 5

7 9 4 9 11 2 5 5

Ben Bolker, University of Florida GLMM for biologists

Page 23: GLMMs References - glmm.wdfiles.comglmm.wdfiles.com/local--files/start/mcmaster-glmm.pdf · Precursors GLMMs References Outline 1 Precursors Examples Generalized linear models Mixed

PrecursorsGLMMs

References

ExamplesGeneralized linear modelsMixed models (LMMs)

RE examples

Coral symbionts: simple experimental blocks, RE affectsintercept (overall probability of predation in block)

Glycera: applied to cells from 10 individuals, RE again affectsintercept (cell survival prob.)

Arabidopsis: region (3 levels, treated as fixed) / population /genotype: affects intercept (overall fruit set) as well astreatment effects (nutrients, herbivory, interaction)

Ben Bolker, University of Florida GLMM for biologists

Page 24: GLMMs References - glmm.wdfiles.comglmm.wdfiles.com/local--files/start/mcmaster-glmm.pdf · Precursors GLMMs References Outline 1 Precursors Examples Generalized linear models Mixed

PrecursorsGLMMs

References

EstimationInference

Outline

1 PrecursorsExamplesGeneralized linear modelsMixed models (LMMs)

2 GLMMsEstimationInference

Ben Bolker, University of Florida GLMM for biologists

Page 25: GLMMs References - glmm.wdfiles.comglmm.wdfiles.com/local--files/start/mcmaster-glmm.pdf · Precursors GLMMs References Outline 1 Precursors Examples Generalized linear models Mixed

PrecursorsGLMMs

References

EstimationInference

Penalized quasi-likelihood (PQL)

alternate steps of estimating GLM given known blockvariances; estimate LMMs given GLM fit

flexible (allows spatial/temporal correlations, crossed REs)

biased for small unit samples (e.g. counts < 5, binary orlow-survival data) (Breslow, 2004)

nevertheless, widely used: SAS PROC GLIMMIX, R glmmPQL:in ≈ 90% of small-unit-sample cases

Ben Bolker, University of Florida GLMM for biologists

Page 26: GLMMs References - glmm.wdfiles.comglmm.wdfiles.com/local--files/start/mcmaster-glmm.pdf · Precursors GLMMs References Outline 1 Precursors Examples Generalized linear models Mixed

PrecursorsGLMMs

References

EstimationInference

Penalized quasi-likelihood (PQL)

alternate steps of estimating GLM given known blockvariances; estimate LMMs given GLM fit

flexible (allows spatial/temporal correlations, crossed REs)

biased for small unit samples (e.g. counts < 5, binary orlow-survival data) (Breslow, 2004)

nevertheless, widely used: SAS PROC GLIMMIX, R glmmPQL:in ≈ 90% of small-unit-sample cases

Ben Bolker, University of Florida GLMM for biologists

Page 27: GLMMs References - glmm.wdfiles.comglmm.wdfiles.com/local--files/start/mcmaster-glmm.pdf · Precursors GLMMs References Outline 1 Precursors Examples Generalized linear models Mixed

PrecursorsGLMMs

References

EstimationInference

Penalized quasi-likelihood (PQL)

alternate steps of estimating GLM given known blockvariances; estimate LMMs given GLM fit

flexible (allows spatial/temporal correlations, crossed REs)

biased for small unit samples (e.g. counts < 5, binary orlow-survival data) (Breslow, 2004)

nevertheless, widely used: SAS PROC GLIMMIX, R glmmPQL:in ≈ 90% of small-unit-sample cases

Ben Bolker, University of Florida GLMM for biologists

Page 28: GLMMs References - glmm.wdfiles.comglmm.wdfiles.com/local--files/start/mcmaster-glmm.pdf · Precursors GLMMs References Outline 1 Precursors Examples Generalized linear models Mixed

PrecursorsGLMMs

References

EstimationInference

Penalized quasi-likelihood (PQL)

alternate steps of estimating GLM given known blockvariances; estimate LMMs given GLM fit

flexible (allows spatial/temporal correlations, crossed REs)

biased for small unit samples (e.g. counts < 5, binary orlow-survival data) (Breslow, 2004)

nevertheless, widely used: SAS PROC GLIMMIX, R glmmPQL:in ≈ 90% of small-unit-sample cases

Ben Bolker, University of Florida GLMM for biologists

Page 29: GLMMs References - glmm.wdfiles.comglmm.wdfiles.com/local--files/start/mcmaster-glmm.pdf · Precursors GLMMs References Outline 1 Precursors Examples Generalized linear models Mixed

PrecursorsGLMMs

References

EstimationInference

Better methods

Laplace approximationapproximate marginal likelihoodconsiderably more accurate than PQLreasonably fast and flexible

adaptive Gauss-Hermite quadrature (AGQ)

compute additional terms in the integralmost accurateslowest, hence not flexible (2–3 RE at most, maybe only 1)

Becoming available: R lme4, SAS PROC NLMIXED, PROC GLIMMIX(v. 9.2), Genstat GLMM

Ben Bolker, University of Florida GLMM for biologists

Page 30: GLMMs References - glmm.wdfiles.comglmm.wdfiles.com/local--files/start/mcmaster-glmm.pdf · Precursors GLMMs References Outline 1 Precursors Examples Generalized linear models Mixed

PrecursorsGLMMs

References

EstimationInference

Better methods

Laplace approximationapproximate marginal likelihoodconsiderably more accurate than PQLreasonably fast and flexible

adaptive Gauss-Hermite quadrature (AGQ)

compute additional terms in the integralmost accurateslowest, hence not flexible (2–3 RE at most, maybe only 1)

Becoming available: R lme4, SAS PROC NLMIXED, PROC GLIMMIX(v. 9.2), Genstat GLMM

Ben Bolker, University of Florida GLMM for biologists

Page 31: GLMMs References - glmm.wdfiles.comglmm.wdfiles.com/local--files/start/mcmaster-glmm.pdf · Precursors GLMMs References Outline 1 Precursors Examples Generalized linear models Mixed

PrecursorsGLMMs

References

EstimationInference

Better methods

Laplace approximationapproximate marginal likelihoodconsiderably more accurate than PQLreasonably fast and flexible

adaptive Gauss-Hermite quadrature (AGQ)

compute additional terms in the integralmost accurateslowest, hence not flexible (2–3 RE at most, maybe only 1)

Becoming available: R lme4, SAS PROC NLMIXED, PROC GLIMMIX(v. 9.2), Genstat GLMM

Ben Bolker, University of Florida GLMM for biologists

Page 32: GLMMs References - glmm.wdfiles.comglmm.wdfiles.com/local--files/start/mcmaster-glmm.pdf · Precursors GLMMs References Outline 1 Precursors Examples Generalized linear models Mixed

PrecursorsGLMMs

References

EstimationInference

Comparison of coral symbiont results

glmPQL

Laplace (1)Laplace (2)Laplace (3)

AGQ (1)AGQ (2)

−4 −2 0 2 4

intercept

symbiont

−4 −2 0 2 4

crab.vs.shrimpglm

PQLLaplace (1)Laplace (2)Laplace (3)

AGQ (1)AGQ (2)

twosymb

−4 −2 0 2 4

sdran

Ben Bolker, University of Florida GLMM for biologists

Page 33: GLMMs References - glmm.wdfiles.comglmm.wdfiles.com/local--files/start/mcmaster-glmm.pdf · Precursors GLMMs References Outline 1 Precursors Examples Generalized linear models Mixed

PrecursorsGLMMs

References

EstimationInference

Outline

1 PrecursorsExamplesGeneralized linear modelsMixed models (LMMs)

2 GLMMsEstimationInference

Ben Bolker, University of Florida GLMM for biologists

Page 34: GLMMs References - glmm.wdfiles.comglmm.wdfiles.com/local--files/start/mcmaster-glmm.pdf · Precursors GLMMs References Outline 1 Precursors Examples Generalized linear models Mixed

PrecursorsGLMMs

References

EstimationInference

General issues: testing RE significance

Counting “model” df for REs

how many parameters does a RE require? Somewhere between1 and n . . . Hard to compute, and depends on the level offocus (Vaida and Blanchard, 2005)

Boundary effects for RE testing

most tests depend on null hypothesis being within theparameter’s feasible range (Molenberghs and Verbeke, 2007):violated by H0 : σ2 = 0REs may count for < 1 df (typically ≈ 0.5)if ignored, tests are conservative

Ben Bolker, University of Florida GLMM for biologists

Page 35: GLMMs References - glmm.wdfiles.comglmm.wdfiles.com/local--files/start/mcmaster-glmm.pdf · Precursors GLMMs References Outline 1 Precursors Examples Generalized linear models Mixed

PrecursorsGLMMs

References

EstimationInference

General issues: testing RE significance

Counting “model” df for REs

how many parameters does a RE require? Somewhere between1 and n . . . Hard to compute, and depends on the level offocus (Vaida and Blanchard, 2005)

Boundary effects for RE testing

most tests depend on null hypothesis being within theparameter’s feasible range (Molenberghs and Verbeke, 2007):violated by H0 : σ2 = 0REs may count for < 1 df (typically ≈ 0.5)if ignored, tests are conservative

Ben Bolker, University of Florida GLMM for biologists

Page 36: GLMMs References - glmm.wdfiles.comglmm.wdfiles.com/local--files/start/mcmaster-glmm.pdf · Precursors GLMMs References Outline 1 Precursors Examples Generalized linear models Mixed

PrecursorsGLMMs

References

EstimationInference

General issues: finite-sample issues (!)

How far are we from “asymptopia”?

Many standard procedures are asymptotic

“Sample size” may refer the number of RE units — often farmore restricted than total number of data points

Hard to count degrees of freedom for complex designs:Kenward-Roger correction

Ben Bolker, University of Florida GLMM for biologists

Page 37: GLMMs References - glmm.wdfiles.comglmm.wdfiles.com/local--files/start/mcmaster-glmm.pdf · Precursors GLMMs References Outline 1 Precursors Examples Generalized linear models Mixed

PrecursorsGLMMs

References

EstimationInference

General issues: finite-sample issues (!)

How far are we from “asymptopia”?

Many standard procedures are asymptotic

“Sample size” may refer the number of RE units — often farmore restricted than total number of data points

Hard to count degrees of freedom for complex designs:Kenward-Roger correction

Ben Bolker, University of Florida GLMM for biologists

Page 38: GLMMs References - glmm.wdfiles.comglmm.wdfiles.com/local--files/start/mcmaster-glmm.pdf · Precursors GLMMs References Outline 1 Precursors Examples Generalized linear models Mixed

PrecursorsGLMMs

References

EstimationInference

General issues: finite-sample issues (!)

How far are we from “asymptopia”?

Many standard procedures are asymptotic

“Sample size” may refer the number of RE units — often farmore restricted than total number of data points

Hard to count degrees of freedom for complex designs:Kenward-Roger correction

Ben Bolker, University of Florida GLMM for biologists

Page 39: GLMMs References - glmm.wdfiles.comglmm.wdfiles.com/local--files/start/mcmaster-glmm.pdf · Precursors GLMMs References Outline 1 Precursors Examples Generalized linear models Mixed

PrecursorsGLMMs

References

EstimationInference

Specific procedures

Likelihood Ratio Test:need large sample size (= large # of RE units!)

Wald (Z , χ2, t or F ) tests

crude approximationasymptotic (for non-overdispersed data?) or . . .. . . how do we count residual df?don’t know if null distributions are correct

AIC

asymptotic (properties unknown)could use AICc , but ? need residual df

Ben Bolker, University of Florida GLMM for biologists

Page 40: GLMMs References - glmm.wdfiles.comglmm.wdfiles.com/local--files/start/mcmaster-glmm.pdf · Precursors GLMMs References Outline 1 Precursors Examples Generalized linear models Mixed

PrecursorsGLMMs

References

EstimationInference

Specific procedures

Likelihood Ratio Test:need large sample size (= large # of RE units!)

Wald (Z , χ2, t or F ) tests

crude approximationasymptotic (for non-overdispersed data?) or . . .. . . how do we count residual df?don’t know if null distributions are correct

AIC

asymptotic (properties unknown)could use AICc , but ? need residual df

Ben Bolker, University of Florida GLMM for biologists

Page 41: GLMMs References - glmm.wdfiles.comglmm.wdfiles.com/local--files/start/mcmaster-glmm.pdf · Precursors GLMMs References Outline 1 Precursors Examples Generalized linear models Mixed

PrecursorsGLMMs

References

EstimationInference

Specific procedures

Likelihood Ratio Test:need large sample size (= large # of RE units!)

Wald (Z , χ2, t or F ) tests

crude approximationasymptotic (for non-overdispersed data?) or . . .. . . how do we count residual df?don’t know if null distributions are correct

AIC

asymptotic (properties unknown)could use AICc , but ? need residual df

Ben Bolker, University of Florida GLMM for biologists

Page 42: GLMMs References - glmm.wdfiles.comglmm.wdfiles.com/local--files/start/mcmaster-glmm.pdf · Precursors GLMMs References Outline 1 Precursors Examples Generalized linear models Mixed

PrecursorsGLMMs

References

EstimationInference

Glycera results

effect

−60 −40 −20 0 20 40

trial

Osm

Anoxia

Cu:Anoxia

Osm:Cu

Osm:H2S:Anoxia

Osm:Anoxia

Osm:Cu:Anoxia

Osm:H2S

H2S:Anoxia

Cu

H2S

Osm:Cu:H2S:Anoxia

Osm:Cu:H2S

Cu:H2S:Anoxia

Cu:H2S

Ben Bolker, University of Florida GLMM for biologists

Page 43: GLMMs References - glmm.wdfiles.comglmm.wdfiles.com/local--files/start/mcmaster-glmm.pdf · Precursors GLMMs References Outline 1 Precursors Examples Generalized linear models Mixed

PrecursorsGLMMs

References

EstimationInference

Testing assumptions

True p value

Infe

rred

p v

alue

0.02

0.04

0.06

0.08

0.02 0.04 0.06 0.08

Osm Cu

H2S

0.02 0.04 0.06 0.08

0.02

0.04

0.06

0.08

Anoxia

Ben Bolker, University of Florida GLMM for biologists

Page 44: GLMMs References - glmm.wdfiles.comglmm.wdfiles.com/local--files/start/mcmaster-glmm.pdf · Precursors GLMMs References Outline 1 Precursors Examples Generalized linear models Mixed

PrecursorsGLMMs

References

EstimationInference

Arabidopsis genotype effects

Control0

1 0 1

−2

−1

−2 −1

Clipping−1

0

1 −1 0 1

−3

−2

−1

−3 −2 −1

Nutrients0

1

20 1 2

−2

−1

0

−2 −1 0

Clip+Nutr.234

2 3 4

−101

−1 0 1

Ben Bolker, University of Florida GLMM for biologists

Page 45: GLMMs References - glmm.wdfiles.comglmm.wdfiles.com/local--files/start/mcmaster-glmm.pdf · Precursors GLMMs References Outline 1 Precursors Examples Generalized linear models Mixed

PrecursorsGLMMs

References

EstimationInference

Where are we?

����������������

����� �������������������

��������������

������������������� ������������� ����������

��� ���

������������� !"#�������������$%�&#�%'(&)) !"#�

�����*�

+�,������������ ���

�-�����&�������

�.���/�����������#��0��

�.���/����������#�.�0��

������

��� ������ ���

��&�� �����12.�

����#����������3�45"�

������������������������������*#�������������������6����

���

���������/�����������#��0��

/����������#�.�0���

��� ����-�����&�������

����������� ��

7�$������� ��

���

Ben Bolker, University of Florida GLMM for biologists

Page 46: GLMMs References - glmm.wdfiles.comglmm.wdfiles.com/local--files/start/mcmaster-glmm.pdf · Precursors GLMMs References Outline 1 Precursors Examples Generalized linear models Mixed

PrecursorsGLMMs

References

EstimationInference

Now what?

MCMC (finicky, slow, dangerous, we have to “go Bayesian”:specialized procedures for GLMMs, or WinBUGS translators?(glmmBUGS, MCMCglmm)

quasi-Bayes mcmcsamp in lme4 (unfinished!)

parametric bootstrapping:

fit null model to datasimulate “data” from null modelfit null and working model, compute likelihood diff.repeat to estimate null distribution? analogue for confidence intervals?

challenges depend on data: total size, # REs, # RE units,overdispersion, design complexity . . .

More info: glmm.wikidot.com

Ben Bolker, University of Florida GLMM for biologists

Page 47: GLMMs References - glmm.wdfiles.comglmm.wdfiles.com/local--files/start/mcmaster-glmm.pdf · Precursors GLMMs References Outline 1 Precursors Examples Generalized linear models Mixed

PrecursorsGLMMs

References

EstimationInference

Now what?

MCMC (finicky, slow, dangerous, we have to “go Bayesian”:specialized procedures for GLMMs, or WinBUGS translators?(glmmBUGS, MCMCglmm)

quasi-Bayes mcmcsamp in lme4 (unfinished!)

parametric bootstrapping:

fit null model to datasimulate “data” from null modelfit null and working model, compute likelihood diff.repeat to estimate null distribution? analogue for confidence intervals?

challenges depend on data: total size, # REs, # RE units,overdispersion, design complexity . . .

More info: glmm.wikidot.com

Ben Bolker, University of Florida GLMM for biologists

Page 48: GLMMs References - glmm.wdfiles.comglmm.wdfiles.com/local--files/start/mcmaster-glmm.pdf · Precursors GLMMs References Outline 1 Precursors Examples Generalized linear models Mixed

PrecursorsGLMMs

References

EstimationInference

Acknowledgements

Data: Josh Banta and Massimo Pigliucci (Arabidopsis);Adrian Stier and Sea McKeon (coral symbionts); CourtneyKagan, Jocelynn Ortega, David Julian (Glycera);

Co-authors: Mollie Brooks, Connie Clark, Shane Geange, JohnPoulsen, Hank Stevens, Jada White

Ben Bolker, University of Florida GLMM for biologists

Page 49: GLMMs References - glmm.wdfiles.comglmm.wdfiles.com/local--files/start/mcmaster-glmm.pdf · Precursors GLMMs References Outline 1 Precursors Examples Generalized linear models Mixed

PrecursorsGLMMs

References

References

Breslow, N.E., 2004. In D.Y. Lin and P.J. Heagerty, editors, Proceedings of the second Seattle symposium inbiostatistics: Analysis of correlated data, pages 1–22. Springer. ISBN 0387208623.

Molenberghs, G. and Verbeke, G., 2007. The American Statistician, 61(1):22–27.doi:10.1198/000313007X171322.

Vaida, F. and Blanchard, S., 2005. Biometrika, 92(2):351–370. doi:10.1093/biomet/92.2.351.

Ben Bolker, University of Florida GLMM for biologists