Page 281 - Linear Models for the Prediction of Animal Breeding Values 3rd Edition
P. 281

batch effective chain size. Given a chain of size k, successive samples are grouped into b
        batches, each of size t. The average of the jth batch can be computed as:
                 t
                å  fw )
                    (
                      i
            u =  i=1
             j
                   t
        The batch estimator of the variance of m in Eqn 16.14 is:
                     b
                    å  (u -  ) m 2
                        j
            var ( ) =  j=1
                m
               b
                       ( bb -1 )
        The batch effective chain size can be obtained as:
                 k
                 å [(  i )  m] 2
                    fw -
            y =  i=1
             b
                 ( k - )var ( u)
                     1
                         b
        If samples are uncorrelated, then y = k. The difference between y and k gives an idea
        of the degree of the autocorrelation among the samples in the chain.


        16.2.4  Numerical application

        Example 16.1
        Using the data in Example 3.1 and the variance components, the application of Gibbs
        sampling for estimation of variance components and the prediction of breeding val-
        ues is illustrated. Uniform priors are assumed for the variance components such that
                            2
                         2
        v  = v  = −2 and s  = s  = 0. A flat prior is assumed for b, and u is assumed to be
         e    a          e  u
        normally distributed.
                        [1]
            First, sample b , where the superscript in brackets denotes iteration number, using
                        1
                       ˆ
                                                                −1
                                                          2
                                                       −1
        Eqn 16.11, with b  calculated using Eqn 3.5 and (x ′x) s  = (3) 40 = 13.333. From
                        1                            j    e
        Eqn 3.5:
            ˆ b  = [(4.5 + 3.5 + 5.0) − ( 0 + 0 + 0)]/3 = 4.333
             1
        Assuming the random number (RN) generated from a normal distribution, N(0,1), is
        0.1704, then b  from Eqn 16.11 is:
                     1
              1 []
            b =  4 333 0 1704 13 333 4 955
                                     =
                      +
                  .
                         .
                                 .
                                        .
             1
                                                                   ˆ
                                                 2
                                              −1
                                                      −1
        Then sample b  using Eqn 16.11 with (x ′x) s  = (2) 40 = 20 and b  is:
                     2                      j    e                  2
            ˆ b  = [(2.9 + 3.9) − (0 + 0 )]/2 = 3.40
             2
        Assuming the RN from N(0,1) is −0.1294, then:
              1 []
                     -
            b = 3 40 0 1294 20 2 821
                                =
                  .
                       .
                                  .
             2
        The vector of solution u  for animal j is sampled using Eqn 16.12, with uˆ  calculated
                             j                                          j
        using Eqn 3.8. Thus for animal 1:
        Use of Gibbs Sampling                                                265
   276   277   278   279   280   281   282   283   284   285   286