transformData {sparseDFM}R Documentation

Transform data to make it stationary

Description

Methods to transform the data to make it stationary. Input a n×pn \times p numeric data matrix and what transform is required for each data series. Returns a n×pn \times p matrix of the transformed data.

Usage

transformData(X, stationary_transform)

Arguments

X

n x p numeric data matrix

stationary_transform

p-dimensional vector filled with numbers from {1,2,3,4,5,6,7}\{1,2,3,4,5,6,7\} representing:

1 no change
2 first difference Xi,tXi,t1X_{i,t} - X_{i,t-1}
3 second difference (Xi,tXi,t1)(Xi,t1Xi,t2)(X_{i,t} - X_{i,t-1}) - (X_{i,t-1} - X_{i,t-2})
4 log first difference log(Xi,t)log(Xi,t1)log(X_{i,t}) - log(X_{i,t-1})
5 log second difference (log(Xi,t)log(Xi,t1))(log(Xi,t1)log(Xi,t2))(log(X_{i,t}) - log(X_{i,t-1})) - (log(X_{i,t-1}) - log(X_{i,t-2}))
6 growth rate (Xi,tXi,t1)/Xi,t1(X_{i,t} - X_{i,t-1})/X_{i,t-1}
7 log growth rate (log(Xi,t)log(Xi,t1))/log(Xi,t1)(log(X_{i,t}) - log(X_{i,t-1}))/log(X_{i,t-1})

Value

Transformed stationary version of X\bm{X}.


[Package sparseDFM version 1.0 Index]