Social media as a data source for official statistics; the Dutch Consumer Confidence Index
Section 3. Structural time
series modelling of the CCI and the SMI
In this section,
univariate and bivariate structural time series models for the CCI and SMI are
developed. With a structural time series model, a series is decomposed in a
trend component, seasonal component, other cyclic components, regression
component and an irregular component. For each component a stochastic model is
assumed. This allows the trend, seasonal, and cyclic component but also the
regression coefficients to be time dependent. If necessary autoregressive-moving-average
(ARMA) components can be added to capture the autocorrelation in the series
beyond these structural components. See Harvey (1989) or Durbin and Koopman
(2012) for details about structural time series modelling.
The
question addressed in this paper is to which extent the SMI follows a similar
pattern as the CCI such that the SMI can be used in the estimation procedure of
the CCI or, in the most extreme case, even can replace the CCI. This question
is addressed by developing a bivariate structural time series model for the CCI
and the SMI and modeling the correlation between the disturbance terms of the
different components of the structural time series model for both series. The
concept of cointegration is used to investigate to which extent the unobserved
components of both series are driven by common factors. If e.g., the trends of both series are driven by one underlying common trend an argument
can be made that the SMI represents similar evolution of sentiment feelings
compared to the CCI. Alternatively, the SMI can be used as an auxiliary series
in a model based estimation procedure for the CCI or in a nowcasting procedure
to obtain more precise real time estimates.
3.1 Univariate model
CCI series
As a first step, a
univariate time series model for the CCI series is proposed. With the
design-based approach described in Section 2.1, the sample information
observed in each separate month is used to obtain an estimate for the CCI in
that month. A drawback of this approach is that information observed in
preceding periods is not used to obtain more accurate estimates for the CCI. In
survey methodology, time series models are frequently applied to develop
estimates for periodic surveys. Blight and Scott (1973) and Scott and Smith
(1974) proposed to regard the unknown population parameters as a realization of
a stochastic process that can be described with a time series model. This
introduces relationships between the estimated population parameters at
different time points in the case of non-overlapping as well as overlapping
samples. The explicit modelling of this relationship between these survey
estimates with a time series model can be used to combine sample information
observed in the past to improve the precision of estimates obtained with
periodic surveys. Some key references to authors that applied the time series
approach to repeated survey data to improve the efficiency of survey estimates
are Scott, Smith and
Jones (1977), Tam (1987), Binder
and Dick (1989, 1990), Bell and Hillmer (1990), Tiller (1992), Rao and Yu
(1994), Pfeffermann and Burck (1990), Pfeffermann (1991), Pfeffermann and Rubin-Bleuer
(1993), Pfeffermann, Feder and Signorelli (1998), Pfeffermann and Tiller (2006), Harvey
and Chung (2000), Feder (2001), Lind (2005) and van den Brakel and
Krieg (2009, 2015).
Developing a time
series model for survey estimates observed with a periodic survey starts with a
model, which states that the survey estimate can be decomposed in the value of
the population variable and a sampling error:
where
denote
the real CCI in month
under a
complete enumeration of the target population and
the
sampling error.
The CCI is observed at a monthly frequency.
Therefore, as a first step, the series of the finite population parameter can
be decomposed in a stochastic trend, seasonal component to model systematic
deviations from the trend within a year, and a white noise component for the
remaining unexplained variation. These considerations lead to the following
model for the series of the finite population parameter:
where
denotes
a stochastic trend,
a
stochastic seasonal component and
the
unexplained variation of the finite population parameter. Inserting (3.2) into
measurement model (3.1) gives
In a cross-sectional survey it
is difficult to separate the sampling error from the white noise of the
population parameter. Therefore, both components are combined in one
disturbance term
It is assumed that
and
To allow
for nonhomogeneous variance in the sampling errors, Binder and Dick (1990)
proposed a measurement error where the disturbance terms
are
proportional to the standard errors of
i.e.,
with
and
where
is
defined by (2.3) and is used as a priori information in the time series
model. Such a model would be useful if the sampling error dominates the white
noise in the population parameter. Initial analyses indicate that in this
application the variance of the population white noise is substantial,
invalidating (3.5) for this application. In addition, the variance of the
sampling error in this application is constant over time. Therefore, it is
decided to combine the sampling error with the population white noise and
assume a constant variance over time. The question how to account for sampling
variance is also an issue in seasonal adjustment variances (Pfeffermann and
Sverchkov, 2014). Bell (2005) studied the contribution of the sampling variance
in the variance of the estimation error of seasonally adjusted series and in
the nonseasonal component. In the case of (rotating) panels, the sampling error
can be separated from the population white noise. In cross-sectional repeated
surveys, it is difficult to identify the separate components and therefore both
terms are combined in one disturbance term that captures both the sampling
variance and the unexplained variation of the population parameter.
An extensive model selection showed that a
smooth trend model is the most appropriate model to capture the trend and the
economic cycle in the CCI series. The smooth trend model is defined as (Durbin
and Koopman, 2012):
Adding a random
component for the level in (3.6) improves the log-likelihood with five units
but results in an overfit of the data in a sense that the smoothed signal
almost exactly follows the observed series with a very small measurement error
variance. A local level model (random level without a slope) improves the
log-likelihood with three units but also intends to overfit the data.
The seasonal component
is modelled with a trigonometric model, which is defined as (Durbin and
Koopman, 2012):
with
Here
denotes the frequency of the different cycles
in radians and is defined as
For the
disturbance terms, it is assumed that
For
reasons of parsimony, the same variance structure is assumed with the same
hyperparameter for
Furthermore, it is assumed that
and
are uncorrelated.
After
including the stochastic trend component (3.6) and seasonal component (3.7), no
additional cycle components are required. The model selection procedure indicated that two level interventions are
needed to model sudden jumps in the series. The first one is due to the financial
crisis in September 2008, and the second one is due to the economic downturn in
September of 2011. Finally, an outlier is required for September 2007. Adding
these three components increases the log-likelihood with 15 units. These
considerations lead to the following model for the observed CCI series
with
and
the
corresponding regression coefficients.
Finally, autoregressive
(AR) and moving average (MA) components can be added to the structural time
series model (3.8). In this application, there were no indications that such components are required, since there are no clear signs of
remaining serial correlation in the standardized innovations. Adding an AR(1)
or an MA(1) to (3.8) increases the log-likelihood with 5 and 4.5 units
respectively. Adding second-order AR or MA models does not further improve the
log-likelihood. Adding an ARMA(1,1) also does not further increases the
log-likelihood. An AR(1) or MA(1) slightly improves the correlogram but also increases
the standard error of the filtered smoothed signals. Therefore, model (3.8) was
finally selected for the CCI series.
State
space models assume that the disturbance terms are normally and independently
distributed. These assumptions translate into the assumption that the
innovations are normally and independently distributed. Table A.1 in the
appendix contains an overview of goodness of fit statistics applied to the
standardized innovations. The values for skewness, kurtosis and the
Bowman-Shenton test do not indicate deviations from normality of the
standardized innovations. The values for the Ljung-Box test and Durban-Watson
test do not indicate serial correlations in the standardized innovations. This
is also confirmed by a correlogram (not shown). In conclusion, these
diagnostics indicate that (3.8) fits the series of the CCI reasonably well.
3.2 Bivariate model
CCI and SMI series
The next step is
to combine the univariate model for the CCI with the series for the SMI. Before
combining CCI and SMI in a bivariate model, a univariate model for the SMI is
developed with the purpose to better understand the behaviour of this series. A
model selection procedure, similar to the one conducted for the CCI series in
Subsection 3.1, indicated that the observed series for the SMI can be
modelled with a smooth trend model and a white noise component for the
unexplained variation. No significant seasonal component or business cycle is
established. There are no signs for outliers or level shifts. AR(1) and MA(1)
components are not included since there is no serial correlation in the
standardized innovations. These considerations led to a bivariate model for the
CCI and SMI where the CCI contains a trend and a seasonal component and the SMI
a trend component.
Tables A.2
and A.3 in the appendix contain an overview of goodness of fit statistics for
the standardized innovations of the CCI and SMI respectively. There are no
indications that the standardized innovations of both series deviate from a
normal distributions. The null hypothesis of no serial correlation in the
standardized innovations could not be rejected. The correlogram of the
innovations for the SMI, however, show a non-significant seasonal pattern (not
shown). The innovations of the SMI, also contain heteroscedasticity.
The disturbance
terms of the trend of both series are correlated. Since the series for the SMI
is available from June 2010, the model for the CCI also contains the last
intervention for September 2011, but not the outlier in September 2007 and the
intervention in September 2008. As a result the following bivariate model is
obtained:
with
and
the
smooth trend model as defined in (3.6) with covariance structure
In the last
expression
denotes the correlation between the slope
disturbances of the CCI and SMI.
Furthermore,
is the
seasonal effect defined by (3.7) and
the
intervention for September 2011 with
the
corresponding regression coefficient. Finally,
and
are the
disturbance terms for the CCI and SMI series and are defined as:
If the model
detects a strong correlation between the trends of the CCI and the SMI, then
the trends of both series will develop into the same direction more or less
simultaneously. In this case, the additional information from the SMI series
will result in an increased precision of the estimates of the CCI figures. In
the case of strong correlation between the disturbances of the trends, i.e., if
the
trends are said to be cointegrated. In that case, there is one underlying
common trend that drives the evolution of the trends of the two observed
series. To see this, it is noted that the covariance matrix of the slope
disturbances is implemented as a singular value decomposition:
Instead of
estimating
and
parameters
and
are
estimated. If
it
follows that
In that case, the covariance matrix of the
slope disturbances is of reduced rank and both trends are driven by one common
trend. This implies that the slope
disturbances of both series simultaneously move up or down and that the slope
disturbances of the SMI can be perfectly predicted from slope disturbances of
the CCI by
Furthermore, the slope for the SMI series can
be expressed as a linear combination of the slope for the CCI series as
Similarly, the trend for the SMI series can be
expressed as a linear combination of the trend for the CCI series as
Note
that
and
are
constants that are derived from the estimated states at the last two time
periods of the series.
Cointegration
increases the precision of the estimated trend and signal of the CCI series,
allows for formulating more parsimonious models, but could also be seen as an
argument to replace the CCI series by the SMI series since both series are
driven by and represent the same common trend. For a more detailed discussion
about cointegration in the context of state space modelling, see Koopman,
Harvey, Shephard and Doornik (2009, Sections 6.4 and 9.1).
3.3 Estimation of
structural time series models
The general way to analyse a structural time
series model is to express it in the so-called state space representation and
apply the Kalman filter to obtain optimal estimates for the state variables,
see e.g., Durbin and Koopman (2012). The software for the analysis and
estimation of the time series models is developed in Ox in combination with the
subroutines of SsfPack 3.0, see Doornik (2009) and Koopman, Shephard and
Doornik (2008).
All state variables are non-stationary and
initialised with a diffuse prior, i.e., the expectation of the initial states
are equal to zero and the initial covariance matrix of the states is diagonal
with large diagonal elements. In Ssfpack 3.0, an exact diffuse log-likelihood
function is obtained with the procedure proposed by Koopman (1997). Maximum
likelihood (ML) estimates for the hyperparameters, i.e., the variance
components of the stochastic processes for the state variables are obtained
using a numerical optimization procedure (Broyden-Fletcher-Goldfarb-Shanno (BFGS)
algorithm, Doornik, 2009). To avoid negative variance estimates, the
log-transformed variances are estimated. More technical details about the
analysis of state space models can be found in Harvey (1989) or Durbin and
Koopman (2012).
Under the assumption of normally distributed
disturbance terms, the Kalman filter can be applied to obtain optimal estimates
for the state variables, see e.g., Durbin and Koopman (2012). The Kalman filter
assumes that the variance and covariance terms are known in advance and are
often referred to as hyperparameters. In practise, these hyperparameters are
not known and are therefore substituted with their ML estimates. Estimates for
state variables for period
based on
the information available up to and including period
are
referred to as the filtered estimates.
They are obtained with the Kalman filter where the ML estimates for the
hyperparameters are based on the complete time series. The filtered estimates
of past state vectors can be updated, if new data become available. This
procedure is referred to as smoothing and results in smoothed estimates that are based on the complete time series.
Standard errors of the Kalman filter estimates
do not reflect the additional uncertainty of using the ML estimates for the
unknown hyperparameters. Therefore, the estimates of the standard errors are
too optimistic.