Some computational and modeling issues for hierarchical models - - PowerPoint PPT Presentation

some computational and modeling issues for hierarchical
SMART_READER_LITE
LIVE PREVIEW

Some computational and modeling issues for hierarchical models - - PowerPoint PPT Presentation

Some computational and modeling issues for hierarchical models Andrew Gelman Dept of Statistics and Dept of Political Science, Columbia University, New York (Visiting Sciences Po, Paris, for 20092010) 17 Oct 2009 1/13 Andrew Gelman Some


slide-1
SLIDE 1

1/13

Some computational and modeling issues for hierarchical models

Andrew Gelman

Dept of Statistics and Dept of Political Science, Columbia University, New York (Visiting Sciences Po, Paris, for 2009–2010)

17 Oct 2009

Andrew Gelman Some computational and modeling issues for hierarchical models

slide-2
SLIDE 2

2/13

6 challenges in statistical modeling

Andrew Gelman Some computational and modeling issues for hierarchical models

slide-3
SLIDE 3

2/13

6 challenges in statistical modeling

◮ Setting up a realistic (i.e., complicated) model

Andrew Gelman Some computational and modeling issues for hierarchical models

slide-4
SLIDE 4

2/13

6 challenges in statistical modeling

◮ Setting up a realistic (i.e., complicated) model ◮ Regularization or partial pooling

Andrew Gelman Some computational and modeling issues for hierarchical models

slide-5
SLIDE 5

2/13

6 challenges in statistical modeling

◮ Setting up a realistic (i.e., complicated) model ◮ Regularization or partial pooling ◮ Fitting the model

Andrew Gelman Some computational and modeling issues for hierarchical models

slide-6
SLIDE 6

2/13

6 challenges in statistical modeling

◮ Setting up a realistic (i.e., complicated) model ◮ Regularization or partial pooling ◮ Fitting the model ◮ Checking the fit to data

Andrew Gelman Some computational and modeling issues for hierarchical models

slide-7
SLIDE 7

2/13

6 challenges in statistical modeling

◮ Setting up a realistic (i.e., complicated) model ◮ Regularization or partial pooling ◮ Fitting the model ◮ Checking the fit to data ◮ Confidence building

Andrew Gelman Some computational and modeling issues for hierarchical models

slide-8
SLIDE 8

2/13

6 challenges in statistical modeling

◮ Setting up a realistic (i.e., complicated) model ◮ Regularization or partial pooling ◮ Fitting the model ◮ Checking the fit to data ◮ Confidence building ◮ Understanding the fitted model

Andrew Gelman Some computational and modeling issues for hierarchical models

slide-9
SLIDE 9

3/13

The models I’m fitting

◮ Hierarchical generalized linear models

Andrew Gelman Some computational and modeling issues for hierarchical models

slide-10
SLIDE 10

3/13

The models I’m fitting

◮ Hierarchical generalized linear models ◮ yi = α + βxi + ǫi

Andrew Gelman Some computational and modeling issues for hierarchical models

slide-11
SLIDE 11

3/13

The models I’m fitting

◮ Hierarchical generalized linear models ◮ yi = α + βxi + ǫi ◮ yi = αj[i] + βj[i]xi + ǫi (separate regression in each group)

Andrew Gelman Some computational and modeling issues for hierarchical models

slide-12
SLIDE 12

3/13

The models I’m fitting

◮ Hierarchical generalized linear models ◮ yi = α + βxi + ǫi ◮ yi = αj[i] + βj[i]xi + ǫi (separate regression in each group) ◮

αj βj

  • ∼ N

µα µβ

  • ,
  • σ2

α

ρσασβ ρσασβ σ2

β

  • , for j = 1, . . . , J

Andrew Gelman Some computational and modeling issues for hierarchical models

slide-13
SLIDE 13

3/13

The models I’m fitting

◮ Hierarchical generalized linear models ◮ yi = α + βxi + ǫi ◮ yi = αj[i] + βj[i]xi + ǫi (separate regression in each group) ◮

αj βj

  • ∼ N

µα µβ

  • ,
  • σ2

α

