msstc {ASSA}R Documentation

Multivariate Singular Spectrum Trendlines for Compositional Data

Description

Computes trendlines on the unit simplex for multivariate time series data using multivariate singular spectrum analysis.

Usage

msstc(y, l = 'automatic', m = 'automatic', vertical = TRUE)

Arguments

y

mtsframe object containing data.

l

window length; the string 'automatic' sets the default option
l = ceiling(y$n + 1) / y$D.

m

number of leading eigentriples; the string 'automatic' yields a vector containing the number of components in each dimension to be used in the trendline estimation. An automatic criterion based on the cumulative periodogram of the residuals is provided by default; see details.

vertical

logical; if TRUE the trajectory matrices are stacked vertically, otherwise the bind is horizontal.

Details

The trendline produced using this routine is based on the methods proposed in de Carvalho and Martos (2018). A quick summary of the method is as follows. Multivariate singular spectrum analysis is used to decompose time series data (y) into principal components, and a cumulative periodogram-based criterion automatically learns about what elementary reconstructed components (erc) contribute to the signal; see de Carvalho and Martos (2018) for details. The trendline results from adding elementary reconstructed components selected by the cumulative periodogram, and after projecting into the unit simplex. The plot method depicts the trendlines, and the print method reports the trendlines along with the components selected by the cumulative periodogram-based criterion.

Value

trendline

mtsframe object with trendline estimation from targeted grouping based on a cumulative periodogram criterion (or according to the number of components specified in vector m).

residuals

mtsframe object with the residuals from targeted grouping based on a cumulative periodogram criterion (or according to the number of components specified in vector m).

erc

list with elementary reconstructed components.

eigen.val

vector with the singular values of the trajectory matrix.

l

window length.

selected.components

vector with number of components selected on each dimension.

selection.criteria

a vector indicating if the null hypothesis of white noise is rejected along the dimensions (0: not rejected, 1: rejected).

rank

rank of the trajectory matrix.

Author(s)

Gabriel Martos and Miguel de Carvalho

References

de Carvalho, M. and Martos, G. (2018). Brexit: Tracking and disentangling the sentiment towards leaving the EU. Submitted.

See Also

See msst for a similar routine yielding trendlines for multivariate time series, but which does not project the pointwise estimates to the unit simplex.

Examples

## Brexit data and MSSA on the simplex
## (de Carvalho and Martos, 2018; Fig. 1)
data(brexit)
attach(brexit)
y <- mtsframe(date, brexit[, 1:3] / 100)
fit <- msstc(y)

## Window length and number of components automatically selected on
## each dimension:
fit$l
fit$selected.components 

## Plot trendlines (de Carvalho and Martos, 2018; Fig. 1)
plot(fit, options = list(type = "trendlines"), xlab="time",
     col=c("blue", "red", "black"), lwd = 2, lty = c(1, 2, 3))

## Plot elementary reconstructed components 
## (de Carvalho and Martos, 2018; Fig. 5)
plot(fit, options = list(type = "components", ncomp = 1:3))

## Plot cumulative periodograms (with 95% confidence bands)
par(mfrow = c(1, 3))
plot(fit, options = list(type = "cpgrams",
          series.names = c('Leave','Stay','Undecided')) )

## Scree-plot (with 95% confidence bands)
par(mfrow = c(1, 1))
plot(fit, options = list(type = "screeplots", ncomp = 1:10),
     type = "b", pch = 20, lwd = 2, main='Scree plot')


[Package ASSA version 1.0 Index]