An open API service indexing awesome lists of open source software.

https://github.com/inseefr/disaggr

Two-Steps Benchmarks for Time Series Disaggregation (French Quarterly National Accounts methodology)
https://github.com/inseefr/disaggr

cran disaggregation r statistical-package time-series

Last synced: 8 months ago
JSON representation

Two-Steps Benchmarks for Time Series Disaggregation (French Quarterly National Accounts methodology)

Awesome Lists containing this project

README

          

---
output: github_document
---

```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```

[![CRAN status](https://www.r-pkg.org/badges/version/disaggR)](https://cran.r-project.org/package=disaggR)
[![R build status](https://github.com/InseeFr/disaggR/workflows/R-CMD-check/badge.svg)](https://github.com/InseeFr/disaggR/actions)
[![codecov](https://codecov.io/gh/InseeFr/disaggR/branch/master/graph/badge.svg)](https://app.codecov.io/gh/InseeFr/disaggR)
[![Downloads](https://cranlogs.r-pkg.org/badges/disaggR)](https://cran.r-project.org/package=disaggR)

## 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](https://cran.r-project.org/package=disaggR).

```{r, eval = FALSE}
install.packages("disaggR")
```

You can install the __development__ version from [Github](https://github.com/InseeFr/disaggR).

```{r, eval = FALSE}
# install.packages("devtools")
install_github("InseeFr/disaggR")
```

## Usage

```{r, echo = TRUE, results = 'hide', fig.show="hold", out.width="50%"}
library(disaggR)

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

```{r, echo = TRUE, results = 'hide', fig.show="hold", out.width="50%"}
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))
```

```{r, echo = TRUE, results = 'hide', fig.show="hold", out.width="50%"}
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.

```{r, echo = TRUE, eval = FALSE}
reView(benchmark)
```

![shinyscreen](man/figures/shiny-screen.jpg){ width=100% }\