ρσασβ ρσασβ σ2

β

  • , for j = 1, . . . , J

◮ Also can have group-level predictors and nonnested grouping

factors

Andrew Gelman Some computational and modeling issues for hierarchical models

slide-14
SLIDE 14

4/13

Application: public opinion in population subgroups

Andrew Gelman Some computational and modeling issues for hierarchical models

slide-15
SLIDE 15

5/13

Software options

Andrew Gelman Some computational and modeling issues for hierarchical models

slide-16
SLIDE 16

5/13

Software options

◮ R, Matlab, etc. (data processing and graphics, general

computing)

Andrew Gelman Some computational and modeling issues for hierarchical models

slide-17
SLIDE 17

5/13

Software options

◮ R, Matlab, etc. (data processing and graphics, general

computing)

◮ C, Fortran, Python, etc. (fast computation)

Andrew Gelman Some computational and modeling issues for hierarchical models

slide-18
SLIDE 18

5/13

Software options

◮ R, Matlab, etc. (data processing and graphics, general

computing)

◮ C, Fortran, Python, etc. (fast computation) ◮ Bugs etc.

Andrew Gelman Some computational and modeling issues for hierarchical models

slide-19
SLIDE 19

5/13

Software options

◮ R, Matlab, etc. (data processing and graphics, general

computing)

◮ C, Fortran, Python, etc. (fast computation) ◮ Bugs etc. ◮ Specialized multilevel modeling software (e.g., lmer in R)

Andrew Gelman Some computational and modeling issues for hierarchical models

slide-20
SLIDE 20

5/13

Software options

◮ R, Matlab, etc. (data processing and graphics, general

computing)

◮ C, Fortran, Python, etc. (fast computation) ◮ Bugs etc. ◮ Specialized multilevel modeling software (e.g., lmer in R) ◮ What’s missing?

Andrew Gelman Some computational and modeling issues for hierarchical models

slide-21
SLIDE 21

5/13

Software options

◮ R, Matlab, etc. (data processing and graphics, general

computing)

◮ C, Fortran, Python, etc. (fast computation) ◮ Bugs etc. ◮ Specialized multilevel modeling software (e.g., lmer in R) ◮ What’s missing?

Andrew Gelman Some computational and modeling issues for hierarchical models

slide-22
SLIDE 22

5/13

Software options

◮ R, Matlab, etc. (data processing and graphics, general

computing)

◮ C, Fortran, Python, etc. (fast computation) ◮ Bugs etc. ◮ Specialized multilevel modeling software (e.g., lmer in R) ◮ What’s missing?

Andrew Gelman Some computational and modeling issues for hierarchical models

slide-23
SLIDE 23

5/13

Software options

◮ R, Matlab, etc. (data processing and graphics, general

computing)

◮ C, Fortran, Python, etc. (fast computation) ◮ Bugs etc. ◮ Specialized multilevel modeling software (e.g., lmer in R) ◮ What’s missing?

Andrew Gelman Some computational and modeling issues for hierarchical models

slide-24
SLIDE 24

5/13

Software options

◮ R, Matlab, etc. (data processing and graphics, general

computing)

◮ C, Fortran, Python, etc. (fast computation) ◮ Bugs etc. ◮ Specialized multilevel modeling software (e.g., lmer in R) ◮ What’s missing?

◮ Something in between “automatic” and “program it yourself” Andrew Gelman Some computational and modeling issues for hierarchical models

slide-25
SLIDE 25

6/13

Some issues with Bugs, OpenBugs, Jags, etc.

Andrew Gelman Some computational and modeling issues for hierarchical models

slide-26
SLIDE 26

6/13

Some issues with Bugs, OpenBugs, Jags, etc.

◮ Difficult to keep track of multiple versions of a model

Andrew Gelman Some computational and modeling issues for hierarchical models

slide-27
SLIDE 27

6/13

Some issues with Bugs, OpenBugs, Jags, etc.

◮ Difficult to keep track of multiple versions of a model

◮ Solution: allow unused parameters and data Andrew Gelman Some computational and modeling issues for hierarchical models

slide-28
SLIDE 28

