Learn R Programming

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)

Copy Link

Version

Install

install.packages('disaggR')

Monthly Downloads

237

Version

1.0.5.4

License

MIT + file LICENSE

Maintainer

Pauline Meinzel

Last Published

November 4th, 2025

Functions in disaggR (1.0.5.4)

twoStepsBenchmark

Regress and bends a time series with a lower frequency one
se

Extracting the standard error
rePort

Producing a report
in_sample

Producing the in sample predictions of a prais-lm regression
smoothed.part

Extracting the smoothed part of a twoStepsBenchmark
prais

Extracting the regression of a twoStepsBenchmark
reUseBenchmark

Using an estimated benchmark model on another time series
reView

A shiny app to reView and modify twoStepsBenchmarks
rho

Extracting the autocorrelation parameter
in_scatter

Comparing the inputs of a praislm regression
model.list

Extracting all the arguments submitted to generate an object
residuals_extrap

Extrapolation function for the residuals in a twoStepsBenchmark
turnover

Turnover indicator in construction
turnover_catering

Turnover indicator in accommodation and food services
default_theme_ggplot

Default ggplot theme
bflSmooth

Smooth a time series
plot.twoStepsBenchmark

Plotting disaggR objects
in_disaggr

Comparing a disaggregation with the high-frequency input
in_revisions

Comparing two disaggregations together
default_lty_pal

Default linetype palette
default_col_pal

Default color palette
consumption_catering

Total consumption in accommodation and food services at current prices
disaggR-package

Two-Steps Benchmarks for Time Series Disaggregation
outliers

Extracting the standard error
default_margins

Default margins
hfserie_extrap

Extrapolation function for the hfserie in a threeRuleSmooth
bflSmooth_matrices_factory

Generating a clone for bflSmooth_matrices_impl
disaggR-class

Virtual Class "disaggR" Class of disaggregations
construction

Total GFCF in construction at current prices
smoothed.rate

Extracting the rate of a threeRuleSmooth
distance

Distance computation for disaggregations
threeRuleSmooth

Bends a time series with a lower frequency one by smoothing their rate
extend_tsp

Extend tsp with lf