Two-Steps Benchmarks for Time Series Disaggregation

The twoStepsBenchmark() and threeRuleSmooth() functions allow you to disaggregate a low-frequency time series with higher frequency time series, using the French National Accounts methodology. The aggregated sum of the resulting time series is strictly equal to the low-frequency time series within the benchmarking window. Typically, the low-frequency time series is an annual one, unknown for the last year, and the high frequency one is either quarterly or monthly. See "Methodology of quarterly national accounts", Insee Méthodes N°126, by Insee (2012, ISBN:978-2-11-068613-8, < https://www.insee.fr/en/information/2579410>).


CRANstatus R buildstatus codecov Downloads

Overview

The R package disaggR is an implementation of the French Quarterly National Accounts method for temporal disaggregation of time series. twoStepsBenchmark() and threeRuleSmooth() bend a time series with another one of a lower frequency.

Installation

You can install the stable version from CRAN.

install.packages("disaggR")

You can install the development version from Github.

# install.packages("devtools")
install_github("InseeFr/disaggR")

Usage

library(disaggR)

benchmark <- twoStepsBenchmark(hfserie = turnover,
                               lfserie = construction,
                               include.differenciation = TRUE)
as.ts(benchmark)
coef(benchmark)
summary(benchmark)
plot(benchmark)
plot(in_sample(benchmark))

plot(in_disaggr(benchmark,type="changes"),
     start=c(2015,1),end=c(2020,12))
plot(in_disaggr(benchmark,type="contributions"),
     start=c(2015,1),end=c(2020,12))

plot(in_scatter(benchmark))

new_benchmark <- twoStepsBenchmark(hfserie = turnover,
                                   lfserie = construction,
                                   include.differenciation = FALSE)
plot(in_revisions(new_benchmark,
                  benchmark),start = c(2010,1))

Shiny app

You can also use the shiny application reView, to easily chose the best parameters for your benchmark.

reView(benchmark)
shinyscreen

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("disaggR")

1.0.5.4 by Pauline Meinzel, a year ago


https://inseefr.github.io/disaggR/


Report a bug at https://github.com/InseeFr/disaggR/issues


Browse source code at https://github.com/cran/disaggR


Authors: Arnaud Feldmann [aut] , Author and maintener of the package until the version 1.0.1) , Pauline Meinzel [cre] , Thomas Laurent [ctb] (Maintener of the package from 1.0.2 to 1.0.5.2) , Franck Arnaud [ctb] (barplot base graphics method for the mts class) , Institut national de la statistique et des études économiques [cph] (https://www.insee.fr/)


Documentation:   PDF Manual  


MIT + file LICENSE license


Imports graphics, grDevices, methods, RColorBrewer, stats, utils

Suggests knitr, ggplot2, rmarkdown, shiny, shinytest2, testthat, vdiffr


See at CRAN