6/13

Some issues with Bugs, OpenBugs, Jags, etc.

◮ Difficult to keep track of multiple versions of a model

◮ Solution: allow unused parameters and data

◮ Code gets long and ugly

Andrew Gelman Some computational and modeling issues for hierarchical models

slide-29
SLIDE 29

6/13

Some issues with Bugs, OpenBugs, Jags, etc.

◮ Difficult to keep track of multiple versions of a model

◮ Solution: allow unused parameters and data

◮ Code gets long and ugly

◮ Solution: allow subroutines and macros Andrew Gelman Some computational and modeling issues for hierarchical models

slide-30
SLIDE 30

6/13

Some issues with Bugs, OpenBugs, Jags, etc.

◮ Difficult to keep track of multiple versions of a model

◮ Solution: allow unused parameters and data

◮ Code gets long and ugly

◮ Solution: allow subroutines and macros

◮ How long to run the program?

Andrew Gelman Some computational and modeling issues for hierarchical models

slide-31
SLIDE 31

6/13

Some issues with Bugs, OpenBugs, Jags, etc.

◮ Difficult to keep track of multiple versions of a model

◮ Solution: allow unused parameters and data

◮ Code gets long and ugly

◮ Solution: allow subroutines and macros

◮ How long to run the program?

◮ Solution: automatic convergence check Andrew Gelman Some computational and modeling issues for hierarchical models

slide-32
SLIDE 32

6/13

Some issues with Bugs, OpenBugs, Jags, etc.

◮ Difficult to keep track of multiple versions of a model

◮ Solution: allow unused parameters and data

◮ Code gets long and ugly

◮ Solution: allow subroutines and macros

◮ How long to run the program?

◮ Solution: automatic convergence check

◮ Lack of confidence in results. (“My model converged. Now

what?”)

Andrew Gelman Some computational and modeling issues for hierarchical models

slide-33
SLIDE 33

6/13

Some issues with Bugs, OpenBugs, Jags, etc.

◮ Difficult to keep track of multiple versions of a model

◮ Solution: allow unused parameters and data

◮ Code gets long and ugly

◮ Solution: allow subroutines and macros

◮ How long to run the program?

◮ Solution: automatic convergence check

◮ Lack of confidence in results. (“My model converged. Now

what?”)

◮ Solution: automatic fake-data debugging Andrew Gelman Some computational and modeling issues for hierarchical models

slide-34
SLIDE 34

6/13

Some issues with Bugs, OpenBugs, Jags, etc.

◮ Difficult to keep track of multiple versions of a model

◮ Solution: allow unused parameters and data

◮ Code gets long and ugly

◮ Solution: allow subroutines and macros

◮ How long to run the program?

◮ Solution: automatic convergence check

◮ Lack of confidence in results. (“My model converged. Now

what?”)

◮ Solution: automatic fake-data debugging ◮ Solution: support for predictive model checking Andrew Gelman Some computational and modeling issues for hierarchical models

slide-35
SLIDE 35

6/13

Some issues with Bugs, OpenBugs, Jags, etc.

◮ Difficult to keep track of multiple versions of a model

◮ Solution: allow unused parameters and data

◮ Code gets long and ugly

◮ Solution: allow subroutines and macros

◮ How long to run the program?

◮ Solution: automatic convergence check

◮ Lack of confidence in results. (“My model converged. Now

what?”)

◮ Solution: automatic fake-data debugging ◮ Solution: support for predictive model checking

◮ Slow convergnce for moderate to large datasets

Andrew Gelman Some computational and modeling issues for hierarchical models

slide-36
SLIDE 36

6/13

Some issues with Bugs, OpenBugs, Jags, etc.

◮ Difficult to keep track of multiple versions of a model

◮ Solution: allow unused parameters and data

◮ Code gets long and ugly

◮ Solution: allow subroutines and macros

◮ How long to run the program?

◮ Solution: automatic convergence check

◮ Lack of confidence in results. (“My model converged. Now

what?”)

◮ Solution: automatic fake-data debugging ◮ Solution: support for predictive model checking

◮ Slow convergnce for moderate to large datasets

