[Japanese/English]

TIMSAC for R package


The Institute of Statistical Mathematics

August 1, 2012



1. Introduction

The TIMSAC (TIMe Series Analysis and Control) is a general program package for analysis, prediction and control of time series and has been developed at the Institute of Statistical Mathematics. The original TIMSAC or TIMSAC-72 was published in Akaike and Nakagawa (1972). After that, TIMSAC-74, TIMSAC-78 and TIMSAC-84 were published as the TIMSAC series in Computer Science Monograph. Many programs in the TIMSAC series were developed to provide procedures for analyzing practical data, e.g., optimal control of an industrial process, analysis of economic fluctuations and so on. In this package several information criteria are used for model selection. In TIMSAC-72, FPE (Final Prediction Error) is used. After TIMSAC-74, AIC (Akaike Information Criterion) is used for model selection. TIMSAC-78 contains several programs based on Bayesian modeling where ABIC (Akaike Bayesian Information Criterion) is also used for model selection.

The programs of the TIMSAC series are written in FORTRAN. Recently a DLL (Dynamic Link Library) on Windows and a shared library on Linux has been developed for providing procedures of part of programs of the TIMSAC series. Programs written in FORTRAN, C or Java can use these libraries.

R is a free programming language or an environment that includes many statistical techniques. R has facilities for data manipulation on arrays and matrices, graphic and foreign language interfaces. We provide timsac R package for using TIMSAC libraries from R. All functions in timsac R package use .Fortran function of R to communicate between timsac.dll or libtimsac.so and R. If necessary some functions display statistical graphs using R graphical procedures.

In the latest version, some new functions were added whose source code are published in FORTRAN 77 Programming for Time Series Analysis (in Japanese). In addition two functions (tvvar,tvar) for the time varying AR model are extended to support parallel computation using OpenMP as package timsacOMP.


2. Package installation

We provide several binary files and source file for R on Windows and Linux. We checked that they work on several versions of R on Windows7 and Debian Linux 2.6.

2.1 Installation on Windows

(1) Put timsac_1.2.8.zip on a suitable directory, then start R (RGui).

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

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

2.2 Installation on Linux

(1) Specify the directory where the timsac library will be put by assigning the environment variable R_LIBS.

(2) Put source package timsac_1.2.8.tar.gz on a suitable directory and

   # R CMD INSTALL timsac_1.2.8.tar.gz

Note that to install a source package, we need gcc compiler and gfortran compiler.

(3) Start R, then execute R command

   > library(timsac)

timsac R package is now available. Once the package is installed, HTML help is available.
See timsac_guide_j.pdf (in Japanese) or timsac_guide_e.pdf (in English) in the doc subdirectory of the package timsac for more details.


3. Reference

(1) H.Akaike, E.Arahata, T.Ozaki (1975-1976). TIMSAC-74, A Time series analysis and control program package (1) & (2), Computer Science Monographs, No.5 & 6, The Institute of Statistical Mathematics, Tokyo.
(2) H.Akaike, G.Kitagawa, E.Arahata, F.Tada (1979). TIMSAC-78, Computer Science Monographs, No.11, The Institute of Statistical Mathematics, Tokyo.
(3) H.Akaike, T.Ozaki, M.Ishiguro, Y.Ogata, G.Kitagawa, Y.-H.Tamura, E.Arahata, K.Katsura, Y.Tamura (1985). TIMSAC-84 Part 1 & Part 2, Computer Science Monographs, No.22 & 23, The Institute of Statistical Mathematics, Tokyo.
(4) H.Akaike and T.Nakagawa (1988). Statistical Analysis and Control of Dynamic Systems, Kluwer Academic publishers.
(5) G.Kitagawa (1993). FORTRAN 77 Programming for Time Series Analysis (in Japanese), The Iwanami Computer Science Series.
(6) G.Kitagawa and W.Gersch (1996) Smoothness Priors Analysis of Time Series, Lecture Notes in Statistics, No.116, Springer-Verlag.
(7) G.Kitagawa (2005). Introduction to Time Series Analysis, Iwanami Publishing Company (in Japanese).



Please send comments and bug reports to ismrp (at) jasp.ism.ac.jp.
This research was partly supported by Function and Induction Research Project held by the Transdisciplinary Research Integration Center at the Research Organization of Information and Sciences, Japan.