Simulate_new_MA: Simulate a new Moving Average (MA) vector time series and...

Description Usage Arguments Value Details Examples

Description

Simulate a new Moving Average (MA) vector time series and return the time series

Usage

1
Simulate_new_MA(a, T.len, noise.type, DEBUG = FALSE)

Arguments

a

Array, returned by Generate_filterMA, containing the filter of the MA process

T.len

Numeric, the length of the time series to generate

noise.type

the type of noise that is driving the MA process. See Details section.

DEBUG

Logical, for outputting information on the progress of the function

Value

A T.len x dim(a)[1] matrix, where each column corresponds to a coordinate of the vector time series

Details

The function simulates a moving average process of dimension dim(a)[1], defined by

X[t,] = a[,,1] * epsilon[,t-1] + a[,,2] * epsilon[,t-2] + ... + a[,,dim(a)[3]] * epsilon[t-dim(a)[3]]

noise.type specifies the nature and internal correlation of the noise that is driving the MA process. It can take the values

white-noise

the noise is Gaussian with covariance matrix identity

white-noise

the noise is Gaussian with diagonal covariance matrix, whose j-th diagonal entry is ((j - 0.5 )*pi)^(-1)

studentk

the coordinates of the noise are independent and have a student t distribution with 'k' degrees of freedom, standardized to have variance 1

Examples

1
2
3
4
ma.scale1=c(-1.4,2.3,-2)
a1=Generate_filterMA(6, 6, MA.len=3, ma.scale=ma.scale1)
X=Simulate_new_MA(a1, T.len=512, noise.type='wiener')
plot.ts(X)

Example output



ftsspec documentation built on May 1, 2019, 7:04 p.m.