2. DE LA ÉTICA EN EL ACTUAR DEL SERVIDOR PÚBLICO EN COLOMBIA
2.1 El concepto de ética aplicado a los servidores públicos
We now compare efficiencies of the algorithms, mainly through estimated autocor- relation times, but also, through label-switching.
2.6.2.1 Integrated autocorrelation time
The integrated autocorrelation time of a parameter gives the effective number of consecutive realisations equivalent to one independent realisation of that param- eter. Thus it provides a measure for direct comparison of efficiencies between algorithms. However different algorithms take different amounts of time to pro- duce a fresh realisation of the parameter vector. A more practical measure of efficiency is therefore the time to produce a single (in effect) independent realisa- tion of a parameter. The exact timing and CPU used should not be important so we use timings relative to those of the Gibbs sampler. Our measure of efficiency is therefore
ACTrel =ACT ×
time per iteration (algorithm) time per iteration (Gibbs) Lower values correspond to greater efficiency.
Timings relative to the Gibbs sampler are consistent at about 3.2 for (M1), 3.1 (M2), 0.8 (M3), 3.0 (M4), and 3.5 (M5) (see Table B.6). The most CPU intensive operation is the forward-backward accumulation step used to calculate the likeli- hood in (M1-M5) and to begin sampling the states at event times in the Gibbs sampler. The Gibbs sampler and M3 apply this once per iteration, whereas M1, M2, M4 and M5 apply it once per parameter.
Different functions of a particular parameter will posses different ACT’s. Intuition reinforced by the trace plots and qq plots of section 2.6.1 leads us to believe that some of the algorithms behave poorly at low values of qij and this would not be
picked up if we simply examined the ACT’s of the parameters. We therefore use the ACT’s of log(q12) and log(q21) instead.
We compare estimated relative autocorrelation times for the parameters λ1, λ2,
logq12 and logq21 with states ordered so thatλ1 < λ2 for the first 10 000 iterations
in every run performed. Results for the core runs are shown in Table 2.3. Results for additional runs are given in Appendix B.
There is a great deal of variability across parameters and replicates due to ran- dom variation, as well as (inevitably) imperfect tuning of the random walk al- gorithms. Further, different replicates are different datasets, and while simulated from the same parameter values these will have different properties, especially when δ:= (λ2−λ1)/λ is small.
Despite all the variability it is clear that the Gibbs sampler is more efficient than the Metropolis-Hastings algorithms M1-M4 and more efficient than M5 on runs S1 and S2. The contrast in efficiency is most striking for S1 where the Gibbs sampler is consistently at least an order of magnitude more efficient than any of the other algorithms; for most of the other datasets the Gibbs sampler is at least twice as efficient as random-walk algorithms M1-M4. However M5 performs simlarly to the Gibbs sampler on S3 and arguably outperforms the Gibbs sampler on S4, the sce-
CHAPTER 2. BAYESIAN ANALYSIS OF THE MMPP 79 Data Alg λ1 λ2 q12 q21 S1 Gibbs 1.2 1.2 1.4 1.4 M1 14.0 14.1 13.3 14.9 M2 13.5 12.9 15.3 12.8 M3 11.8 10.5 10.5 9.8 M4 7.9 82.4 14.3 14.8 M5 9.5 14.2 105.0 161.5 S2 Gibbs 4.2 3.3 5.8 6.0 M1 22.0 19.4 28.2 28.6 M2 19.1 20.6 29.6 27.3 M3 10.5 15.2 16.6 18.5 M4 12.5 25.7 27.4 25.1 M5 13.2 14.6 27.2 29.9 S3 Gibbs 24.2 18.3 33.3 23.6 M1 63.7 49.5 76.4 68.5 M2 101.5 84.8 104.6 73.3 M3 38.2 24.9 34.3 32.0 M4 74.8 55.2 85.2 72.1 M5 17.7 22.0 23.2 18.5 S4 Gibbs 32.2 28.9 35.5 53.0 M1 90.7 91.0 106.1 127.7 M2 99.6 130.0 110.9 155.4 M3 73.9 62.1 86.9 85.1 M4 76.1 94.2 109.3 109.9 M5 23.6 70.6 10.6 8.2
nario closest to that for which it was designed. A qualitatively similar pattern is observed in all additional replicates (see Tables B.2, B.3, and B.4). In general the Gibbs sampler appears to be the most efficient algorithm on most of the simulated datasets we analysed. The only exceptions occur for datasets where the Poisson intensities corresponding to the two different states of the chain are similar; in these cases sometimes M5 is the most efficient of all the algorithms.
For S1 (and additional datasets with very differentλ1andλ2- see Appendix B) the
reparameterisation M5 is very inefficient due to the poor mixing of theq parame- ters. However for all other datasets the reparameterisation is at least as efficient as any of the other sequential random-walks, and is often much more efficient than these. Further investigation of the exploration of S4 by algorithm M5 showed that the highACTrel forλ2 is due to the short excursion to highλ2 and lowq12 already
mentioned in Section 2.6.1.
The multiplicative sequential random walk (M1) does not appear to be any more efficient than its additive counterpart (M2). We must recall though that the ACT measures the efficiency of an algorithm at exploring the portion of the parameter space that it actually explores. It does not penalise an algorithm that completely misses a heavy tail for example, and we have already remarked that M1 appears to explore heavy tails better than M2.
To assess the success of the reparameterisation M4 we compare the two additive random walks. For data set S4, for 7 of the 8 ACT’s across the 2 replicates the M4 reparameterisation performs better than M2, perhaps justifying the reparam-
CHAPTER 2. BAYESIAN ANALYSIS OF THE MMPP 81
eterisation in this case. For parameter λ2 in both replicates of S1, M4 behaves
noticeably worse than M2 and in all other cases there is no clear difference be- tween the performance of the two algorithms. The reparameterisation does not produce the hoped for improvement in S3, nor in the additional replicates (see Appendix B) similar to S3 except with tobs = 400 instead of 100. An explanation
for these results is presented in 2.6.3.
It is also noticeable that the ACT’s for all algorithms tend to increase with de- creasing (λ2−λ1)/λ, and therefore heavier posterior tails, which are naturally more
slowly explored.
2.6.2.2 Label-switching
Label-switching can provide another indication of an algorithm’s ability to explore areas of low mass. In many of the runs either the region between the modes is of such low density that switching does not occur for any algorithm, or the modes are so close together that all algorithms are effectively switching nearly every iteration. However for replicates 1 and 2 of S3 and replicate 1 of S4 the spacing of the modes allows a meaningful comparison of frequency of label-switching. Table 2.4 shows the mean number of label switches per 10 000 iterations (recall that for replicate 1, both the Gibbs sampler and M1 were run for 100 000 iterations).
Overall it appears that M4 is best able to switch between the modes. Firstly we note that λ is invariant to label-switches; secondly that for S3 and S4 we will often find ν1 ≈ ν2 and so parameter λ⊥ := ν2λ1 − ν1λ2 (for which large
Data Gibbs M1 M2 M3 M4
S3 rep. 1 20 12 1 2 9
S3 rep. 2 1 0 0 0 2
S4 rep. 1 20 15 13 9 97
Table 2.4: Mean number of label-switches per 10 000 iterations for replicates 1 and 2 of S3 and replicate 1 of S4.
the two modes. The Gibbs sampler label-switches more frequently than any of the Metropolis-Hastings random walks with the standard parameterisation.