◮ Solution: make use of hierarchical structure Andrew Gelman Some computational and modeling issues for hierarchical models

slide-37
SLIDE 37

6/13

Some issues with Bugs, OpenBugs, Jags, etc.

◮ Difficult to keep track of multiple versions of a model

◮ Solution: allow unused parameters and data

◮ Code gets long and ugly

◮ Solution: allow subroutines and macros

◮ How long to run the program?

◮ Solution: automatic convergence check

◮ Lack of confidence in results. (“My model converged. Now

what?”)

◮ Solution: automatic fake-data debugging ◮ Solution: support for predictive model checking

◮ Slow convergnce for moderate to large datasets

◮ Solution: make use of hierarchical structure

◮ Can run slowly and even crash

Andrew Gelman Some computational and modeling issues for hierarchical models

slide-38
SLIDE 38

6/13

Some issues with Bugs, OpenBugs, Jags, etc.

◮ Difficult to keep track of multiple versions of a model

◮ Solution: allow unused parameters and data

◮ Code gets long and ugly

◮ Solution: allow subroutines and macros

◮ How long to run the program?

◮ Solution: automatic convergence check

◮ Lack of confidence in results. (“My model converged. Now

what?”)

◮ Solution: automatic fake-data debugging ◮ Solution: support for predictive model checking

◮ Slow convergnce for moderate to large datasets

◮ Solution: make use of hierarchical structure

◮ Can run slowly and even crash

◮ Solution: allow the sophisticated user/developer to “get under

the hood” and fix problems

Andrew Gelman Some computational and modeling issues for hierarchical models

slide-39
SLIDE 39

7/13

Need to have subroutines!

Andrew Gelman Some computational and modeling issues for hierarchical models

slide-40
SLIDE 40

7/13

Need to have subroutines!

◮ For example:

for (i in 1:n){ y[i] ~ dnorm (y.hat[i], tau.y) y.hat[i] <- a[state[i]] + b[state[i]]*x[i] e.y[i] <- y[i] - y.hat[i] } tau.y <- pow(sigma.y, -2) sigma.y ~ dunif (0, 100)

Andrew Gelman Some computational and modeling issues for hierarchical models

slide-41
SLIDE 41

7/13

Need to have subroutines!

◮ For example:

for (i in 1:n){ y[i] ~ dnorm (y.hat[i], tau.y) y.hat[i] <- a[state[i]] + b[state[i]]*x[i] e.y[i] <- y[i] - y.hat[i] } tau.y <- pow(sigma.y, -2) sigma.y ~ dunif (0, 100)

◮ We would prefer:

y ~ norm (a[state] + b[state]*x, sigma.y)

Andrew Gelman Some computational and modeling issues for hierarchical models

slide-42
SLIDE 42

7/13

Need to have subroutines!

◮ For example:

for (i in 1:n){ y[i] ~ dnorm (y.hat[i], tau.y) y.hat[i] <- a[state[i]] + b[state[i]]*x[i] e.y[i] <- y[i] - y.hat[i] } tau.y <- pow(sigma.y, -2) sigma.y ~ dunif (0, 100)

◮ We would prefer:

y ~ norm (a[state] + b[state]*x, sigma.y)

◮ And it gets worse when dimension > 2

Andrew Gelman Some computational and modeling issues for hierarchical models

slide-43
SLIDE 43

8/13

Multiplicative redundant parameterization

Andrew Gelman Some computational and modeling issues for hierarchical models

slide-44
SLIDE 44

8/13

Multiplicative redundant parameterization

◮ New code with extra parameters ξa, ξb:

for (i in 1:n){ y[i] ~ dnorm (y.hat[i], tau.y) y.hat[i] <- xi.a*a[state[i]] + xi.b*b[state[i]]*x[i] e.y[i] <- y[i] - y.hat[i] } tau.y <- pow(sigma.y, -2) sigma.y ~ dunif (0, 100) xi.a ~ dnorm (0, .01) xi.b ~ dnorm (0, .01) for (j in 1:J){ a.adj[j] <- xi.a*a[j] b.adj[j] <- xi.b*b[j] }

