Description Usage Arguments Examples
The function mtsframe
create a mutivariate time series object to be used in combination with the functions in the package ASSA.
1 | mtsframe(dates, Y)
|
dates |
dates at which observations took place. |
Y |
matrix with different time-series in columns (dimensions) and observations in rows. Values must be be sorted in ascendant way (first row in 'Y' corresponds to the oldest values of the series and last row in 'Y' corresponds to the newest values). |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | data(brexit); attach(brexit)
head(brexit, 3)
y <- mtsframe(date, Y = brexit[, 1:3])
print(y) # A 'list' with 4 elements: dates, series data matrix, and series length.
head(y$Y, 3)
y$n
y$D
plot(y) # standard plot.
# Customized plot (time.format is an additional feature to use when y$date is in 'date' format)
plot(y, time.format = '%Y' , col = c('blue','red','black'), lty = 2, type = 'p',
pch = 20, main = 'Brexit data', xlab = 'Year', ylab ='Trendline estimations')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.