belong to the family of generalized linear models (Fox,
2015). With such models, the response variable has a
distribution that belongs to the exponential family and
has a link function (Wakefield, 2013). By the above
description, there are several generalized linear models but the Poisson model is what was considered in
this study.
3.2.2 Setup
Considering a map of n small regions, let y i denote
the observed count and E i the expected count in each
region, i. This setup results in the response variable,
y i , being distributed as y i |η i ∼ Po(E i exp (η i ) ) , where
η i = X
T
i β is the relative risk of the Poisson model.
β = vector of parameters to be determined and X i =
covariates. Let a Normal prior with mean = β 0 and
variance-covariance matrix = 0 , be assigned to β.
Then the posterior distribution of β given the data, y,
is
p
β|y
∝ p
y|η
p
β|β 0 , 0
(7)
The terms on the right of equation (7) are
p
y|η
=
n
i=1
(E i exp(η i ))
yi
y i !
exp( − E i exp (η i ) )
= exp
n
i=1
(y i η i − E i exp (η i ) + y i lnE i
−ln(y i !))
p
β|β 0 , 0
= (2π)
−n/2 | 0 |
−1/2
exp
−
1
2
β − β 0
T
−1
0 (β − β 0 )
After ignoring constant terms in equation (7), the
posterior distribution becomes
p
β|y
∝ exp
n
i=1
y i η i − E i exp (η i )
−
1
2
(β − β 0 )
T
−1
0
β − β 0
Since the posterior distribution is not in closed form,
it is difficult to draw McMC samples from it. To arrive
at a proposal distribution that is easy to sample from, a
second order Taylor’s expansion about a suitable value,
say z i , had to be constructed (Rue, H. & Held, L., 2005).
The resulting expression is
˜
f (η i ) = E i exp (z i )
z i −
1
2
z
2
i − 1
+
y i + E i
exp (z i ) (z i − 1)
η i −
1
2
E i exp (z i )
η
2
i (8)
Equation (8) is equivalent to
˜
f (η i ) = a i + b i η i −
1
2
c i η
2
i
Now, the full conditional distribution of β becomes
p(β|y) ∝ p(y|β)p
β|β 0 , 0
=
n
i=1
E i exp (η i )
yi
y i !
exp
−E i exp (η i )
(2π)
−n/2
| 0 |
−1/2
exp
−
1
2
β − β 0
T
−1
0
β − β 0
∝ exp
n
i=1
y i η i − E i exp (η i )
exp
−
1
2
β − β 0
T
−1
0
β − β 0
= exp
n
i=1
y i η i − E i exp (η i )
−
1
2
β − β 0
T
−1
0
β − β 0
= exp
−
1
2
β
T
−1
0 β + β
T
−1
0 β 0
+η
T y − exp (η)
T E
Let (η) = η
T y − exp (η)
T E). Then by the second order
Taylor’s expansion of f (η) at z, a similar expressions
as ˜
f (η) ∝ η
T b −
1
2
η
T diag (c)η was arrived at. Hence,
replacing η by X β, ’the full conditional of β becomes
q
β | y, z, β 0 , 0
∝ exp
−
1
2
β
T
−1
0 β
+β
T
−1
0 β 0
+ (X β)
T b −
1
2
(X β)
T diag (c)X β
= exp
−
1
2
β
T
−1
0 β − 2β
T
−1
0 β 0
− 2(X β)
T b
+(X β)
T diag (c)X β
= exp
−
1
2
β
T
−1
0 + X
T diag (c)X
β − 2β
T
−1
0 β 0 + X
T b
= N
−1
0 β 0 + X
T b
−1
0 + X
T diag (c)X
−1 ,
−1
0 + X
T diag (c)X
−1
The above approximated density is multivariate normal distribution with precision,
P =
−1
0 + X
T diag (c)X .
3.2.3 Simulation
The expected count for each region, E i , was fixed at
one. About 100 arbitrary regions were considered and
the relative risk, η i , was parametrized with the log
relative risk model given by log (η i ) = 1 + 2C i . This
parametrization was to aid the modeling of the relationship between the dependent and the independent
64
2015). With such models, the response variable has a
distribution that belongs to the exponential family and
has a link function (Wakefield, 2013). By the above
description, there are several generalized linear models but the Poisson model is what was considered in
this study.
3.2.2 Setup
Considering a map of n small regions, let y i denote
the observed count and E i the expected count in each
region, i. This setup results in the response variable,
y i , being distributed as y i |η i ∼ Po(E i exp (η i ) ) , where
η i = X
T
i β is the relative risk of the Poisson model.
β = vector of parameters to be determined and X i =
covariates. Let a Normal prior with mean = β 0 and
variance-covariance matrix = 0 , be assigned to β.
Then the posterior distribution of β given the data, y,
is
p
β|y
∝ p
y|η
p
β|β 0 , 0
(7)
The terms on the right of equation (7) are
p
y|η
=
n
i=1
(E i exp(η i ))
yi
y i !
exp( − E i exp (η i ) )
= exp
n
i=1
(y i η i − E i exp (η i ) + y i lnE i
−ln(y i !))
p
β|β 0 , 0
= (2π)
−n/2 | 0 |
−1/2
exp
−
1
2
β − β 0
T
−1
0 (β − β 0 )
After ignoring constant terms in equation (7), the
posterior distribution becomes
p
β|y
∝ exp
n
i=1
y i η i − E i exp (η i )
−
1
2
(β − β 0 )
T
−1
0
β − β 0
Since the posterior distribution is not in closed form,
it is difficult to draw McMC samples from it. To arrive
at a proposal distribution that is easy to sample from, a
second order Taylor’s expansion about a suitable value,
say z i , had to be constructed (Rue, H. & Held, L., 2005).
The resulting expression is
˜
f (η i ) = E i exp (z i )
z i −
1
2
z
2
i − 1
+
y i + E i
exp (z i ) (z i − 1)
η i −
1
2
E i exp (z i )
η
2
i (8)
Equation (8) is equivalent to
˜
f (η i ) = a i + b i η i −
1
2
c i η
2
i
Now, the full conditional distribution of β becomes
p(β|y) ∝ p(y|β)p
β|β 0 , 0
=
n
i=1
E i exp (η i )
yi
y i !
exp
−E i exp (η i )
(2π)
−n/2
| 0 |
−1/2
exp
−
1
2
β − β 0
T
−1
0
β − β 0
∝ exp
n
i=1
y i η i − E i exp (η i )
exp
−
1
2
β − β 0
T
−1
0
β − β 0
= exp
n
i=1
y i η i − E i exp (η i )
−
1
2
β − β 0
T
−1
0
β − β 0
= exp
−
1
2
β
T
−1
0 β + β
T
−1
0 β 0
+η
T y − exp (η)
T E
Let (η) = η
T y − exp (η)
T E). Then by the second order
Taylor’s expansion of f (η) at z, a similar expressions
as ˜
f (η) ∝ η
T b −
1
2
η
T diag (c)η was arrived at. Hence,
replacing η by X β, ’the full conditional of β becomes
q
β | y, z, β 0 , 0
∝ exp
−
1
2
β
T
−1
0 β
+β
T
−1
0 β 0
+ (X β)
T b −
1
2
(X β)
T diag (c)X β
= exp
−
1
2
β
T
−1
0 β − 2β
T
−1
0 β 0
− 2(X β)
T b
+(X β)
T diag (c)X β
= exp
−
1
2
β
T
−1
0 + X
T diag (c)X
β − 2β
T
−1
0 β 0 + X
T b
= N
−1
0 β 0 + X
T b
−1
0 + X
T diag (c)X
−1 ,
−1
0 + X
T diag (c)X
−1
The above approximated density is multivariate normal distribution with precision,
P =
−1
0 + X
T diag (c)X .
3.2.3 Simulation
The expected count for each region, E i , was fixed at
one. About 100 arbitrary regions were considered and
the relative risk, η i , was parametrized with the log
relative risk model given by log (η i ) = 1 + 2C i . This
parametrization was to aid the modeling of the relationship between the dependent and the independent
64
