Chapter 4: SSA for multivariate time series
Here you can find the code listings in R
language from the corresponding chapter of the book.
You need to load Rssa
, ssabook
, lattice
, latticeExtra
, plyr
, fma
to run these examples.
Contents
- Chapter 4: SSA for multivariate time series
- Fragment 4.1.1 (‘Stocks’: Reconstruction)
- Produced output
- Fragment 4.2.1 (‘FORT’ and `DRY’: Reconstruction)
- Produced output
- Fragment 4.2.2 (‘FORT’ and ‘DRY’: Identification)
- Produced output
- Fragment 4.3.1 (‘FORT’ and ‘DRY’: Forecast)
- Produced output
- Fragment 4.3.2 (Simulation for accuracy estimation)
- Produced output
- Fragment 4.4.1 (‘FORT’ and ‘ROSE’: Influence of series scales)
- Produced output
- Fragment 4.4.2 (‘FORT’ and ‘ROSE’: Filling-in the missing data in ‘ROSE’)
- Produced output
- Fragment 4.4.3 (‘Total’ and ‘Mainsales’: Forecast to fill-in ‘Total’)
- Produced output
- Fragment 4.4.4 (‘Australian wines’: Simultaneous decomposition by MSSA)
- Produced output
Fragment 4.1.1 (‘Stocks’: Reconstruction)
Produced output
‘Stocks’: Reconstructed trends.
‘Stocks’: Eigenvectors, real and imaginary parts.
[1] 6156.061+8492.425i 6169.006+8507.808i
Fragment 4.2.1 (‘FORT’ and `DRY’: Reconstruction)
Produced output
‘FORT’ and ‘DRY’: Reconstructed trend and seasonality.
Fragment 4.2.2 (‘FORT’ and ‘DRY’: Identification)
Produced output
‘FORT’ and ‘DRY’: 1D graphs of eigenvectors.
‘FORT’ and ‘DRY’: 2D scatterplots of eigenvectors.
‘FORT’ and ‘DRY’: 1D graphs of eigenvectors after Iterative O-SSA.
$F1
period rate | Mod Arg | Re Im
12.128 -0.004789 | 0.99522 0.52 | 0.86463 0.49283
-12.128 -0.004789 | 0.99522 -0.52 | 0.86463 -0.49283
$F2
period rate | Mod Arg | Re Im
4.007 -0.001226 | 0.99877 1.57 | 0.00279 0.99877
-4.007 -0.001226 | 0.99877 -1.57 | 0.00279 -0.99877
Fragment 4.3.1 (‘FORT’ and ‘DRY’: Forecast)
Produced output
‘FORT’ and ‘DRY’: Forecast of the signal.
Fragment 4.3.2 (Simulation for accuracy estimation)
Produced output
12 24 36 48 60
2.869683 1.587789 1.248881 1.153730 1.855115
12 24 36 48 60
2.671251 2.578059 1.501565 2.595378 4.564218
12 24 36 48 60
7.349316 4.298144 4.101666 4.298144 7.349316
12 24 36 48 60
24.67425 13.60116 14.54819 11.72135 15.86380
Fragment 4.4.1 (‘FORT’ and ‘ROSE’: Influence of series scales)
Produced output
‘FORT’ and ‘ROSE’: Trends with normalization (ET1,12,14) and without (ET1).
Fragment 4.4.2 (‘FORT’ and ‘ROSE’: Filling-in the missing data in ‘ROSE’)
Produced output
‘FORT’ and ‘ROSE’: Filling-in of `ROSE’ by two methods.
Fragment 4.4.3 (‘Total’ and ‘Mainsales’: Forecast to fill-in ‘Total’)
Produced output
‘Total’ and ‘Mainsales’: Forecast to fill-in ‘Total’.
Fragment 4.4.4 (‘Australian wines’: Simultaneous decomposition by MSSA)
Produced output
‘Australian wines’: Extraction of trends.
‘Australian wines’: Extraction of seasonality.