# CS代考程序代写 Bayesian data structure A QUICK LOOK INTO INLA

A QUICK LOOK INTO INLA
STA465: Theory and Methods for Complex Spatial Data
Instructor: Dr. Vianey Leos Barajas

BACK TO THE AIR POLLUTION

GLOBAL PM2.5 DATA

FITTING MULTILEVEL MODELS IN INLA

WHAT IS INLA?
INLA stands for the Integrated Nested Laplace Approximation
It is a clever way to compute posterior distributions for multilevel models and their spatial generalizations
For the purposes of this course, it is magic.
This magic takes the form of an R-package that can be downloaded from http://r-inla.org/

HOW TO CALL INLA
INLA works just like the formula in lm but with some slight differences
The f() function describe random effects (ie things that have more structure.
➤ The first two terms are μj . The second two are βjxij

Sections 4.6-4.9 on Blangiardo and Cameletti.
Geospatial Health Data: Modeling and Visualization with R- INLA and Shiny

WHAT COMES OUT?

WHAT WERE THE PRIORS?
Good question!
You’ve got to dig into the documentation to find them.
μ ∼ N(0,1000) β ∼ N(0,100)

Are these sensible???
τμ2 ∼ Exp(100) τ2 ∼ Exp(100)
β
σ2 ∼ Exp(100)

WE CAN SIMULATE FROM THE PRIORS
Simulate

μ β
∼ N(0,1000) ∼ N(0,100)
τμ2 τ2
∼ Exp(100) ∼ Exp(100) ∼ N ( μ , τ μ2 ) ∼ N(β, τ2)
β μ j
βj σ2
yij
β
∼ Exp(100)
∼N(μj+βjxij,σ2)

WAIT?! WHAT?
The prior model is two orders of magnitude off the real data
Two orders of magnitude on the log scale! ➤ Logdensityofneutronstaronly60 μgm−3
What does this mean practically?
The data will have to overcome the prior…
➤ ➤
➤ ➤

WE CAN DO BETTER
With more sensible priors
μ ∼ N(0,1) β ∼ N(1,1)

τμ2 ∼ N+(0,1) τ2 ∼ N+(0,1)
β
σ2 ∼ N+(0,1)

AND MAKE IT EASIER TO DEFEND YOUR MODELLING CHOICES
Non-informative
Weakly informative

A DIFFERENT VISUALIZATION
Prior predictive distribution with vague prior
Prior predictive distribution with weakly informative prior
Pallastunturi fells
Pallastunturi fells Concrete
Concrete
Neutron star
−1500 −1000
−500 0 500 1000
log(PM2.5)
−20 −10
0 10 20
log(PM2.5)
30

SPATIAL STRUCTURES AND INLA

NEXT WEEK…
Next week we will get into spatial models. We will use INLA for the remainder of the term.

So far, we have focused on two general topics: Simulation from Bayesian models

Maps
For the rest of the term, we’ll put those two together!
We’ll simulate from models.
We’ll plot our model results with maps.

GENERAL SPATIAL DATA STRUCTURES
General spatial data structure: Z(s) : s ∈ D ⊂ Rd Areal Data
Geostatistical Data
➤ ➤

Point patterns