Generate_filterMA: Generate the Filter of a multivariate MA process

Description Usage Arguments Value Details Examples

Description

Generate the Filter of a multivariate MA process

Usage

1
2
Generate_filterMA(d.ts, d.n, MA.len = 3, ma.scale = rep(1, MA.len),
  a.smooth.coef = 0, seed = 1)

Arguments

d.ts

dimension of the (output) time series

d.n

dimension of the noise that is filtered

MA.len

Length of the filter. Set to 3 by default.

ma.scale

scaling factor of each lag matrix. See details.

a.smooth.coef

A coefficient to shrink coefficients of filter. Set to 0 by default.

seed

The random seed used to generate the filter. Set to 1 by default.

Value

A d.ts x d.n x MA.len array

Details

Generates a filter (i.e. a d.ts x d.n x MA.len array) for a moving average process. The entries of the filter are generate randomly, but can be reproduced by specifying the random seed seed.

The ma.scale parameter should be a vector of length MA.len, and corresponds to a scaling factor applied to each lag of the filter of the MA process that is generated.

Examples

1
2
3
4
ma.scale1=c(-1.4,2.3,-2)
a1=Generate_filterMA(10, 10, MA.len=3, ma.scale=ma.scale1, seed=10)
str(a1)
rm(a1)

Example output

 num [1:10, 1:10, 1:3] -1.413 -1.271 -0.44 -0.981 -1.606 ...

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