Andrew Gelman Some computational and modeling issues for hierarchical models

slide-45
SLIDE 45

8/13

Multiplicative redundant parameterization

◮ New code with extra parameters ξa, ξb:

for (i in 1:n){ y[i] ~ dnorm (y.hat[i], tau.y) y.hat[i] <- xi.a*a[state[i]] + xi.b*b[state[i]]*x[i] e.y[i] <- y[i] - y.hat[i] } tau.y <- pow(sigma.y, -2) sigma.y ~ dunif (0, 100) xi.a ~ dnorm (0, .01) xi.b ~ dnorm (0, .01) for (j in 1:J){ a.adj[j] <- xi.a*a[j] b.adj[j] <- xi.b*b[j] }

◮ We would prefer:

y ~ norm (a[state] + b[state]*x, sigma.y)

Andrew Gelman Some computational and modeling issues for hierarchical models

slide-46
SLIDE 46

9/13

Priors needed for hierarchical variance parameters

Andrew Gelman Some computational and modeling issues for hierarchical models

slide-47
SLIDE 47

9/13

Priors needed for hierarchical variance parameters

◮ Problems

Andrew Gelman Some computational and modeling issues for hierarchical models

slide-48
SLIDE 48

9/13

Priors needed for hierarchical variance parameters

◮ Problems

◮ Variances estimated at 0 Andrew Gelman Some computational and modeling issues for hierarchical models

slide-49
SLIDE 49

9/13

Priors needed for hierarchical variance parameters

◮ Problems

◮ Variances estimated at 0 ◮ Correlations estimated at ±1; non-positive-definite covariance

matrices

Andrew Gelman Some computational and modeling issues for hierarchical models

slide-50
SLIDE 50

9/13

Priors needed for hierarchical variance parameters

◮ Problems

◮ Variances estimated at 0 ◮ Correlations estimated at ±1; non-positive-definite covariance

matrices

◮ Solutions

Andrew Gelman Some computational and modeling issues for hierarchical models

slide-51
SLIDE 51

9/13

Priors needed for hierarchical variance parameters

◮ Problems

◮ Variances estimated at 0 ◮ Correlations estimated at ±1; non-positive-definite covariance

matrices

◮ Solutions

◮ Regularization priors for point estimates Andrew Gelman Some computational and modeling issues for hierarchical models

slide-52
SLIDE 52

9/13

Priors needed for hierarchical variance parameters

◮ Problems

◮ Variances estimated at 0 ◮ Correlations estimated at ±1; non-positive-definite covariance

matrices

◮ Solutions

◮ Regularization priors for point estimates ◮ Priors for variances that are bounded away from 0 Andrew Gelman Some computational and modeling issues for hierarchical models

slide-53
SLIDE 53

9/13

Priors needed for hierarchical variance parameters

◮ Problems

◮ Variances estimated at 0 ◮ Correlations estimated at ±1; non-positive-definite covariance

matrices

◮ Solutions

◮ Regularization priors for point estimates ◮ Priors for variances that are bounded away from 0 ◮ Priors for covariance matrices that are bounded away from

degeneracy

Andrew Gelman Some computational and modeling issues for hierarchical models

slide-54
SLIDE 54

9/13

Priors needed for hierarchical variance parameters

◮ Problems

◮ Variances estimated at 0 ◮ Correlations estimated at ±1; non-positive-definite covariance

matrices

◮ Solutions

◮ Regularization priors for point estimates ◮ Priors for variances that are bounded away from 0 ◮ Priors for covariance matrices that are bounded away from

degeneracy

◮ Weakly-informative priors for full Bayes Andrew Gelman Some computational and modeling issues for hierarchical models

slide-55
SLIDE 55

9/13

Priors needed for hierarchical variance parameters

◮ Problems

◮ Variances estimated at 0 ◮ Correlations estimated at ±1; non-positive-definite covariance

matrices

◮ Solutions

◮ Regularization priors for point estimates ◮ Priors for variances that are bounded away from 0 ◮ Priors for covariance matrices that are bounded away from

degeneracy

