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

Description Usage Arguments Value Examples

Description

Returns a simulated time series Y_{1,T}, ..., Y_{T,T} that fulfills the following equation:

Y_{t,T} = ∑_{j=1}^p a_j(t/T) Y_{t-j,T} + σ(t/T) \varepsilon_{t} + ∑_{k=1}^q σ((t-k)/T) b_k(t/T) \varepsilon_{t-k},

where a_1, …, a_p, b_0, b_1, …, b_q are real-valued functions on [0,1], σ is a positive function on [0,1] and \varepsilon_t is white noise.

Usage

1
2
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

1
2
3
4
## 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")

Example output



forecastSNSTS documentation built on Sept. 2, 2019, 5:06 p.m.