Skip to content

SeasAdjwG/SAvalidation

Repository files navigation

SAvalidation

SAvalidation provides simple functions for running validation checks on seasonally adjusted time series and generating dashboards for further analysis of validation checks.

Installation

You can install the development version of SAvalidation like so:

# Using r-universe
install.packages('SAvalidation', repos = c('https://seasadjwg.r-universe.dev', 'https://cloud.r-project.org'))

Other solution using devtools:

# install.packages("devtools")
devtools::install_github("SeasAdjwG/SAvalidation")

Example

This code shows how to run a simple level 1 validation check on a pair of time series (the unadjusted and seasonally adjusted):

library(SAvalidation)
level1_validation(data_to_check$nsa, data_to_check$sa)
#> [1] "FAIL: EVIDENCE OF RESIDUAL SEASONALITY OR CALENDAR EFFECTS IN SA SERIES"

A level 2 validation report can be created with level2_validation() which returns an html dashboard either in current working directory or a user specified directory:

level2_validation(data_to_check$nsa, data_to_check$sa, data_to_check$name)

You can also create plots from level 2 validation code for example the NSA against the SA:

nsa_sa_plot(data_to_check$nsa, data_to_check$sa)

Or the derived adjustment factor plot:

adjust_fact_plot(data_to_check$nsa, data_to_check$sa)
#> Joining with `by = join_by(quarter, year)`

About

No description, website, or topics provided.

Resources

License

EUPL-1.2, EUPL-1.2 licenses found

Licenses found

EUPL-1.2
LICENSE
EUPL-1.2
LICENSE.md

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages