Learn R Programming

forecastSNSTS (version 1.3-0)

ts-models-tvARMA: Simulation of an tvARMA(p,q) time series.

Description

Returns a simulated time series \(Y_{1,T}, ..., Y_{T,T}\) that fulfills the following equation: $$Y_{t,T} = \sum_{j=1}^p a_j(t/T) Y_{t-j,T} + \sigma(t/T) \varepsilon_{t} + \sum_{k=1}^q \sigma((t-k)/T) b_k(t/T) \varepsilon_{t-k},$$ where \(a_1, \ldots, a_p, b_0, b_1, \ldots, b_q\) are real-valued functions on \([0,1]\), \(\sigma\) is a positive function on \([0,1]\) and \(\varepsilon_t\) is white noise.

Usage

tvARMA(T = 128, a = list(), b = list(), sigma = function(u) {    
  return(1) }, innov = function(n) {     rnorm(n, 0, 1) })

Arguments

T

length of the time series to be returned

a

list of p real-valued functions defined on \([0,1]\)

b

list of q real-valued functions defined on \([0,1]\)

sigma

function

innov

a function with one argument n that simulates a vector of the n residuals \(\varepsilon_t\).

Value

Returns a tvARMA(p,q) time series with specified parameters.

Examples

Run this code
# NOT RUN {
## Taken from Section 6 in Dahlhaus (1997, AoS)
a1 <- function(u) {1.8 * cos(1.5 - cos(4 * pi * u))}
a2 <- function(u) {-0.81}
plot(tvARMA(128, a = list(a1, a2), b = list()), type = "l")
# }

Run the code above in your browser using DataLab