-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathREADME.Rmd
84 lines (62 loc) · 2.53 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
<!-- badges: start -->
[![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)
<!-- badges: end -->
## 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% }\