Title: | Quality Assessment and Reportiing for Seasonal Adjustment |
---|---|
Description: | Add-in to the 'RJDemetra' package on seasonal adjustments. It allows to produce quality assessments outputs (such as dashboards). |
Authors: | Alain Quartier-la-Tente [aut, cre] |
Maintainer: | Alain Quartier-la-Tente <[email protected]> |
License: | EUPL |
Version: | 0.1.2 |
Built: | 2024-10-31 20:23:48 UTC |
Source: | https://github.com/AQLT/rjd3report |
Function to plot a simple dashboard of a seasonal adjustment model.
## S3 method for class 'simple_dashboard' plot( x, main = "Simple Dashboard with outliers", subtitle = NULL, color_series = c(y = "#F0B400", t = "#1E6C0B", sa = "#155692"), reference_date = TRUE, ... )
## S3 method for class 'simple_dashboard' plot( x, main = "Simple Dashboard with outliers", subtitle = NULL, color_series = c(y = "#F0B400", t = "#1E6C0B", sa = "#155692"), reference_date = TRUE, ... )
x |
A |
main |
Main title. |
subtitle |
Subtitle. |
color_series |
Color of the raw time series, the trend and the seasonally adjusted component. |
reference_date |
Boolean indicating if the reference date should be printed. |
... |
Other unused parameters. |
data <- window(rjd3toolkit::ABS$X0.2.09.10.M, start = 2003) sa_model <- rjd3x13::x13(data) dashboard_data <- simple_dashboard(sa_model) plot(dashboard_data, main = "Simple dashboard") dashboard_data2 <- simple_dashboard2(sa_model) plot(dashboard_data2, main = "Simple dashboard with outliers")
data <- window(rjd3toolkit::ABS$X0.2.09.10.M, start = 2003) sa_model <- rjd3x13::x13(data) dashboard_data <- simple_dashboard(sa_model) plot(dashboard_data, main = "Simple dashboard") dashboard_data2 <- simple_dashboard2(sa_model) plot(dashboard_data2, main = "Simple dashboard with outliers")
sarima_orders()
returns the SARIMA orders as a list while
sarima_orders_ch()
returns a string.
sarima_orders(x, ...) sarima_orders_ch(x, ...)
sarima_orders(x, ...) sarima_orders_ch(x, ...)
x |
The model. |
... |
Other unused parameters. |
y <- rjd3toolkit::ABS$X0.2.09.10.M mod <- rjd3toolkit::sarima_estimate(y, order = c(0,1,1), seasonal = c(0,1,1)) sarima_orders(mod) sarima_orders_ch(mod) mod_x13 <- rjd3x13::x13(y) sarima_orders_ch(mod_x13)
y <- rjd3toolkit::ABS$X0.2.09.10.M mod <- rjd3toolkit::sarima_estimate(y, order = c(0,1,1), seasonal = c(0,1,1)) sarima_orders(mod) sarima_orders_ch(mod) mod_x13 <- rjd3x13::x13(y) sarima_orders_ch(mod_x13)
Functions to compute the data to produce a simple seasonal adjustment dashboard.
simple_dashboard2()
is a slightly variation of simple_dashboard()
with smaller description
text to include a table with last outliers.
simple_dashboard( x, context = NULL, digits = 2, scale_var_decomp = FALSE, remove_others_contrib = FALSE, add_obs_to_forecast = TRUE, td_effect = NULL ) simple_dashboard2( x, context = NULL, digits = 2, scale_var_decomp = FALSE, remove_others_contrib = FALSE, digits_outliers = digits, columns_outliers = c("Estimate", "T-stat"), n_last_outliers = 4, order_outliers = c("AO", "LS", "TC", "SO"), add_obs_to_forecast = TRUE, td_effect = NULL )
simple_dashboard( x, context = NULL, digits = 2, scale_var_decomp = FALSE, remove_others_contrib = FALSE, add_obs_to_forecast = TRUE, td_effect = NULL ) simple_dashboard2( x, context = NULL, digits = 2, scale_var_decomp = FALSE, remove_others_contrib = FALSE, digits_outliers = digits, columns_outliers = c("Estimate", "T-stat"), n_last_outliers = 4, order_outliers = c("AO", "LS", "TC", "SO"), add_obs_to_forecast = TRUE, td_effect = NULL )
x |
A seasonal adjustment model. |
context |
Context used to estimate the model. |
digits |
Number of digits used in the tables. |
scale_var_decomp |
boolean indicating if the variance decomposition table should be rescaled to 100. |
remove_others_contrib |
boolean indication if the "Others" contribution (i.e.: the pre-adjustment contribution) should be removed from the variance decomposition table. |
add_obs_to_forecast |
Boolean indicating if the last observed values should be added to the forecast table (for the plot). |
td_effect |
Boolean indicating if the residual trading days effect test should be printed.
By default ( |
digits_outliers |
number of digits used in the table of outliers. |
columns_outliers |
informations about outliers that should be printed in the summary table.
Can be either a vector of characters among |
n_last_outliers |
number of last outliers to be printed (by default |
order_outliers |
order of the outliers in case of several outliers at the same date. |
data <- window(rjd3toolkit::ABS$X0.2.09.10.M, start = 2003) sa_model <- rjd3x13::x13(data) dashboard_data <- simple_dashboard(sa_model) plot(dashboard_data, main = "Simple dashboard") dashboard_data2 <- simple_dashboard2(sa_model) plot(dashboard_data2, main = "Simple dashboard with outliers")
data <- window(rjd3toolkit::ABS$X0.2.09.10.M, start = 2003) sa_model <- rjd3x13::x13(data) dashboard_data <- simple_dashboard(sa_model) plot(dashboard_data, main = "Simple dashboard") dashboard_data2 <- simple_dashboard2(sa_model) plot(dashboard_data2, main = "Simple dashboard with outliers")