Page 279 - Linear Models for the Prediction of Animal Breeding Values 3rd Edition
P. 279
where:
ˆ b = (X′X) X′(y − Zu)
−1
Thus for the jth level of b:
ˆ
ˆ
2
2
–1
2
b |b , u, s , s , y ~ N(b , (x ′x ) s ) (16.11)
j –j u e j j j e
ˆ
−1
with b = (x′ x ) x′ (y − X b − Zu), which is equivalent to Eqn 3.5, x is the jth row
j j j j j −j j
of X and b is the vector b with level j deleted.
−j
Similarly, the distribution for the jth random effect is:
2
−1
2
2
−1
u |b, u , s , s , y ~ N(uˆ , (z′z + A , a) s ) (16.12)
j −j u e j j j j,j e
with:
−1
ˆ
−1
u = (z′ z + A a) z′ (y − Xb − A −1 , au )
j j j j,j j j,−j −j
which is equivalent to Eqn 3.8.
The full conditional of distribution of the residual variance is derived from Eqn 16.9
2
2
by considering only terms that involve s and is in the scaled inverted χ form (Wang
e
et al., 1993). Thus for the residual variance:
+
æ nv e ö
2
- ç + 1 ÷ æ vs ö
2 2 , ) y μ 2 è 2 ø exp - ee
e bu u e ) ç 2 ÷ ÷
P(s | , ,s (s ç ÷
è 2 s e ø
-
-
′
-
+
2
where v = n v and s = ((yXb Zu ) (y - Xb Zu )) + v s ) / v
2
e e e e e e
Hence:
2 -
2
2
s |, ,bu s , ~y vs c 2 (16.13)
e u e e v e
2
which involve sampling from an inverted c distribution with scale parameter,
−
(y − Xb Zu )′ (yXb Zu- - ) + vs and v degrees of freedom.
2
e
ee
2
Similarly, the full conditional distribution of s is also in the form of an inverted
u
chi-square. Thus:
æ + ö
2
- ç mv u + 1 ÷ æ vs ö
P(s 2 | , ,s 2 , ) y μ (s 2 ) è 2 ø exp - uu ÷
ç
bu
u e u ç 2 ÷ ÷
è 2 s u ø
+
where v = m v and s = ((uA u′ -1 ) + v s ) / v
2
2
u u u u u u
Thus:
2 -
2
2
s |, ,bu s , ~y v s c 2 (16.14)
u u u u v u
which involves sampling from an inverted c distribution with scale parameter
2
2
(u Au′ −1 ) + vs and v degrees of freedom.
uu u
2
2
The Gibbs sampling then consists of setting initial values for b, u, s and s and
u e
iteratively sampling successively from Eqns 16.11 to 16.14, using updated values of
the parameters from the i round in the i + 1 round. Assuming that k rounds of itera-
tion were performed, then k is called the length of the chain. As mentioned earlier,
the first j samples are usually discarded as the burn-in period. This is to ensure that
samples saved are not influenced by the priors but are drawn from the posterior
Use of Gibbs Sampling 263