BV4.1 {deseats} | R Documentation |
Trend and Seasonality Estimation Using the Berlin Procedure 4.1
Description
Economic data can be decomposed into a trend, a seasonal and a remainder component using the Berlin procedure 4.1 (German: Berliner Verfahren 4.1), as used by the National Statistical Office of Germany. Currently with this version of the R package, only the trend and seasonal components can be estimated following BV4.1. All further component estimations, for example the estimation of the calendar component, of the official procedure BV4.1 are not yet implemented. The function supports quarterly and monthly data.
Usage
BV4.1(yt, type = NULL)
Arguments
yt |
a time series object of class |
type |
a single character value that indicates, whether the data was
quarterly ( |
Details
The BV4.1 base model is as follows:
trend and seasonality are estimated based on the additive nonparametric regression model for an equidistant time series
y_t = m(x_t) + s(x_t) + \epsilon_t,
where y_t
is the observed time series with t=1,...n
, x_t = t / n
is the rescaled time
on the interval [0, 1]
, m(x_t)
is a smooth trend function,
s(x_t)
is a (slowly changing) seasonal component with
seasonal period p_s
and \epsilon_t
are stationary errors
with E(\epsilon_t) = 0
that are furthermore assumed to be independent
but identically distributed (i.i.d.).
It is assumed that m
and s
can be approximated locally by a
polynomial of
small order and by a trigonometric polynomial, respectively. Through locally
weighted regression, m
and s
can therefore be estimated
suitably.
The advantage of the Berlin Procedure 4.1 (BV4.1) is that it makes use of
fixed filters based on locally weighted regression (both with a weighted
mixture of local linear and local cubic components for the trend) at all
observation time points. Thus, BV4.1 results in fixed weighting matrices
both for the trend estimation step and for the seasonality estimation step
that can be immediately applied to all economic time series.
Those matrices are saved internally in the package and when applying
BV4.1
,
only weighted sums of the observations (with already obtained weights) have
to be obtained at all time points. Thus, this procedure is quite fast.
Permission to include the BV4.1 base model procedure was kindly provided by the Federal Statistical Office of Germany.
Value
An S4 object with the following elements is returned.
decomp
An object of class
"mts"
that consists of the decomposed time series data.frequency
the frequency of the time series.
ts_name
the object name of the initially provided time series object.
Author(s)
Dominik Schulz (Research Assistant) (Department of Economics, Paderborn University),
Author and Package Creator
References
Speth, H.-T. (2004). Komponentenzerlegung und Saisonbereinigung ökonomischer Zeitreihen mit dem Verfahren BV4.1. Methodenberichte 3. Statistisches Bundesamt. URL: https://www.destatis.de/DE/Methoden/Saisonbereinigung/BV41-methodenbericht-Heft3_2004.pdf?__blob=publicationFile.
Examples
Xt <- log(EXPENDITURES)
est <- BV4.1(Xt)
est