◮ Weakly-informative priors for full Bayes ◮ Half-Cauchy priors for hierarchical variances Andrew Gelman Some computational and modeling issues for hierarchical models

slide-56
SLIDE 56

9/13

Priors needed for hierarchical variance parameters

◮ Problems

◮ Variances estimated at 0 ◮ Correlations estimated at ±1; non-positive-definite covariance

matrices

◮ Solutions

◮ Regularization priors for point estimates ◮ Priors for variances that are bounded away from 0 ◮ Priors for covariance matrices that are bounded away from

degeneracy

◮ Weakly-informative priors for full Bayes ◮ Half-Cauchy priors for hierarchical variances ◮ Scaled-inverse-Wishart priors for covariances:

ΣB = Diag(ξ)QDiag(ξ)

Andrew Gelman Some computational and modeling issues for hierarchical models

slide-57
SLIDE 57

10/13

Models for deep interactions

Andrew Gelman Some computational and modeling issues for hierarchical models

slide-58
SLIDE 58

10/13

Models for deep interactions

◮ Main effects, 2-way, 3-way, etc.

Andrew Gelman Some computational and modeling issues for hierarchical models

slide-59
SLIDE 59

10/13

Models for deep interactions

◮ Main effects, 2-way, 3-way, etc. ◮ Example: predicting public opinion given 4 age categories, 5

income categories, 50 states

Andrew Gelman Some computational and modeling issues for hierarchical models

slide-60
SLIDE 60

10/13

Models for deep interactions

◮ Main effects, 2-way, 3-way, etc. ◮ Example: predicting public opinion given 4 age categories, 5

income categories, 50 states

◮ 4 + 5 + 50 + 4 × 5 + 4 × 50 + 5 × 50 + 4 × 5 × 50 parameters

(“effects”)

Andrew Gelman Some computational and modeling issues for hierarchical models

slide-61
SLIDE 61

10/13

Models for deep interactions

◮ Main effects, 2-way, 3-way, etc. ◮ Example: predicting public opinion given 4 age categories, 5

income categories, 50 states

◮ 4 + 5 + 50 + 4 × 5 + 4 × 50 + 5 × 50 + 4 × 5 × 50 parameters

(“effects”)

◮ Also, group-level predictors (linear trends for age and income,

previous voting patterns for states)

Andrew Gelman Some computational and modeling issues for hierarchical models

slide-62
SLIDE 62

10/13

Models for deep interactions

◮ Main effects, 2-way, 3-way, etc. ◮ Example: predicting public opinion given 4 age categories, 5

income categories, 50 states

◮ 4 + 5 + 50 + 4 × 5 + 4 × 50 + 5 × 50 + 4 × 5 × 50 parameters

(“effects”)

◮ Also, group-level predictors (linear trends for age and income,

previous voting patterns for states)

◮ Need a richer modeling language

Andrew Gelman Some computational and modeling issues for hierarchical models

slide-63
SLIDE 63

10/13

Models for deep interactions

◮ Main effects, 2-way, 3-way, etc. ◮ Example: predicting public opinion given 4 age categories, 5

income categories, 50 states

◮ 4 + 5 + 50 + 4 × 5 + 4 × 50 + 5 × 50 + 4 × 5 × 50 parameters

(“effects”)

◮ Also, group-level predictors (linear trends for age and income,

previous voting patterns for states)

◮ Need a richer modeling language

◮ glmer (y ~ z.age*z.inc*rvote.st + (z.age*z.inc | st) +

(z.age*rvote.st | inc) + (z.inc*rvote.st | age) + (z.age | inc*st) + (z.inc | age*st) + (z.st |age*inc) + (1 | age*inc*st), family=binomial(link="logistic"))

Andrew Gelman Some computational and modeling issues for hierarchical models

slide-64
SLIDE 64

10/13

Models for deep interactions

◮ Main effects, 2-way, 3-way, etc. ◮ Example: predicting public opinion given 4 age categories, 5

income categories, 50 states

◮ 4 + 5 + 50 + 4 × 5 + 4 × 50 + 5 × 50 + 4 × 5 × 50 parameters

