/chainSTAT

Primary LanguageRGNU General Public License v3.0GPL-3.0

chainSTAT

chainSTAT is a small package that includes the functions needed to run the seasonal adjustment code for national accounts by Statistics Austria. The main objective are the chainlinking functions (using annual overlap). The functions are designed for the use in QNA but may be useful in other contexts as well.

Installation

You can install the development version from GitHub with:

# install.packages("devtools")
devtools::install_github("statistikat/chainSTAT")

Example

This example shows how to use the chainlinkAO function. For demonstration we first generate a time series that represents the current price series and deflate it to mimic the corresponding pyp series.

library(chainSTAT)
#> Warning: package 'chainSTAT' was built under R version 4.0.3
# generating a cup and a pyp series
cup <- stats::ts(cumsum(c(100,stats::rnorm(99, mean = 1))), start = 1995, frequency = 4)
pyp <- cup / stats::rnorm(100, mean = 1.02, sd = 0.01)

# deriving volume series
vol <- chainlinkAO(cup,pyp)