eric d. stolen inomedic health applications, ecological program, kennedy space center, florida nasa...

74
Testing hypotheses using model selection Eric D. Stolen InoMedic Health Applications, Ecological Program, Kennedy Space Center, Florida NASA Environmental Management Branch

Upload: hillary-dorsey

Post on 25-Dec-2015

216 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Eric D. Stolen InoMedic Health Applications, Ecological Program, Kennedy Space Center, Florida NASA Environmental Management Branch

Testing hypotheses using model selectionEric D. StolenInoMedic Health Applications, Ecological Program, Kennedy Space Center, Florida

NASA Environmental Management Branch

Page 2: Eric D. Stolen InoMedic Health Applications, Ecological Program, Kennedy Space Center, Florida NASA Environmental Management Branch

We h ve inv st d a l t of t m nd eff rt in cr at ng R, pl s c te it wh n us ng it f r d t n lys s.

Page 3: Eric D. Stolen InoMedic Health Applications, Ecological Program, Kennedy Space Center, Florida NASA Environmental Management Branch

We have invested a lot of time and effort in creating R, please cite it when using it for data analysis.

Page 4: Eric D. Stolen InoMedic Health Applications, Ecological Program, Kennedy Space Center, Florida NASA Environmental Management Branch

“The human understanding, once it has adopted an opinion, collects any instances that confirm it, and though the contrary instances may be more numerous and more weighty, it either does not notice them or else rejects them, in order that this opinion will remain unshaken.”

- Francis Bacon (1620)

Page 5: Eric D. Stolen InoMedic Health Applications, Ecological Program, Kennedy Space Center, Florida NASA Environmental Management Branch

Outline Science issues The method of multiple working

hypotheses Statistical models as science tools Making inference in science Information-theoretic model selection Multi-model inference

Page 6: Eric D. Stolen InoMedic Health Applications, Ecological Program, Kennedy Space Center, Florida NASA Environmental Management Branch

ScienceWhat is it?

Page 7: Eric D. Stolen InoMedic Health Applications, Ecological Program, Kennedy Space Center, Florida NASA Environmental Management Branch

Science is the organized process of creating testable explanations of how the natural world works.

Page 8: Eric D. Stolen InoMedic Health Applications, Ecological Program, Kennedy Space Center, Florida NASA Environmental Management Branch

Theory

Hypothesis

Understanding

Page 9: Eric D. Stolen InoMedic Health Applications, Ecological Program, Kennedy Space Center, Florida NASA Environmental Management Branch

Hypothetico-deductive modelGenerate

hypothesis (from theory)

Make a prediction from the

hypothesisConduct experiment to test prediction

Decide whether or not the theory is supported

Page 10: Eric D. Stolen InoMedic Health Applications, Ecological Program, Kennedy Space Center, Florida NASA Environmental Management Branch

Hypothetico-deductive model

Taught in Primary through graduate-school education

Not the way science is done in many fields

Modern science is largely inductive

Page 11: Eric D. Stolen InoMedic Health Applications, Ecological Program, Kennedy Space Center, Florida NASA Environmental Management Branch

Null hypothesis testing

H0: No effectHA: Effect of interest

Probability{ data | H0 }

Is this what we want to know?

Page 12: Eric D. Stolen InoMedic Health Applications, Ecological Program, Kennedy Space Center, Florida NASA Environmental Management Branch

Known as the frequentist approach Not what Fisher, Neyman nor Pearson

intended!

R. A. Fisher (1890 – 1962)

Jerzy Neyman(1894 – 1981)

Karl Pearson(1857 – 1936)

Null hypothesis testing

Page 13: Eric D. Stolen InoMedic Health Applications, Ecological Program, Kennedy Space Center, Florida NASA Environmental Management Branch

Oops

(c) Ian Britton - FreeFoto.com

Page 14: Eric D. Stolen InoMedic Health Applications, Ecological Program, Kennedy Space Center, Florida NASA Environmental Management Branch

NHT problems

Some problems:•Silly nulls•Slow progress•Many systems not amenable• Inference dependent upon the sample space

•Fosters unthinking approaches

Page 15: Eric D. Stolen InoMedic Health Applications, Ecological Program, Kennedy Space Center, Florida NASA Environmental Management Branch

