Package 'rjd3report'

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

Help Index


Plot a simple seasonal adjustment dashboard

Description

Function to plot a simple dashboard of a seasonal adjustment model.

Usage

## 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,
  ...
)

Arguments

x

A simple_dashboard object.

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.

See Also

simple_dashboard.

Examples

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")

Get SARIMA Orders

Description

sarima_orders() returns the SARIMA orders as a list while sarima_orders_ch() returns a string.

Usage

sarima_orders(x, ...)

sarima_orders_ch(x, ...)

Arguments

x

The model.

...

Other unused parameters.

Examples

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)

Compute data for a simple seasonal adjustment

Description

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.

Usage

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
)

Arguments

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 (td_effect = NULL) the test is only printed for monthly series.

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 c("Estimate", "Std. Error", "T-stat", "Pr(>|t|)"); or an vector of integer: 1 corresponding to the estimate coefficient ("Estimate"), 2 corresponding to the standard deviation error ("Std. Error"), 3 corresponding to the t-statistic ("T-stat") or 4 corresponding to the p-value ("Pr(>|t|)"). By default only the estimate coefficients and the t-statistics are printed (columns_outliers = c("Estimate", "T-stat")).

n_last_outliers

number of last outliers to be printed (by default n_last_outliers = 4).

order_outliers

order of the outliers in case of several outliers at the same date.

Examples

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")