[Japanese/English]

R package TSSSomp

The Institute of Statistical Mathematics

March 28, 2023 (Ver. 1.2.1)



1. Introduction

R package TSSSomp is a parallel version of some functions of R package TSSS using OpenMP. TSSS is an R package for time series analysis and modeling with sate space model base on the program by Genshiro Kitagawa(3). The chapter about the particle filter and smoothing was added after Genshiro Kitagawa(2),(4).

This package includes four R functions. tvvarOmp() and tvarOmp() are functions to estimate time-varying variance and time-varying coefficient AR model, respectively. pfilterOmp() and pfilterNLOmp() are functions to perform particle filtering and smoothing for a linear state-space model and a nonlinear state-space model, respectively.

Parallel computing with OpenMP may reduce the running time, but the speedup rate is different from practice environment and function to use as follows "3. Test environment and results".


2. Package installation

It is necessary to install TSSS as a dependency package before installing this package.

2.1 Installation on Windows

(1) Put the binary file TSSSomp_1.2.1.zip in a suitable folder, then start R (RGui).

(2) From the RGui menu
   Packages ---> Install package(s) from local zip files...
        ---> Select files
        ---> TSSSomp_1.2.1.zip

(3) From the RGui menu
   Packages ---> Load Package...
        ---> Select one
        ---> TSSSomp

2.2 Installation on Linux

(1) Put the source package TSSSomp_1.2.1.tar.gz in a suitable directory and install it from the command line with

   # R CMD INSTALL TSSSomp_1.2.1.tar.gz

(2) Start R, then execute R command

   > library(TSSSomp)


3. Test environment and results

We tested this package on 64-bit Windows 10 (R-4.0.2) with Intel Core i7-8550U and Ubuntu 20.04 LTS (R-4.0.3) with Intel Core i7 6700HQ.
As a result of having compared it's elapsed time in single thread and 8 threads, it is as follows. (As of April 30, 2021)

For the running time of the second example in tvvarOmp, it is about 2.2 times faster on Windows 10 and about 2.0 times faster on Ubuntu 20.04.
For the running time of the second example in tvarOmp, it is about 3.2 times faster on Windows 10 and 2.6 times faster on Ubuntu 20.04.
For the running time of the examples in pfilterOmp, it is about 1.5 times faster on Windows 10 and about the same on Ubuntu 20.04.
For the running time of the example in pfilterNLOmp, it is about 1.5 times faster on Windows 10 and about the same on Ubuntu 20.04.


4. References

(1) Kitagawa, G. (2010) Introduction to Time Series Modeling. Chapman & Hall/CRC.
(2) Kitagawa, G. (2020) Introduction to Time Series Modeling with Applications in R. Chapman & Hall/CRC.
(3) Kitagawa, G. (1993) FORTRAN 77 Programming for Time Series Analysis. The Iwanami Computer Science Series, Iwanami Publishing Company (in Japanese).
(4) Kitagawa, G. (2005) Introduction to Time Series Analysis. Iwanami Publishing Company (in Japanese).
(5) Kitagawa, G. (2020) Introduction to Time Series Modeling with R. Iwanami Publishing Company (in Japanese).



Please send comments and bug reports to ismrp (at) grp.ism.ac.jp.