Slide 1

Slide 1 text

Statistical Rethinking (1) The Golem of Prague 2022

Slide 2

Slide 2 text

No content

Slide 3

Slide 3 text

Texts in Statistical Science Richard McElreath McElreath Statistical Rethinking A Bayesian Course with Examples in R and Stan SECOND EDITION Second Edition Statistical Rethinking Rethinking the role of statistical analysis in research 20 lectures

Slide 4

Slide 4 text

GOLEMS DAGS OWLS

Slide 5

Slide 5 text

Prague 16th century

Slide 6

Slide 6 text

No content

Slide 7

Slide 7 text

Art from: “Breath of Bones: A Tale of the Golem” (2014)

Slide 8

Slide 8 text

Golems Clay robots Powerful No wisdom or foresight Dangerous “Breath of Bones: A Tale of the Golem” (2014)

Slide 9

Slide 9 text

Statistical Models 5)& (0-&. 0' 13"(6& Clay robots Powerful No wisdom or foresight Dangerous

Slide 10

Slide 10 text

Figure 1.1

Slide 11

Slide 11 text

Statistical Models Incredibly limiting Focus on rejecting null hypotheses instead of research hypotheses Relationship between hypothesis and test not clear Industrial framework 5)& (0-&. 0' 13"(6&

Slide 12

Slide 12 text

H0 H1 “Evolution is neutral” “Selection
 matters” P0A Neutral, non-equilibrium P0B Neutral, equilibrium P1B Fluctuating selection P1A Constant selection MI MII MIII Hypotheses Process models Statistical models Figure 1.2

Slide 13

Slide 13 text

Null Models Rarely Unique Null phylogeny? Null ecological community? Null social network?

Slide 14

Slide 14 text

Hypotheses and Models Research requires more than than tiny null robots Also requires: Precise process model(s) Statistical model (procedure, golem) justified by implications of process model(s) and question (estimand)

Slide 15

Slide 15 text

OWLS

Slide 16

Slide 16 text

1. Draw some circles HOW TO DRAW AN OWL

Slide 17

Slide 17 text

1. Draw some circles 2. Draw the rest of the owl HOW TO DRAW AN OWL

Slide 18

Slide 18 text

1. Draw some circles 2. Draw the rest of the owl HOW TO DRAW AN OWL

Slide 19

Slide 19 text

ESB 3FNFNCFS UIF QPTUFSJPS IFSF NFBOT UIF QSPCBCJMJUZ PG Q DPOEJUJPOBM 3 DPEF +Ǿ"-$ ʚǶ . ,ǿ !-*(ʙ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T JG ZPV BSF ĘZJOH PWFS UIF QPTUFSJPS EJTUSJCVUJPO MPP 0 200 600 1000 0.0 0.4 0.8 Index p 0 200 600 1000 0.6 0.8 1.0 1.2 1.4 Index prior 0 200 600 1000 0.00 0.10 0.20 Index likelihood 0 200 600 1000 0.0000 0.0015 Index posterior

Slide 20

Slide 20 text

Drawing the Bayesian Owl Three modes: Understand what you are doing Document your work, reduce error Respectable scientific workflow

Slide 21

Slide 21 text

Drawing the Bayesian Owl 1. Theoretical estimand 2. Scientific (causal) model(s) 3. Use 1 & 2 to build statistical model(s) 4. Simulate from 2 to validate 3 yields 1 5. Analyze real data

Slide 22

Slide 22 text

Saturn, Galileo 1610

Slide 23

Slide 23 text

Drawing the Bayesian Owl Bayesian approach is permissive, flexible Express uncertainty at all levels Direct solutions for measurement error, missing data Focus on scientific modeling

Slide 24

Slide 24 text

DAGS

Slide 25

Slide 25 text

No content

Slide 26

Slide 26 text

No content

Slide 27

Slide 27 text

Science Before Statistics For statistical models to produce scientific insight, they require additional scientific (causal) models The reasons for a statistical analysis are not found in the data themselves, but rather in the causes of the data The causes of the data cannot be extracted from the data alone. No causes in; no causes out.

Slide 28

Slide 28 text

Causal Inference Description Design

Slide 29

Slide 29 text

Causes Are Not Optional Even when goal is descriptive, need causal model The sample differs from the population; describing the population requires causal thinking

Slide 30

Slide 30 text

What is Causal Inference? More than association between variables Causal inference is prediction of intervention Causal inference is imputation of missing observations

Slide 31

Slide 31 text

Causal Prediction Knowing a cause means being able to predict the consequences of an intervention. 
 What if I do this?

Slide 32

Slide 32 text

Causal Imputation Knowing a cause means being able to construct unobserved counterfactual outcomes. 
 What if I had done something else?

Slide 33

Slide 33 text

DAGs Directed Acyclic Graphs Heuristic causal models Clarify scientific thinking Analyze to deduce appropriate statistical models Much more as the course develops s * " u

Slide 34

Slide 34 text

DAGs H 2i HX kyReVV rQmH/ K2bm`2 i?2 + s * " u

Slide 35

Slide 35 text

DAGs H 2i HX kyReVV rQmH/ K2bm`2 i?2 + s * " u

Slide 36

Slide 36 text

DAGs H 2i HX kyReVV rQmH/ K2bm`2 i?2 + s * " u

Slide 37

Slide 37 text

DAGs H 2i HX kyReVV rQmH/ K2bm`2 i?2 + s * " u

Slide 38

Slide 38 text

DAGs H 2i HX kyReVV rQmH/ K2bm`2 i?2 + s * " u

Slide 39

Slide 39 text

DAGs H 2i HX kyReVV rQmH/ K2bm`2 i?2 + s * " u

Slide 40

Slide 40 text

s * " u DAGs Different queries, different models Which control variables? Absolute not safe to add everything — bad controls How to test the causal model? With more scientific knowledge, can do more

Slide 41

Slide 41 text

Golems, Owls, DAGs Golems: Brainless, powerful statistical models Owls: Documented, objective procedures DAGs: Transparent scientific assumptions to 
 justify scientific effort
 expose it to useful critique
 connect theories to golems

Slide 42

Slide 42 text

Course Schedule Week 1 Bayesian inference Chapters 1, 2, 3 Week 2 Linear models & Causal Inference Chapter 4 Week 3 Causes, Confounds & Colliders Chapters 5 & 6 Week 4 Overfitting / Interactions Chapters 7 & 8 Week 5 MCMC & Generalized Linear Models Chapters 9, 10, 11 Week 6 Integers & Other Monsters Chapters 11 & 12 Week 7 Multilevel models I Chapter 13 Week 8 Multilevel models II Chapter 14 Week 9 Measurement & Missingness Chapter 15 Week 10 Generalized Linear Madness Chapter 16 https://github.com/rmcelreath/statrethinking_2022