11
Bayesian Modeling of Time Series of Counts with
Business Applications
Rek Soyer, Tevk Aktekin, and Bumsoo Kim
CONTENTS
11.1 Introduction...................................................................................245
11.2 ADiscrete-Time Poisson Model............................................................246
11.2.1 Special Case: Model with No Covariates and Its Properties...................249
11.3 Markov Chain Monte Carlo (MCMC)Estimation of the Model.......................251
11.4 Multivariate Extension.......................................................................253
11.5 BusinessApplications........................................................................255
11.5.1 Example 11.1: Call Center Arrival Count Time Series Data. ...................255
11.5.2 Example 11.2: Mortgage Default Count Time Series Data......................257
11.5.3 Example 11.3: Household Spending Count Time Series Data.. ................258
11.6 Conclusion.....................................................................................263
References............................................................................................263
11.1 Introduction
Discrete-valued temporal data, and specically count time series, often arise in numerous
application areas including business, economics, engineering, and epidemiology, among
others. For instance, observations under study can be the number of arrivals to a bank in
a given hour, number of shopping trips of households in a week, number of mortgages
defaulted from a particular pool in a given month, number of accidents in a given time
interval, or the number of deaths from a specic disease in a given year.
Studies in time series with focus on count data are scarce in comparison to those with
continuous data, and of these, many studies consider a Poisson model. A regression model
of time series of counts has been introduced by Zeger (1988) where a quasi-likelihood
method is used in order to estimate model parameters. Harvey and Fernandes (1989)
assume a gamma process on the stochastic evolution of the latent Poisson mean and pro-
pose extensions to other count data models such as the binomial, the multinomial, and
negative binomial distributions. Davis et al. (2000) develop a method to diagnose the
latent factor embedded in the mean of a Poisson regression model and present asymptotic
properties of model estimators. Davis et al. (2003) discuss maximum likelihood estima-
tion for a general class of observation-driven models for count data, also referred to as
generalized autoregressive moving average models, and develop relevant theoretical prop-
erties. Freeland and McCabe (2004) introduce new methods for assessing the t of the
245
246 Handbook of Discrete-Valued Time Series
Poisson autoregressive model via the information matrix equality, provide properties of
the maximum likelihood estimators, and discuss further implications in residual analysis.
The Bayesian point of view has also been considered in the time series analysis of count
data. Chib et al. (1998) introduce Markov Chain Monte Carlo (MCMC) methods to estimate
Poisson panel data models with multiple random effects and use various Bayes factor esti-
mators to assess model t. Chib and Winkelmann (2001) propose a model that can take
into account correlated count data via latent effects and show how the estimation method
is practical even with high-dimensional count data. Bayesian state-space modeling of
Poisson count data is considered by Frühwirth-Schnatter and Wagner (2006) where MCMC
via data augmentation techniques to estimate model parameters is used. Furthermore,
Durbin and Koopman (2000) discuss the state-space analysis of non-Gaussian time series
models from both the classical and Bayesian perspectives, apply an importance sampling
technique for estimation, and illustrate an example with count data. More recently, Santos
et al. (2013) consider a non-Gaussian family of state-space models, obtain exact marginal
likelihoods, and consider the Poisson model as a special case. Gamerman et al. (2015;
Chapter 8 in this volume), have provided an excellent overview of state-space modeling
for count time series.
In this chapter, we describe a general class of Poisson time series models from a
Bayesian state-space modeling perspective and propose different strategies for modeling
the stochastic Poisson rate which evolves over time. Such models are also referred to as
parameter-driven time series models as described by Cox (1981) and Davis et al. (2003).
The state-space approach allows the modeling of various subcomponents to form an over-
all time series model as pointed out by Durbin and Koopman (2000). We also present an
extension of our framework to multivariate counts where dependence between the indi-
vidual counts is motivated by a common environment. Specically, we obtain multivariate
negative binomial models and develop Bayesian inference using appropriate MCMC esti-
mation techniques such as the Gibbs sampler, the Metropolis–Hastings algorithm, and the
forward ltering backward sampling (FFBS) algorithm. For a good introduction to MCMC,
see Gamerman and Lopes (2006), Gilks et al. (1996), Smith and Gelman (1992), and Chib
and Greenberg (1995), and for FFBS, see Fruhwirth-Schnatter (1994).
An outline of this chapter is as follows. In Section 11.2, we introduce a Bayesian state-
space model for count time series data and show how the parameters can be updated
sequentially and forecasting can be performed. We consider a special case excluding covari-
ates where a fully analytically tractable model is presented. In Section 11.3, we introduce
MCMC methods to estimate the model parameters. This is followed by Section 11.4 that is
dedicated to multivariate extensions of the model. The proposed approach and its exten-
sions are illustrated by three examples from nance, operations, and marketing in Section
11.5. Section 11.6 concludes with some remarks.
11.2 A Discrete-Time Poisson Model
We introduce a Poisson time series model whose stochastic rate evolves over time according
to a discrete-time Markov process and covariates. We refer to this model as the basic model.
Our model is based on the framework proposed by Smith and Miller (1986) where the
likelihood was exponential. Let Y
t
be the number of occurrences of an event in a given
time interval of length t and let λ
t
be the corresponding rate during the same time period.
247 Bayesian Modeling of Time Series of Counts with Business Applications
Given the rate λ
t
, we assume that the number of occurrences of an event during period (0, t)
(referred to as t for the rest of the chapter) is described by a discrete-time nonhomogeneous
Poisson process with probability distribution
λ
t
Y
t
e
λ
t
p(Y
t
|λ
t
) =
Y
t
!
. (11.1)
It is assumed that the Y
t
s are conditionally independent given the λ
t
s so that the inde-
pendent increments property holds only conditional on λ
t
, whereas unconditionally, the
Y
t
s are correlated. Equation (11.1) is the measurement equation of a discrete-time Pois-
son state-space model. It is possible to model the effect of time and of covariates using a
multiplicative form for λ
t
as
λ
t
= θ
t
e
ψz
t
, (11.2)
where z
t
is a vector of covariates and ψ is the corresponding parameter vector. Here, θ
t
acts like a latent baseline rate that evolves over time but is free of covariate effects.
For the time evolution of the latent rate process, {θ
t
}, weassume thefollowing
Markovian structure:
θ
t
=
θ
t1
t
, (11.3)
γ
where
t
|D
t1
, ψ, γ
Beta[γα
t1
, (1 γ)α
t1
] with α
t1
> 0, 0 < γ < 1, and D
t1
=
{Y
1
, z
1
, ..., Y
t1
, z
t1
}.In(11.3), γ acts like a discounting factor and its logarithm can be
considered to be the rst-order autoregressive coefcient for the latent rates, θ
t
. It follows
from (11.3) that there is an implied stochastic ordering between two consecutive rates, i.e.,
θ
t1
. It is also straightforward to show that the conditional distributions of consecutive
θ
t
<
γ
rates are all scaled Beta densities,
θ
t
|θ
t1
, D
t1
, ψ, γ
Beta [γα
t1
, (1 γ)α
t1
; (0, θ
t1
/γ)],
and are given by
(α
t1
)
γ
α
t1
1
γα
t1
1
t
p(θ
t
|θ
t1
, D
t1
, ψ, γ) =
(
γα
t1
)
(
{1 γ}α
t1
)
θ
t1
θ
θ
t1
(1γ)α
t1
1
×
θ
t
. (11.4)
γ
The state equation (11.3) also implies that E(θ
t
|θ
t1
, D
t1
, ψ, γ) = θ
t1
, that is, a random
walk type of evolution in the expected Poisson rates.
Given these measurement and state equations, it is possible to develop a conditionally
analytically tractable sequential updating of the model if we assume that at time 0, (θ
0
|D
0
)
is a gamma distribution, that is,
θ
0
|D
0
Gamma
α
0
, β
0
, (11.5)
248 Handbook of Discrete-Valued Time Series
where θ
0
is assumed to be independent of the covariate parameter vector ψ at time 0. Given
the inductive hypothesis
θ
t1
|D
t1
, ψ, γ
Gamma
α
t1
, β
t1
, (11.6)
a recursive updating scheme can be developed as follows. Using (11.4) and (11.6), we can
obtain the distribution of θ
t
given D
t1
as
θ
t
|D
t1
, ψ, γ
Gamma
γα
t1
, γβ
t1
. (11.7)
It follows that E(θ
t
|D
t1
, ψ, γ) = E(θ
t1
|D
t1
, ψ, γ) and Var(θ
t
|D
t1
, ψ, γ) = Var(θ
t1
|
D
t1
, ψ, γ)/γ. In other words, as we move forward in time, our uncertainty about the rate
increases as a function of γ. Given the prior (11.6) and the Poisson observation model (11.1),
we obtain the ltering distribution of (θ
t
|D
t
, ψ, γ) using Bayes’ rule as
p
θ
t
|D
t
, ψ, γ
p(Y
t
|λ
t
)p
θ
t
|D
t1
, ψ, γ
, (11.8)
which implies that
p
θ
t
|D
t
, ψ, γ
θ
t
e
ψ
z
t
γα
t1
+Y
t
1
e
(γβ
t1
+1)θ
t
e
ψ
z
t
.
The ltering distribution of the latent rate at time t is a gamma density
θ
t
|D
t
, ψ, γ
Gamma(α
t
, β
t
), (11.9)
where the model parameters are recursively updated by α
t
= γα
t1
+ Y
t
and β
t
= γβ
t1
+
e
ψ
z
t
. This updating scheme implies that as we learn more about the count process over
time, we update our uncertainty about the Poisson rate as a function of both counts over
time and of covariate effects via β
t
. In addition, the conditional one-step-ahead forecast or
predictive distribution of counts at time t given D
t1
can be obtained via
p
Y
t
|D
t1
, ψ, γ = p(Y
t
|λ
t
)p
θ
t
|D
t1
, ψ, γ
dθ
t
, (11.10)
0
where (Y
t
|λ
t
) Poisson(λ
t
) and (θ
t
|D
t1
, ψ, γ) Gamma(γα
t1
, γβ
t1
). Therefore,
p
Y
t
|D
t1
, ψ, γ
=
γα
t1
+ Y
t
1

