GithubHelp home page GithubHelp logo

a-s-russo / sjx Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 1.0 9.77 MB

Comparison of JDemetra+ and X-13ARIMA-SEATS seasonal adjustment methods on ABS data

License: GNU General Public License v3.0

R 100.00%
australian-bureau-of-statistics jdemetra official-statistics seasonal-adjustment time-series trending x13-arima-seats

sjx's Introduction

Seasonal adjustment and trending

A time series is a collection of well-defined data observed regularly through time. Seasonal adjustment is an analytical method to estimate and remove seasonal and calendar-related impacts from a time series. Trending is an analytical method to estimate the long-term, underlying direction of a time series.

The sjx package enables the comparison of the seasonal adjustment and trending methods produced by the following three programs:

  • SEASABS (used by Australia’s national statistical agency)

  • JDemetra+ (used by many European statistical agencies and central banks)

  • X-13ARIMA-SEATS (used by the United States Census Bureau)

Published seasonally adjusted and trend estimates of time series data from the Australian Bureau of Statistics (generated via SEASABS) are compared against the output generated by executing the JDemetra+ and X-13ARIMA-SEATS programs. Since SEASABS is not freely available, the estimates are referenced directly via their publications on the web. The other two programs are readily accessible however, and are run via their R interfaces:

  • The R package RJDemetra is used to run JDemetra+ (version 2)

  • The R package seasonal is used to run X-13ARIMA-SEATS

Importantly, the default values of both packages have been used when running the seasonal adjustment and trending algorithms.

ABS time series data

The Australian Bureau of Statistics (ABS) produces seasonally adjusted and trend estimates for various publications containing original time series. The relevant data are contained in various tables as Excel spreadsheets under the ‘Data downloads’ section of the desired publication.

An example is Table 1. Inventories, chain volume measures in the June quarter 2023 publication of ‘Business Indicators, Australia’ available at:

https://www.abs.gov.au/statistics/economy/business-indicators/business-indicators-australia/jun-2023/5676001.xlsx

Each spreadsheet file contains the following sheets/tabs (any others are ignored):

  • Index: contains metadata about the time series, such as the series type, units and frequency

  • Data1: contains the original, seasonally adjusted and trend estimates

Note that:

  • the ABS does not necessarily publish seasonally adjusted and trend estimates for all original time series;

  • the ABS sometimes only publishes the seasonally adjusted and/or trend estimates without the corresponding original series; and

  • this package only works for ABS data containing monthly or quarterly time series.

Installation

You can install the development version of sjx from GitHub with:

# install.packages("devtools")
devtools::install_github("a-s-russo/time-series-comparison@fusen")

Note that RJDemetra requires the rJava package and Java SE version 8 or higher. For troubleshooting, consult the installation manual.

Example

Compare the seasonally adjusted series for all employed persons in Australia between SEASABS, JDemetra+, and X-13ARIMA-SEATS:

# Load the package
library(sjx)

# Construct a URL to download ABS labour force data
ABS <- "https://www.abs.gov.au/statistics/labour/" # ABS website (for labour statistics)
pub <- "employment-and-unemployment/labour-force-australia/" # Publication
ref <- "jul-2023/" # Reference period
cat <- "620200" # Catalogue number
tab <- "1" # Table number
ext <- ".xlsx" # File extension
URL <- paste0(ABS, pub, ref, cat, tab, ext)

# Download the series data and metadata
emp <- download_ts(URL)

# Plot the seasonally adjusted series
create_tsplot_comp(emp, "Employed total ;  Persons ;")$seas

sjx's People

Contributors

a-s-russo avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

econmaett

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.