(“effects”)

◮ Also, group-level predictors (linear trends for age and income,

previous voting patterns for states)

◮ Need a richer modeling language

◮ glmer (y ~ z.age*z.inc*rvote.st + (z.age*z.inc | st) +

(z.age*rvote.st | inc) + (z.inc*rvote.st | age) + (z.age | inc*st) + (z.inc | age*st) + (z.st |age*inc) + (1 | age*inc*st), family=binomial(link="logistic"))

◮ No easy way to write this in Bugs or to program it oneself! Andrew Gelman Some computational and modeling issues for hierarchical models

slide-65
SLIDE 65

11/13

Automatic confidence building

Andrew Gelman Some computational and modeling issues for hierarchical models

slide-66
SLIDE 66

11/13

Automatic confidence building

◮ Monitoring convergence

Andrew Gelman Some computational and modeling issues for hierarchical models

slide-67
SLIDE 67

11/13

Automatic confidence building

◮ Monitoring convergence

◮ Solution: check mixing within and between chains; it’s easy Andrew Gelman Some computational and modeling issues for hierarchical models

slide-68
SLIDE 68

11/13

Automatic confidence building

◮ Monitoring convergence

◮ Solution: check mixing within and between chains; it’s easy

◮ Fake-data debugging

Andrew Gelman Some computational and modeling issues for hierarchical models

slide-69
SLIDE 69

11/13

Automatic confidence building

◮ Monitoring convergence

◮ Solution: check mixing within and between chains; it’s easy

◮ Fake-data debugging

◮ Solution: set up Bugs (or whatever) to automatically run itself

with simulated data

Andrew Gelman Some computational and modeling issues for hierarchical models

slide-70
SLIDE 70

11/13

Automatic confidence building

◮ Monitoring convergence

◮ Solution: check mixing within and between chains; it’s easy

◮ Fake-data debugging

◮ Solution: set up Bugs (or whatever) to automatically run itself

with simulated data

◮ Model checking

Andrew Gelman Some computational and modeling issues for hierarchical models

slide-71
SLIDE 71

11/13

Automatic confidence building

◮ Monitoring convergence

◮ Solution: check mixing within and between chains; it’s easy

◮ Fake-data debugging

◮ Solution: set up Bugs (or whatever) to automatically run itself

with simulated data

◮ Model checking

◮ Solution: posterior predictive simulation by default Andrew Gelman Some computational and modeling issues for hierarchical models

slide-72
SLIDE 72

11/13

Automatic confidence building

◮ Monitoring convergence

◮ Solution: check mixing within and between chains; it’s easy

◮ Fake-data debugging

◮ Solution: set up Bugs (or whatever) to automatically run itself

with simulated data

◮ Model checking

◮ Solution: posterior predictive simulation by default ◮ For example:

