175 Dynamic Bayesian Models for Discrete-Valued Time Series
After the computations, the list variable result will hold an S3 object of class "inla",
from which summaries, plots, and posterior marginals can be obtained. We refer to the
package website http://www.r-inla.org for more information about model components
available to use inside the f() functions as well as more advanced arguments to be used
within the inla() function. In the next section, we show how R-INLA can be used to t
dynamic models. Ruiz-Cárdenas et al. (2011) provide more detailed examples.
8.5 Applications
8.5.1 Deep Brain Stimulation
A binary time series of infant sleep status was recorded in a T = 120 min electroencephalo-
graphic (EEG) sleep pattern study (Stoffer et al., 1998). Let y
t
be the indicator of REM sleep
cycle. Two time-varying covariates are considered: z
t1
, the number of body movements
during minute t;and, z
t2
, the number of body movements not due to sucking during
minute t. As in Czado and Song (2008), our main objective is to investigate whether or
not the probability of being in the REM sleep status is signicantly related to the two types
of body movements, z
t1
or z
t2
. Our analysis considers the probit link and the Student-t link
(shown here in the equations) and assumes that
y
t
Ber(π
t
) t = 1, ..., T, (8.22)
π
t
= T
ν
(β
0
+ β
1
z
t1
+ β
1
z
t2
+ x
t
), (8.23)
x
t
= δx
t1
+ τη
t
, (8.24)
where the innovations η
t
are assumed to be mutually independent and normally dis-
tributed with mean zero and unit variance and T
ν
is the d.f. of the t
ν
(0, 1) distribution.
Clearly x
t
represents a time-specic effect on the observed process. It follows from the one-
to-one relationship (8.23) that π
t
= P(y
t
= 1 | β, z
t
, x
t
) = T
ν
(β
0
+ β
1
z
t1
+ β
1
z
t2
+ x
t
), where
β = (β
0
, β
1
, β
2
)
, z
t
= (1, z
t1
, z
t2
)
. We also assume that | δ |< 1, that is, the latent state
process is stationary and x
0
N (0, κ), where κ = τ
2
/(1 δ
2
). The model is completed
with priors δ N
(1,1)
(0.95, 100), κ IG(0.01, 0.01),and β N
3
(β
0
,
0
), where β
0
= 0
and
0
= 1000I
3
, 0 indicates a 3 × 1 vector of zeros and I
3
the identity matrix of order 3.
For ν, we assume a noninformative prior as in Fonseca et al. (2008).
8.5.1.1 Computation Details
As in Abanto-Valle and Dey (2014), we adopt the so-called threshold approach (Albert and
Chib, 1993), where y
t
is created through dichotomization of a latent continuous process Z
t
,
given by the one-to-one correspondence
y
t
= 1 u
t
> 0, t = 1, ..., T. (8.25)
176 Handbook of Discrete-Valued Time Series
With the unobservable or latent threshold variable vector u
t
= (u
1
, ..., u
T
), equations (8.22)
and (8.23) can be rewritten as
1/2
u
t
= z
t
β + x
t
+ λ
t
t
, (8.26)
ν
ν
λ
t
G
, , (8.27)
2 2
where the innovations
t
are assumed to be mutually independent and normally dis-
tributed with mean zero and unit variance. A similar data augmentation scheme can be
used if the link function is logistic instead of probit (Polson et al., 2013). Equations (8.24)
and (8.26), conditioned on δ, the vector β, and the mixing variable λ
t
, jointly represent a lin-
ear state space model, so the algorithm of de Jong and Shephard (1995) is used to simulate
the states.
We t an SSM to the binary observations using probit and Student-t links. For each case,
we conducted MCMC simulation for 50,000 iterations. For both cases, the rst 10,000 draws
were discarded as a burn-in period. In order to reduce the autocorrelation between suc-
cessive values of the simulated chain, every 20th value of the chain was stored. Posterior
means and 95% credible intervals were calculated using the resulting 2000 values.
For SMC, we ran the adaptive random walk Metropolis for 300,000 iterations and dis-
carded the rst 100,000 while the particle lter was run with 100 particles only. Note that
there are some differences in the estimates, but not much on the persistence parameter φ.
The R-INLA commands required for the analysis are described in the Appendix.
8.5.1.2 Results
The results obtained with the different approximation schemes are summarized later in
this chapter. They show reasonable agreement between the different schemes for any given
model. Results for the Student-t link are not presented for the INLA analysis because this
option is not yet available in R-INLA.
The main results for the static parameters are summarized in Tables 8.1 and 8.2. In both
models, the posterior means of δ are around 0.93–0.95, showing higher persistence of the
autoregressive parameter for states variables and thus in the binary time series. The heav-
iness of the tails is measured by the shape parameter ν in the BSSM-T model. In Table 8.2,
the posterior mean of ν is around 10–15. This result seems to indicate that the measure-
ment errors of the u
t
threshold variables are better explained by heavy-tailed distributions,
as a consequence the t-links could be more convenient than the probit link. We found
empirically that the inuence of the number of body movements (z
1
) is marginal, since
the corresponding 95% credible intervals for β
1
contain the zero value. On the other hand,
the inuence of the number of body movements not due to sucking (x
2
) is detected to be
statistically signicant. The negative value of the posterior mean for β
2
shows that a higher
number of body movements not due to sucking will reduce the probability of the infant
being in REM sleep.
Figures 8.1 and 8.2 show the posterior smoothed means of the probabilities π
t
for both
links considered. They show substantial agreement between the different schemes for both
models. A more thorough comparison is also possible using t criteria such as BIC or DIC.
We found some differences between the ts from the different models, but in general the
results are in accordance with Czado and Song (2008). Such difference between the methods
177 Dynamic Bayesian Models for Discrete-Valued Time Series
TABLE 8.1
Probit link: Estimation results for the Infant Sleep data set
Probit Link
Parameter MCMC SMC INLA
β
0
0.2248 0.1043 0.0315
(1.4792, 0.8513) (3.0585, 3.8011) (2.5043, 2.6736)
β
1
0.2457 0.2532 0.2816
(0.1607, 0.8063) (0.1061, 0.6129) (0.1020, 0.6987)
β
2
0.5183 0.4421 0.5057
(1.2111, 0.0002) (0.9096, 0.0060) (1.0523, 0.0236)
δ 0.9321 0.9481 0.9334
(0.8029, 0.9913) (0.8609, 0.9966) (0.8283, 0.9891)
κ 8.0121 6.9412 7.2467
(0.7321, 38.6524) (0.6011, 33.6659) (0.9710, 31.9357)
Notes: First column, MCMC t; second column, SMC t; third column, INLA t. In
each case, we report the posterior mean and the 95% CI.
TABLE 8.2
Student-t link: Estimation results for the Infant Sleep data set
Student-t Link
Parameter MCMC SMC
β
0
0.3309 0.3949
(2.5026, 1.0777) (4.6229, 7.5911)
β
1
0.4155 0.8406
(0.2594, 1.6057) (0.0173, 3.0087)
β
2
0.7311 1.2148
(2.3480, 0.0042) (4.0387, 0.1178)
δ 0.9506 0.9564
(0.8029, 0.9913) (0.8693, 0.9973)
κ 18.0723 17.1308
(0.9921, 128.1231) (0.7771, 110.7981)
ν 10.8673 13.0285
(2.1299, 27.1029) (0.5189, 55.1458)
Notes: First column, MCMC t; second column, SMC t. In each case, we report the
posterior mean and the 95% CI.
are expected and are mostly within the corresponding Monte Carlo errors associated with
the sampling procedures. Error evaluation for the INLA is yet to be derived.
8.5.2 Poliomyelitis in the U.S.
In this section, we consider a time series of monthly counts of cases of poliomyelitis in the
United States between January 1970 and December 1983 (Zeger, 1988). The observations
are displayed in Figure 8.3. This dataset has been frequently analyzed in the literature,
178 Handbook of Discrete-Valued Time Series
0.0
0 20 40 60 80 100 120
0.2
0.4
0.6
0.8
1.0
MCMC
SMC
INLA
π
t
t
FIGURE 8.1
Probit link: Posterior smoothed mean of π
t
applied to the infant sleep status data set.
MCMC
SMC
0.0
0.2
0.4
0.6
0.8
1.0
π
t
0 20 40 60 80 100 120
t
FIGURE 8.2
Student-t link: Posterior smoothed mean of π
t
applied to the infant sleep status data set.
179 Dynamic Bayesian Models for Discrete-Valued Time Series
MCMC
SMC
INLA
λ
t
10
15
5
0
1970 1972 1974 1976 1978 1980 1982 1984
Year
FIGURE 8.3
Polio counts (points) in the United States, January 1970–December 1983, and posterior smoothed mean sequence,
λ
t
, of the tted seasonal Poisson SSM without overdispersion.
for example, by Chan and Ledolter (1995), Le Strat and Carrat (1999), and Davis and
Rodriguez-Yam (2005). We concentrate below on the estimation of the mean response and
the hyperparameters.
We adopt the loglinear seasonal Poisson SSM dened by
y
t
Po(λ
t
)
ln λ
t
= μ
t
+ s
t
+ γ
t
μ
t
= μ
t1
+ ω
1t
s
t
=−(s
t1
+ ...+ s
tp+1
) + ω
2t
γ
t
N (0, W
3
),
where ω
it
N (0, W
i
) independent for i = 1, 2 and p = 12 is the seasonal period.
We t the seasonal Poisson SSM without and with overdispersion. First we take W
3
= 0
which means γ
t
= 0 for all t. Then, we take γ
t
as described above such that the model can
handle with overdispersion. We set the prior distributions as W
i
1
Gamma (0.01, 0.01)
for i = 1, 2, 3, x
0
N (0, 10, 000) and s
j
N (0, 10, 000) for j =−10, ...,0.
..................Content has been hidden....................

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