Methods to transform the data to make it stationary. Input a \(n \times p\) numeric data matrix and what transform is required for each data series. Returns a \(n \times p\) matrix of the transformed data.
transformData(X, stationary_transform)Transformed stationary version of \(\bm{X}\).
n x p numeric data matrix
p-dimensional vector filled with numbers from \(\{1,2,3,4,5,6,7\}\) representing:
1 | no change | ||
2 | first difference \(X_{i,t} - X_{i,t-1}\) | ||
3 | second difference \((X_{i,t} - X_{i,t-1}) - (X_{i,t-1} - X_{i,t-2})\) | ||
4 | log first difference \(log(X_{i,t}) - log(X_{i,t-1})\) | ||
5 | log second difference \((log(X_{i,t}) - log(X_{i,t-1})) - (log(X_{i,t-1}) - log(X_{i,t-2}))\) | ||
6 | growth rate \((X_{i,t} - X_{i,t-1})/X_{i,t-1}\) | ||
7 | log growth rate \((log(X_{i,t}) - log(X_{i,t-1}))/log(X_{i,t-1})\) |