for (i in 1:n){ y[i] ~ dnorm (y.hat[i], tau.y) y.rep[i] <- dnorm (y.hat[i], tau.y) . . .

Andrew Gelman Some computational and modeling issues for hierarchical models

slide-73
SLIDE 73

11/13

Automatic confidence building

◮ Monitoring convergence

◮ Solution: check mixing within and between chains; it’s easy

◮ Fake-data debugging

◮ Solution: set up Bugs (or whatever) to automatically run itself

with simulated data

◮ Model checking

◮ Solution: posterior predictive simulation by default ◮ For example:

for (i in 1:n){ y[i] ~ dnorm (y.hat[i], tau.y) y.rep[i] <- dnorm (y.hat[i], tau.y) . . .

◮ But y rep should be included automatically Andrew Gelman Some computational and modeling issues for hierarchical models

slide-74
SLIDE 74

11/13

Automatic confidence building

◮ Monitoring convergence

◮ Solution: check mixing within and between chains; it’s easy

◮ Fake-data debugging

◮ Solution: set up Bugs (or whatever) to automatically run itself

with simulated data

◮ Model checking

◮ Solution: posterior predictive simulation by default ◮ For example:

for (i in 1:n){ y[i] ~ dnorm (y.hat[i], tau.y) y.rep[i] <- dnorm (y.hat[i], tau.y) . . .

◮ But y rep should be included automatically ◮ Implicit graphical structure for model checking: y—θ—y rep Andrew Gelman Some computational and modeling issues for hierarchical models

slide-75
SLIDE 75

12/13

Où allons-nous?

Andrew Gelman Some computational and modeling issues for hierarchical models

slide-76
SLIDE 76

12/13

Où allons-nous?

◮ Work in parallel on different software

Andrew Gelman Some computational and modeling issues for hierarchical models

slide-77
SLIDE 77

12/13

Où allons-nous?

◮ Work in parallel on different software ◮ lmer/glmer

Andrew Gelman Some computational and modeling issues for hierarchical models

slide-78
SLIDE 78

12/13

Où allons-nous?

◮ Work in parallel on different software ◮ lmer/glmer

◮ Reglarizing priors Andrew Gelman Some computational and modeling issues for hierarchical models

slide-79
SLIDE 79

12/13

Où allons-nous?

◮ Work in parallel on different software ◮ lmer/glmer

◮ Reglarizing priors ◮ Approximate full Bayes (a few steps of Metropolis) Andrew Gelman Some computational and modeling issues for hierarchical models

slide-80
SLIDE 80

12/13

Où allons-nous?

◮ Work in parallel on different software ◮ lmer/glmer

◮ Reglarizing priors ◮ Approximate full Bayes (a few steps of Metropolis) ◮ Use congjugate gradient to improve speed? Andrew Gelman Some computational and modeling issues for hierarchical models

slide-81
SLIDE 81

12/13

Où allons-nous?

◮ Work in parallel on different software ◮ lmer/glmer

◮ Reglarizing priors ◮ Approximate full Bayes (a few steps of Metropolis) ◮ Use congjugate gradient to improve speed?

◮ Bugs

Andrew Gelman Some computational and modeling issues for hierarchical models

slide-82
SLIDE 82

12/13

Où allons-nous?

◮ Work in parallel on different software ◮ lmer/glmer

◮ Reglarizing priors ◮ Approximate full Bayes (a few steps of Metropolis) ◮ Use congjugate gradient to improve speed?

◮ Bugs

◮ Subroutines, automatic monitoring, other improvements

discussed above

Andrew Gelman Some computational and modeling issues for hierarchical models

slide-83
SLIDE 83

12/13

Où allons-nous?

◮ Work in parallel on different software ◮ lmer/glmer

◮ Reglarizing priors ◮ Approximate full Bayes (a few steps of Metropolis) ◮ Use congjugate gradient to improve speed?

◮ Bugs

◮ Subroutines, automatic monitoring, other improvements

discussed above

◮ HBC (hierarchical Bayes compiler)

Andrew Gelman Some computational and modeling issues for hierarchical models

slide-84
SLIDE 84

12/13

Où allons-nous?

◮ Work in parallel on different software ◮ lmer/glmer

◮ Reglarizing priors ◮ Approximate full Bayes (a few steps of Metropolis) ◮ Use congjugate gradient to improve speed?

◮ Bugs

◮ Subroutines, automatic monitoring, other improvements

discussed above

◮ HBC (hierarchical Bayes compiler)

◮ Closer to programming it myself Andrew Gelman Some computational and modeling issues for hierarchical models

slide-85
SLIDE 85

12/13

Où allons-nous?

◮ Work in parallel on different software ◮ lmer/glmer

◮ Reglarizing priors ◮ Approximate full Bayes (a few steps of Metropolis) ◮ Use congjugate gradient to improve speed?

◮ Bugs

◮ Subroutines, automatic monitoring, other improvements

discussed above

◮ HBC (hierarchical Bayes compiler)

◮ Closer to programming it myself ◮ A better modeling language? Andrew Gelman Some computational and modeling issues for hierarchical models

slide-86
SLIDE 86

13/13

Vos pensées??

◮ Where to go on Bugs? ◮ How to work efficiently when so many research groups around

the world are fitting these models?

◮ How to move from “The program converged!” to “The model

makes sense”?

Andrew Gelman Some computational and modeling issues for hierarchical models