1
1
γα
t1
1
Y
t
,
z
t
z
t
Y
t
γβ
t1
+ e
ψ
γβ
t1
+ e
ψ
(11.11)
which is a negative binomial model denoted as
Y
t
|D
t1
, ψ, γ
Negbin(r
t
, p
t
), (11.12)
249 Bayesian Modeling of Time Series of Counts with Business Applications
z
t
where r
t
= γα
t1
and p
t
= γβ
t1
/γβ
t1
+ e
ψ
. Given (11.12), one can carry out
one-step-ahead predictions and compute prediction intervals in a straightforward manner.
The conditional mean of (Y
t
|D
t1
, ψ, γ) can be computed via
E
Y
t
|D
t1
, ψ, γ
=
α
t1
e
ψ
z
t
, (11.13)
β
t1
which implies that given the covariates and the counts up to time t1, the forecast for time
t is a function of the observed default counts up to time t 1 adjusted by the corresponding
covariates.
11.2.1 Special Case: Model with No Covariates and Its Properties
Here, we consider a simple but analytically fully tractable version of the basic model pre-
sented earlier. We assume that the arrival rate in the Poisson model is not inuenced by
covariates. In other words, we dene λ
t
= θ
t
in (11.2). In doing so, we can provide analyt-
ical results for updating and forecasting conditional on γ by simply replacing e
ψ
z
t
with 1
and θ
t
by λ
t
in the previous section.
As earlier, let Y
t
as the number of occurrences of an event in a given time interval t;we
have the same time evolution of the Poisson rate, λ
t
, as earlier given by (11.3):
λ
t
=
λ
t1
t
, (11.14)
γ
where
t
|D
t1
, γ
Beta[γα
t1
, (1 γ)α
t1
] with α
t1
> 0, 0 < γ < 1, and D
t1
=
{Y
1
, ..., Y
t1
}.
Using the same prior at time 0, for (λ
0
|D
0
) as
λ
0
|D
0
Gamma(α
0
, β
0
), (11.15)
we can develop an analytically tractable sequential updating of Poisson rates over time.
It can be shown that
λ
t
|D
t1
, γ
Gamma(γα
t1
, γβ
t1
), (11.16)
and the ltering distribution of the Poisson rate at time t is a gamma density
λ
t
|D
t
, γ
Gamma(α
t
, β
t
), (11.17)
where the model parameters are recursively updated by α
t
= γα
t1
+Y
t
and β
t
= γβ
t1
+1.
The one-step-ahead forecast distribution of counts at time t given D
t1
, γ is again given
by a negative binomial model as
Y
t
|D
t1
, γ
Negbin(r
t
, p
t
), (11.18)
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset