mtsframe: Multivariate Time Series Frame Objects

Description Usage Arguments Examples

View source: R/mtsframe.R

Description

The function mtsframe create a mutivariate time series object to be used in combination with the functions in the package ASSA.

Usage

1
mtsframe(dates, Y)

Arguments

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).

Examples

 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')

ASSA documentation built on Nov. 20, 2020, 5:10 p.m.

Related to mtsframe in ASSA...