Hierarchical models (cont.)
- Dr. Jarad Niemi
STAT 544 - Iowa State University
February 21, 2019
Jarad Niemi (STAT544@ISU) Hierarchical models (cont.) February 21, 2019 1 / 21
Hierarchical models (cont.) Dr. Jarad Niemi STAT 544 - Iowa State - - PowerPoint PPT Presentation
Hierarchical models (cont.) Dr. Jarad Niemi STAT 544 - Iowa State University February 21, 2019 Jarad Niemi (STAT544@ISU) Hierarchical models (cont.) February 21, 2019 1 / 21 Outline Theoretical justification for hierarchical models
Jarad Niemi (STAT544@ISU) Hierarchical models (cont.) February 21, 2019 1 / 21
Jarad Niemi (STAT544@ISU) Hierarchical models (cont.) February 21, 2019 2 / 21
Theoretical justification for hierarchical models Exchangability
Jarad Niemi (STAT544@ISU) Hierarchical models (cont.) February 21, 2019 3 / 21
Theoretical justification for hierarchical models Exchangability
Jarad Niemi (STAT544@ISU) Hierarchical models (cont.) February 21, 2019 4 / 21
Theoretical justification for hierarchical models de Finetti’s theorem
ind
Jarad Niemi (STAT544@ISU) Hierarchical models (cont.) February 21, 2019 5 / 21
Theoretical justification for hierarchical models Hierarchical models
Jarad Niemi (STAT544@ISU) Hierarchical models (cont.) February 21, 2019 6 / 21
Theoretical justification for hierarchical models Covariate information
Jarad Niemi (STAT544@ISU) Hierarchical models (cont.) February 21, 2019 7 / 21
Summary
Jarad Niemi (STAT544@ISU) Hierarchical models (cont.) February 21, 2019 8 / 21
Normal hierarchical models
Jarad Niemi (STAT544@ISU) Hierarchical models (cont.) February 21, 2019 9 / 21
Normal hierarchical models Posterior
Jarad Niemi (STAT544@ISU) Hierarchical models (cont.) February 21, 2019 10 / 21
Normal hierarchical models Posterior
i +τ 2)
i +τ 2
i +τ 2
i + 1
i + µ
Hierarchical models (cont.) February 21, 2019 11 / 21
Normal hierarchical models Simulation study
Jarad Niemi (STAT544@ISU) Hierarchical models (cont.) February 21, 2019 12 / 21
Normal hierarchical models Simulation study
J = 10 n_per_group = 9 n = rep(n_per_group,J) sigma = 1 N = sum(n) group = rep(1:J, each=n_per_group) set.seed(1) df = rbind(data.frame(group = factor(group), simulation = "common_mean", y = rnorm(N )), # All means are the same data.frame(group = factor(group), simulation = "group_specific_mean", y = rnorm(N, group-(J/2+.5)))) # Each group has its own mean Jarad Niemi (STAT544@ISU) Hierarchical models (cont.) February 21, 2019 13 / 21
Normal hierarchical models Simulation study common_mean group_specific_mean 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 −4 4
group y group
1 2 3 4 5 6 7 8 9 10 Jarad Niemi (STAT544@ISU) Hierarchical models (cont.) February 21, 2019 14 / 21
Normal hierarchical models Simulation study
simulation group n mean sd 1 common mean 1 9 0.18 0.81 2 common mean 2 9 0.09 1.11 3 common mean 3 9 0.18 0.91 4 common mean 4 9
0.89 5 common mean 5 9 0.17 0.62 6 common mean 6 9 0.02 0.70 7 common mean 7 9 0.61 1.14 8 common mean 8 9 0.14 1.19 9 common mean 9 9
0.60 10 common mean 10 9 0.20 0.81 11 group specific mean 1 9
1.10 12 group specific mean 2 9
0.88 13 group specific mean 3 9
0.89 14 group specific mean 4 9
0.60 15 group specific mean 5 9
0.61 16 group specific mean 6 9
0.95 17 group specific mean 7 9 1.21 1.12 18 group specific mean 8 9 2.23 1.15 19 group specific mean 9 9 3.97 1.26 20 group specific mean 10 9 5.08 0.77 Jarad Niemi (STAT544@ISU) Hierarchical models (cont.) February 21, 2019 15 / 21
Normal hierarchical models Sampling on a grid
i=1 f(xi)
Jarad Niemi (STAT544@ISU) Hierarchical models (cont.) February 21, 2019 16 / 21
Normal hierarchical models Sampling on a grid
common_mean group_specific_mean 0.0 2.5 5.0 7.5 10.0 0.0 2.5 5.0 7.5 10.0 1 2
x − h p
Jarad Niemi (STAT544@ISU) Hierarchical models (cont.) February 21, 2019 17 / 21
Normal hierarchical models Sampling on a grid
tau mu common_mean group_specific_mean 0.0 2.5 5.0 7.5 −6 −3 3 1 2 3 4 1 2 3 4
value density
Jarad Niemi (STAT544@ISU) Hierarchical models (cont.) February 21, 2019 18 / 21
Normal hierarchical models Sampling on a grid
common_mean group_specific_mean hierarchical independent −6 −3 3 6 −6 −3 3 6 1 2 1 2
value density variable
theta.1 theta.2 theta.3 theta.4 theta.5 theta.6 theta.7 theta.8 theta.9 theta.10
Jarad Niemi (STAT544@ISU) Hierarchical models (cont.) February 21, 2019 19 / 21
Normal hierarchical models Summary
Jarad Niemi (STAT544@ISU) Hierarchical models (cont.) February 21, 2019 20 / 21
Normal hierarchical models Summary
Jarad Niemi (STAT544@ISU) Hierarchical models (cont.) February 21, 2019 21 / 21