The full conditional distribution for λ is characterised by the individual full conditionals for λt, whose specification and updating scheme will now be case sensitive according to different
combinations induced by current latent index variables (dt−1, dt, dt+1): I) dt−1 6= dt and II)
dt−1 = d0t, for t = 2, . . . , T . The full conditionals and updating sampling scheme induced by
those cases can be spread into:
I) For the case dt−16= dt, full conditional distribution for λt will be given by
p(λt|yt; θdt) ∝ N(yt|0, λt) We(λt|θdt).
Updating λt can be done using the slice sampler.
II) The case case dt−1 = dt will be case sensitive to the additional relationship between dt
and dt+1. Hence, updating λt in this case can be done according to:
IIa) The case of having dt 6= dt+1, for which the updated λt can be obtained from the
conditional distribution
p(λt|yt, zt, λt−1; θdt) ∝ N(yt|0, λt)g1,zt(λt|λt−1; µ, θdt),
IIb) The case of having dt = dt+1 will induce the following full conditional distribution
for λt,
p(λt|yt, zt, zt+1, λt−1, λt+1; θdt) ∝ N(yt|0, λt)g1,zt(λt|λt−1; µ, θdt)
·g1,zt+1(λt+1|λt; µ, θdt)p(zt+1|λt; µ, θdt),
with g1,zt(λt|λt−1; µ, θdt) and p(zt+1|λt; µ, θdt) also given.
In the above cases, updating λt will require slice sampler steps.
C.6.1 Further details on the full conditional distributions for λt
Due to the way each zt is defined in the model, and that at each t the previous latent
variable λt−1 splits the support of λt, and similarly λt splits the support of λt+1, the full
conditional distributions derived above are actually case sensitive. The cases we shall explore depend on (λ0t−1, zt0, zt+1, λt+1, yt), specifically on the different combination according to the
relation between the pair λ0t−1 and λt+1, namely: i) λ0t−1 < λt+1, ii) λ0t−1 = λt+1, and iii)
λ0t−1 > λt+1. Associated with each of the above cases, we shall also need to explore the
derived combinations between the values that zt0 and zt+1 may take.
Also, the full conditionals will depend on the time period at which the sampler will be standing. Let us start considering the full conditional distribution for the periods t = 2, . . . , T − 1.
i) The case λ0t−1 < λt+1 will require to explore five different sub-cases in terms of z’s: a)
zt0 = −1 and zt+1 = 1, b) zt0 = 0 and zt+1 = 1, c) zt0 = 1 and zt+1 = 1, d) zt0 = 1
and zt+1 = 0, and e) zt0 = 1 and zt+1 = −1, for which it is possible to derive the full
conditional distributions:
a) The sub-case zt0 = −1 and zt+1 = 1 will give rise to a full conditional distribution
for λ0t given by p(λ0t| . . .) ∝ N(yt|0, λ0t) gµ(λ0t|λ 0 t−1)µk(λ0 t)Sµ(λ 0 t) S0(λ0t) 1(λ0t∈ (0, λ 0 t−1)).
b) The combination zt0 = 0 and zt+1= 1 will give rise to a degenerated full conditional
distribution, given by,
c) The combination zt0 = 1 and zt+1 = 1 induces the following full conditional distri- bution, p(λ0t| . . .) ∝ N(yt|0, λ0t) g0(λ0t)µk(λ0 t)Sµ(λ 0 t) S0(λ0t) 1(λ0t∈ (λ 0 t−1, λt+1)).
d) The combination zt0 = 1 and zt+1= 0 will give rise to a degenerated full conditional
distribution, given by
p(λ0t| . . .) ∝ δλt+1(λ0t).
e) The last sub-case corresponding to the combination zt0 = 1 and zt+1 = −1 will
induce the following conditional distribution
p(λ0t| . . .) ∝ N(yt|0, λ0t)g0(λ0t) 1(λ 0
t∈ (λt+1, ∞)).
ii) The second case on the λ’s, i.e. when λ0t−1 = λt+1, requires the exploration of three
sub-cases on the z’s, i.e.: i) z0t= −1 and zt+1 = 1, b) zt0 = 0 and zt+1= 0, and iii) zt0 = 1
and zt+1 = −1. Let us explore them in detail assuming that ˆλ = λ0t−1 = λt+1.
a) The sub-case zt0 = −1 and zt+1 = 1 induces the following conditional distribution
for λ0t, p(λ0t| . . .) ∝ N(yt|0, λ0t) gµ(λ0t|λ 0 t−1)µk(λ0 t)Sµ(λ 0 t) S0(λ0t) 1(λ0t ∈ (0, ˆλ)).
b) The combination zt0 = 0 and zt+1 = 0 will induce the following degenerated distri-
bution
p(λ0t| . . .) ∝ δλˆ(λ0t).
c) The last sub-case corresponding to (ii) is associated with the combination z0t = 1 and zt+1 = −1, which will induce the following conditional distribution
p(λ0t| . . .) ∝ N(yt|0, λ0t)g0(λ0t) 1(λ 0
t ∈ (ˆλ, ∞)).
iii) As in case (i), the combination λ0t−1> λt+1 will have associated five different sub-cases
in terms of z’s. That is: a) zt0 = −1 and zt+1 = 1, b) zt0 = −1 and zt+1 = 0, c) zt0 = −1
and zt+1 = −1, d) z0t = 0 and zt+1 = −1, and e) zt0 = 1 and zt+1 = −1, which of them
a) The sub-case zt0 = −1 and zt+1 = 1 will give rise to a full conditional distribution for λ0t given by p(λ0t| . . .) ∝ N(yt|0, λ0t) gµ(λ0t|λ 0 t−1)µk(λ0 t)Sµ(λ 0 t) S0(λ0t) 1(λ0t∈ (0, λt+1)).
b) The combination zt0 = −1 and zt+1 = 0 will give rise to degenerated distribution,
given by
p(λ0t| . . .) ∝ δλt+1(λ0t).
c) The combination zt0 = −1 and zt+1= −1 will induce the following distribution
p(λ0t| . . .) ∝ N(yt|0, λ0t)gµ(λ0t) 1(λ 0
t ∈ (λt+1, λ0t−1)).
d) The combination zt0 = 0 and zt+1 = −1 gives rise to another degenerated distribution
p(λ0t| . . .) ∝ δλ0t−1(λ0t).
e) The final sub-case to be explored in (i) corresponds to the combination zt0 = 1 and zt+1= −1, which will induce the following conditional distribution
p(λ0t| . . .) ∝ N(yt|0, λ0t)g0(λ0t) 1(λ 0 t∈ (λ
0
t−1, ∞)).
Now, for the period t = T the full conditional distribution of λ0T is defined in terms the three cases induced by zT0 . That is: a) z0T = −1, b) zT0 = 0, and c) zT0 = 1. The full conditional for those cases are defined below.
a) For the case zT0 = −1, the full conditional distribution for λ0T becomes into,
p(λ0T| . . .) ∝ N(yT|0, λ0T)gµ(λ0T|λ 0 T −1) 1(λ 0 T ∈ (λ 0 T ∈ (0, λ 0 T −1)).
b) The case zT0 = 0 gives rise to a degenerated distribution for λ0T,
p(λ0T| . . .) ∝ δλ0T −1(λ0T).
c) Finally, the case z0T = 1 gives rise to the following full conditional distribution for λ0T,
p(λ0T| . . .) ∝ N(yT|0, λ0T)g0(λ0T) 1(λ 0 T ∈ (λ 0 T ∈ (λ 0 T −1, ∞)).
And, at period t = 1, the full conditional distribution for λ01 becomes
p(λ01| . . .) ∝ N(y1|0, λ01)g0(λ01) 1(λ 0
1 ∈ (0, ∞)).
Let us notice that none of the non-degenerated full conditional distributions above have a closed analytic form according to their support. Thus, drawing samples from them should require additional efforts. Among different alternatives, here we adopt the slice sampler method to sampling from these distributions (see, Neal, 2003, for a general introduction to the slice sampler methods).