an alternative

Probability{ HA | data }

Page 16: Eric D. Stolen InoMedic Health Applications, Ecological Program, Kennedy Space Center, Florida NASA Environmental Management Branch

Multiple working hypotheses

Thomas C. Chamberlin (1843-1928)- Geologist- President University of Wisconsin

- Director Walker Museum and Chair Dept. of Geology at the University of Chicago

- President of the American Association for the Advancement of ScienceChamberlin, T. C. 1890. The method of

multiple working hypotheses. Science 15:92-96 (reprinted 1965, Science 148:754-759

Page 17: Eric D. Stolen InoMedic Health Applications, Ecological Program, Kennedy Space Center, Florida NASA Environmental Management Branch

Alternative Hypotheses

Reality

Theory Data

Page 18: Eric D. Stolen InoMedic Health Applications, Ecological Program, Kennedy Space Center, Florida NASA Environmental Management Branch

Wading bird group foraging behavior

Page 19: Eric D. Stolen InoMedic Health Applications, Ecological Program, Kennedy Space Center, Florida NASA Environmental Management Branch

Multiple working hypotheses

Wading bird group foragingH1: No effectH2: Group effect same for all speciesH3: Group effect differs by speciesH4: (Group by species) + prey densityH5: Group + prey densityH6: (Group by species) + prey + habitat

Page 20: Eric D. Stolen InoMedic Health Applications, Ecological Program, Kennedy Space Center, Florida NASA Environmental Management Branch

Mathematical models in science

“Nature's great book is written in mathematics.”

- Galileo Galilei

Page 21: Eric D. Stolen InoMedic Health Applications, Ecological Program, Kennedy Space Center, Florida NASA Environmental Management Branch

Mathematical models in science

EmpiricalModels

MechanisticModels

EcologyChemistry in 19th

CenturyClimatology

PhysicsModern ChemistryMolecular biology

Page 22: Eric D. Stolen InoMedic Health Applications, Ecological Program, Kennedy Space Center, Florida NASA Environmental Management Branch

Generalized Linear Model Three parts

•Probability distribution (error)Y i ~ N(i, 2)

•Link functionE(Y i) = i

• linear equation i = n(xi1, xi2, xi3, …xiq)

Page 23: Eric D. Stolen InoMedic Health Applications, Ecological Program, Kennedy Space Center, Florida NASA Environmental Management Branch

Generalized Linear Model Linear regression and ANOVA

• Link function – Identity link• linear equation• error distribution – Normal Distribution

(Gaussian)

Y = b0 + b1X1 + b2X2 + e

Page 24: Eric D. Stolen InoMedic Health Applications, Ecological Program, Kennedy Space Center, Florida NASA Environmental Management Branch

Generalized Linear Model Logistic Regression

• Link function - Logit link: ln(p / (1-p))• linear equation• error distribution – Binomial Distribution

Logit(p) = b0 + b1X1 + b2X2 + e

Page 25: Eric D. Stolen InoMedic Health Applications, Ecological Program, Kennedy Space Center, Florida NASA Environmental Management Branch

Maximum likelihood estimnation

R. A. Fisher (1980-1962) The parameter estimates that are

most likely, given the data and the model

Example• Receive a cookie from the cafeteria 11 days• Observe 7 chocolate chip and 4 oatmeal

raisin• What is the best estimate of p = proportion

chocolate chip (given the observed data)

Page 26: Eric D. Stolen InoMedic Health Applications, Ecological Program, Kennedy Space Center, Florida NASA Environmental Management Branch

Maximum likelihood estimnation

“CC” “CC” “OR” “CC” “CC” “OR” “OR” “CC”

“OR” “CC” “CC”

Page 27: Eric D. Stolen InoMedic Health Applications, Ecological Program, Kennedy Space Center, Florida NASA Environmental Management Branch

Maximum likelihood estimnation

“CC” “CC” “OR” “CC” “CC” “OR” “OR” “CC”

“OR” “CC” “CC”

Page 28: Eric D. Stolen InoMedic Health Applications, Ecological Program, Kennedy Space Center, Florida NASA Environmental Management Branch

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

Proportion heads

Lik

elih

oo

d0

.00

0.0

50

.10

0.1

50

.20

0.2

50

.30

Proportion Chocolate Chip

Page 29: Eric D. Stolen InoMedic Health Applications, Ecological Program, Kennedy Space Center, Florida NASA Environmental Management Branch

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

Proportion heads

Lik

elih

oo

d0

.00

0.0

50

.10

0.1

50

.20

0.2

50

.30

Proportion Chocolate Chip

Page 30: Eric D. Stolen InoMedic Health Applications, Ecological Program, Kennedy Space Center, Florida NASA Environmental Management Branch

0.0 0.2 0.4 0.6 0.8 1.0

0.0

00

.05

0.1

00

.15

0.2

00

.25

Proportion heads

Lik

elih

oo

d

Proportion Chocolate Chip

Page 31: Eric D. Stolen InoMedic Health Applications, Ecological Program, Kennedy Space Center, Florida NASA Environmental Management Branch

0.0 0.2 0.4 0.6 0.8 1.0

0.0

00

.05

0.1

00

.15

0.2

00

.25

Proportion heads

Lik

elih

oo

d

Proportion Chocolate Chip

Page 32: Eric D. Stolen InoMedic Health Applications, Ecological Program, Kennedy Space Center, Florida NASA Environmental Management Branch

0.0 0.2 0.4 0.6 0.8 1.0

-40

-30

-20

-10

0

Proportion heads

Lo

g-L

ike

liho

od

Proportion Chocolate Chip

Page 33: Eric D. Stolen InoMedic Health Applications, Ecological Program, Kennedy Space Center, Florida NASA Environmental Management Branch

0.0 0.2 0.4 0.6 0.8 1.0

-40

-30

-20

-10

0

Proportion heads

Lo

g-L

ike

liho

od

Proportion Chocolate Chip

Page 34: Eric D. Stolen InoMedic Health Applications, Ecological Program, Kennedy Space Center, Florida NASA Environmental Management Branch

Multiple working hypotheses

Wading bird group foragingH1: No effectH2: Group effect same for all speciesH3: Group effect differs by speciesH4: (Group by species) + prey densityH5: Group + prey densityH6: (Group by species) + prey + habitat

Page 35: Eric D. Stolen InoMedic Health Applications, Ecological Program, Kennedy Space Center, Florida NASA Environmental Management Branch

Multiple working hypotheses

Wading bird group foragingH1: Foraging rate = b0 + eH2: Group effect same for all speciesH3: Group effect differs by speciesH4: (Group by species) + prey densityH5: Group + prey densityH6: (Group by species) + prey + habitat

Page 36: Eric D. Stolen InoMedic Health Applications, Ecological Program, Kennedy Space Center, Florida NASA Environmental Management Branch

Multiple working hypotheses

Wading bird group foragingH1: No effectH2: FR = b0 + Group * b1 + eH3: Group effect differs by speciesH4: (Group by species) + prey densityH5: Group + prey densityH6: (Group by species) + prey + habitat

Page 37: Eric D. Stolen InoMedic Health Applications, Ecological Program, Kennedy Space Center, Florida NASA Environmental Management Branch

Approaches to science

ObservationalStudy

ExperimentalStudy

Strength of Inference

Page 38: Eric D. Stolen InoMedic Health Applications, Ecological Program, Kennedy Space Center, Florida NASA Environmental Management Branch

Experimental study What is the effect of a particular treatment (or series of treatments) on a particular aspect of the system

Page 39: Eric D. Stolen InoMedic Health Applications, Ecological Program, Kennedy Space Center, Florida NASA Environmental Management Branch

Experimental study

C D controlBA

7,22,21,54,67,81

6,29,33,61,77,79

11,12,69,74,91,92

10,15, 41,44,88

1,4,5,38,62,99

Treatments:A, B, C, D

Replicates:1,2,3,…,n

Page 40: Eric D. Stolen InoMedic Health Applications, Ecological Program, Kennedy Space Center, Florida NASA Environmental Management Branch

Experimental study

C D controlBA

7,22,21,54,67,81

6,29,33,61,77,79

11,12,69,74,91,92

10,15, 41,44,88

1,4,5,38,62,99

Treatments:A, B, C, D

Replicates:1,2,3,…,n

Randomization

Page 41: Eric D. Stolen InoMedic Health Applications, Ecological Program, Kennedy Space Center, Florida NASA Environmental Management Branch

Observational study

C D controlBA

7,22,21,54,67,81

6,29,33,61,77,79

11,12,69,74,91,92

10,15, 41,44,88

1,4,5,38,62,99

Treatments:A, B, C, D

Replicates:1,2,3,…,n

Bias

Page 42: Eric D. Stolen InoMedic Health Applications, Ecological Program, Kennedy Space Center, Florida NASA Environmental Management Branch

Approaches to science

ObservationalStudy

ExperimentalStudy

Strength of Inference

ConfirmatoryStudy

Page 43: Eric D. Stolen InoMedic Health Applications, Ecological Program, Kennedy Space Center, Florida NASA Environmental Management Branch

Confirmatory study Make predictions a priori Design collection of observational data including as much replication and control as possible

Weakness is still lack of randomization (not assigning treatment)

Page 44: Eric D. Stolen InoMedic Health Applications, Ecological Program, Kennedy Space Center, Florida NASA Environmental Management Branch

Summary so far Science is a process to postulate and

refine reliable descriptions (explanations) of reality

The method of multiple working hypotheses is a particularly useful science tool

Mathematics is the language of science

Experiments are golden, confirmatory studies are helpful

Page 45: Eric D. Stolen InoMedic Health Applications, Ecological Program, Kennedy Space Center, Florida NASA Environmental Management Branch

Next… Statistical model selection theory Information-theoretic tools R Model selection in practice Multi-model inference

Page 46: Eric D. Stolen InoMedic Health Applications, Ecological Program, Kennedy Space Center, Florida NASA Environmental Management Branch

Precision-Bias Trade-offB

ias

2

Model Complexity – increasing number of Parameters

Y = b0 + b1X1 + b2X2 + e

Page 47: Eric D. Stolen InoMedic Health Applications, Ecological Program, Kennedy Space Center, Florida NASA Environmental Management Branch

Precision-Bias Trade-off

vari

ance

Model Complexity – increasing number of Parameters

Y = b0 + b1X1 + b2X2 + e

Page 48: Eric D. Stolen InoMedic Health Applications, Ecological Program, Kennedy Space Center, Florida NASA Environmental Management Branch

Precision-Bias Trade-offB

ias

2

vari

ance

Model Complexity – increasing number of Parameters

Y = b0 + b1X1 + b2X2 + e

Page 49: Eric D. Stolen InoMedic Health Applications, Ecological Program, Kennedy Space Center, Florida NASA Environmental Management Branch

Kullbeck-Leibler information

Kullback, S., and R. A. Leibler. 1951. On Information and Sufficiency The Annals of Mathematical Statistics 22:79-86

(1907-1994) (1914-2003)

Page 50: Eric D. Stolen InoMedic Health Applications, Ecological Program, Kennedy Space Center, Florida NASA Environmental Management Branch

Kullback-Leibler information divergence

Full Truth

G1 (best model in set)

G2

G3

Page 51: Eric D. Stolen InoMedic Health Applications, Ecological Program, Kennedy Space Center, Florida NASA Environmental Management Branch

Kullback-Leibler information divergence

G1 (best model in set)

G2

G3

Full Truth

Page 52: Eric D. Stolen InoMedic Health Applications, Ecological Program, Kennedy Space Center, Florida NASA Environmental Management Branch

Kullback-Leibler information divergence

G1 (best model in set)

G2

G3The relative difference between models is constant

Full Truth

Page 53: Eric D. Stolen InoMedic Health Applications, Ecological Program, Kennedy Space Center, Florida NASA Environmental Management Branch

I(f,g) = information lost when model g is used to approximate f (full reality)

Kullbeck-Leibler information

Page 54: Eric D. Stolen InoMedic Health Applications, Ecological Program, Kennedy Space Center, Florida NASA Environmental Management Branch

Hirotugu Akaike (1927-2009)

Figured out how to estimate the relative Kullback-Leibler distance between models in a set of models

Figured out how to link maximum likelihood estimation theory with expected K-L information

An Information Criterion

Page 55: Eric D. Stolen InoMedic Health Applications, Ecological Program, Kennedy Space Center, Florida NASA Environmental Management Branch

Akaike Information Criteria

AIC = -2 ln (L{modeli }| data) + 2KHirotugu Akaik. 1974. A new look at the statistical model identification. IEEE Transactions on Automatic Control 19 (6): 716–723.

Page 56: Eric D. Stolen InoMedic Health Applications, Ecological Program, Kennedy Space Center, Florida NASA Environmental Management Branch

Akaike Information Criteria

AIC = -2 ln (L{modeli }| data) + 2K

Log-likelihood(from software)

Page 57: Eric D. Stolen InoMedic Health Applications, Ecological Program, Kennedy Space Center, Florida NASA Environmental Management Branch

Akaike Information Criteria

AIC = -2 ln (L{modeli }| data) + 2K

Log-likelihood(from software)

Parametersestimated

Page 58: Eric D. Stolen InoMedic Health Applications, Ecological Program, Kennedy Space Center, Florida NASA Environmental Management Branch

Information Criteria AIC = -2 ln (L{modeli }| data) + 2K AICc = AIC + 2*K*(K+1)/(n-K-1) QAICc = -2lnL/c + 2K + 2*K*(K+1)/(n-

K-1) BIC = -2lnL + K ln(n) DIC = -2lnL (for nested models) Etc…

Page 59: Eric D. Stolen InoMedic Health Applications, Ecological Program, Kennedy Space Center, Florida NASA Environmental Management Branch

What is ? Open source version of S (Bell Labs) Developed by Ross Ihaka and Robert

Gentleman A true data analysis environment Object-oriented and data-centric

programming language Maintained by “The R Foundation” http://www.r-project.org/

Page 60: Eric D. Stolen InoMedic Health Applications, Ecological Program, Kennedy Space Center, Florida NASA Environmental Management Branch

Model selection tablemodel k sumlogL sumaic AICc D

iwi

wi/w

best

Sex + landcocver + Sex * landcocver 4 -45.34 100.69 101.69 0.00 0.29 1.00

Sex + landcocver 3 -46.70 101.40 101.98 0.29 0.25 1.16

Sex + landcocver + weeks + Sex * landcocver 5 -44.62 101.24 102.78 1.09 0.17 1.73

Sex + landcocver + weeks 4 -45.94 101.88 102.88 1.19 0.16 1.82

Sex + weeks 3 -48.06 104.12 104.71 3.02 0.06 4.53

Sex 2 -49.30 104.60 104.88 3.20 0.06 4.94

landcocver 2 -54.42 114.83 115.12 13.43 0.00 824.28

landcocver + weeks 3 -54.33 116.67 117.25 15.56 0.00 2398.06

weeks 2 -58.94 123.88 124.17 22.48 0.00 76100.46

Page 61: Eric D. Stolen InoMedic Health Applications, Ecological Program, Kennedy Space Center, Florida NASA Environmental Management Branch

Model weights

Model Probability

Evidence ratio of model i to model j = wi / wj

D

D R

rr

iiw

1

)2/1exp(

)2/1exp(

}|{Pr datagobw ii

Page 62: Eric D. Stolen InoMedic Health Applications, Ecological Program, Kennedy Space Center, Florida NASA Environmental Management Branch

Model selection tablemodel k sumlogL sumaic AICc D

iwi

wi/w

best

Sex + landcocver + Sex * landcocver 4 -45.34 100.69 101.69 0.00 0.29 1.00

Sex + landcocver 3 -46.70 101.40 101.98 0.29 0.25 1.16

Sex + landcocver + weeks + Sex * landcocver 5 -44.62 101.24 102.78 1.09 0.17 1.73

Sex + landcocver + weeks 4 -45.94 101.88 102.88 1.19 0.16 1.82

Sex + weeks 3 -48.06 104.12 104.71 3.02 0.06 4.53

Sex 2 -49.30 104.60 104.88 3.20 0.06 4.94

landcocver 2 -54.42 114.83 115.12 13.43 0.00 824.28

landcocver + weeks 3 -54.33 116.67 117.25 15.56 0.00 2398.06

weeks 2 -58.94 123.88 124.17 22.48 0.00 76100.46

Page 63: Eric D. Stolen InoMedic Health Applications, Ecological Program, Kennedy Space Center, Florida NASA Environmental Management Branch

Multi-model inference

Sometimes there is a clearly best model.

If not, why choose one?

Page 64: Eric D. Stolen InoMedic Health Applications, Ecological Program, Kennedy Space Center, Florida NASA Environmental Management Branch

Model selection uncertainty

Problems arise when we use the same data to both select a model and to estimate parameters.• Chatfield, C. 1995. Model uncertainty, data mining and statistical

inference. Journal of the Royal Statistical Society. Series A (Statistics in Society) 158:419-466.

We need to account for the information used in weighting models in our estimates of the model parameter uncertainty

Page 65: Eric D. Stolen InoMedic Health Applications, Ecological Program, Kennedy Space Center, Florida NASA Environmental Management Branch

Model averaging

R

iiiYwY

1

Page 66: Eric D. Stolen InoMedic Health Applications, Ecological Program, Kennedy Space Center, Florida NASA Environmental Management Branch

Model averaging

R

iiiYwY

1

Model-averagedPrediction

Page 67: Eric D. Stolen InoMedic Health Applications, Ecological Program, Kennedy Space Center, Florida NASA Environmental Management Branch

Model averaging

R

iiiYwY

1

Model i weight

Page 68: Eric D. Stolen InoMedic Health Applications, Ecological Program, Kennedy Space Center, Florida NASA Environmental Management Branch

Model averaging

R

iiiYwY

1

Model i prediction

Page 69: Eric D. Stolen InoMedic Health Applications, Ecological Program, Kennedy Space Center, Florida NASA Environmental Management Branch

Model averaging

R

i

iiw1

Model-averagedParameter estimate

Page 70: Eric D. Stolen InoMedic Health Applications, Ecological Program, Kennedy Space Center, Florida NASA Environmental Management Branch

Model selection tablemodel k sumlogL sumaic AICc D

iwi

wi/w

best

Sex + landcocver + Sex * landcocver 4 -45.34 100.69 101.69 0.00 0.29 1.00

Sex + landcocver 3 -46.70 101.40 101.98 0.29 0.25 1.16

Sex + landcocver + weeks + Sex * landcocver 5 -44.62 101.24 102.78 1.09 0.17 1.73

Sex + landcocver + weeks 4 -45.94 101.88 102.88 1.19 0.16 1.82

Sex + weeks 3 -48.06 104.12 104.71 3.02 0.06 4.53

Sex 2 -49.30 104.60 104.88 3.20 0.06 4.94

landcocver 2 -54.42 114.83 115.12 13.43 0.00 824.28

landcocver + weeks 3 -54.33 116.67 117.25 15.56 0.00 2398.06

weeks 2 -58.94 123.88 124.17 22.48 0.00 76100.46

Page 71: Eric D. Stolen InoMedic Health Applications, Ecological Program, Kennedy Space Center, Florida NASA Environmental Management Branch

50

10

01

50

Ho

me

Ra

ng

e (

ha

)

Male-Core, Best Female-Core, Best Male-Dist, Best Female-Dist, Best

Page 72: Eric D. Stolen InoMedic Health Applications, Ecological Program, Kennedy Space Center, Florida NASA Environmental Management Branch

50

10

01

50

Ho

me

Ra

ng

e (

ha

)

Male-Core, MA Male-Core, Best Female-Core, MA Female-Core, Best Male-Dist, MA Male-Dist, Best Female-Dist, MA Female-Dist, Best

Page 73: Eric D. Stolen InoMedic Health Applications, Ecological Program, Kennedy Space Center, Florida NASA Environmental Management Branch

Conclusions Science is a process (we never arrive at

the destination) Multiple hypotheses approach superior What we’re after is evidence for

alternative hypotheses ( Pr{ Ha|data } ) Information-theoretic model selection is a

powerful new tool in this approach to inference

Multi-model averaging acknowledges model-selection uncertainty

Page 74: Eric D. Stolen InoMedic Health Applications, Ecological Program, Kennedy Space Center, Florida NASA Environmental Management Branch

Thanks! Dan Hunt, IHA David R. Anderson, Colorado State

University Model-based Inference Working

Group (MBIG)• Dave Breininger, Geoff Carter, John Drese,

Brean Duncan, Carlton Hall,, Dan Hunt, Tim Kozusko, Eric Stolen

[email protected]