253 Bayesian Modeling of Time Series of Counts with Business Applications
2. Using the generated ω
(j)
, sample θ
(j)
from (θ
t
|ω
(j)
, D
t
).
t
3. Using the generated ω
(j)
, for each n =t − 1, ..., 1 generate θ
n
(j)
from
θ
n
|θ
n
(j
+
)
1
, ω
(j)
, D
n
where θ
n
(j
+
)
1
is the value generated in the previous step.
If we repeat this a large number of times, we can obtain samples from the full condi-
tional of the latent rates. Consequently, we can obtain samples from the joint density of
the model parameters by iteratively sampling from the full conditionals, p(ω|θ
1
, ..., θ
t
, D
t
)
and p(θ
1
, ..., θ
t
|ω, D
t
), via the Gibbs sampler. Once we have the posterior samples from
p(θ
1
, ..., θ
t
, ω|D
t
) we can also obtain the posterior samples of λ
t
s in a straightforward
z
t
manner using the identity λ
t
= θ
t
e
ψ
.
11.4 Multivariate Extension
It is possible to consider several extensions of the basic model to analyze multivariate count
time series. For instance, the observations of interest can be the number of occurrences of
an event during day t of year j. Another possibility is to consider the analysis of J different
Poisson time series. For instance, for a given year, the weekly spending habits of J different
households which can exhibit dependence can be modeled using such a structure. Several
extensions have been proposed by Aktekin and Soyer (2011), where multiplicative Pois-
son rates for (11.3) are considered. An alternate approach for modeling multivariate time
series of counts is described by Ravishanker, Venkatesan, and Hu (2015; Chapter 20 in this
volume).
In what follows, we present a model for J Poisson time series that are assumed to be
affected by the same environment. We assume that
Y
jt
∼ Pois λ
jt
,forj = 1, ..., J, (11.31)
where λ
jt
= λ
j
θ
t
, λ
j
is the arrival rate specic to the jth series and θ
t
is the common term
modulating λ
j
. For example, in the case where Y
jt
is the number of grocery store trips of
household j at time t, λ
j
is the household-specic rate and we can think of θ
t
as the effect of
a common economic environment that the households are exposed to at time t. The values
of θ
t
> 1 represent a more favorable economic environment than usual, implying higher
shopping rates.
This is analogous to the concept of an accelerated environment for operating conditions
of components used by Lindley and Singpurwalla (1986) in life testing. Our case can be
considered as a dynamic version of their setup since we have the Markovian evolution
of θ
t
s as
θ
t
=
θ
t−1
t
, (11.32)
γ
where, as earlier,
t
|D
t−1
, λ
1
, ..., λ
J
∼ Beta [γα
t−1
, (1 − γ)α
t−1
] with α
t−1
> 0, 0 < γ < 1,
and D
t−1
={D
t−2
, Y
1(t−1)
, ..., Y
J(t−1)
}. Furthermore, we assume that
λ
j
∼ Gamma a
j
, b
j
,forj = 1, ..., J, (11.33)