whfilt: Apply derived FIR Causal Wiener-Hopf Filter

Description Usage Arguments Value Examples

View source: R/whfilter.R

Description

Apply the optimal (MMSE) Wiener-Hopf causal FIR filter to a known multivariate input ts x. Uses filter output from whfir.

Usage

1
whfilt(x, s, h)

Arguments

x

a ts, vector or matrix of values (columns as time series).

s

as ts or vector of values

h

list returned from whfir.

Value

Wiener-Hopf prediction of time series s.

Examples

1
2
3
4
5
6
7
8
9
x <- rnorm( 504 )
h <- seq( 1, 0, length.out = 5 )
s <- stats::filter( x, h, sides = 1 )
x <- x[-(1:4)] # Remove filter roll-on
s <- s[-(1:4)]
wh <- whfir( x, s, n = c(1, 10 ) )
spred <- whfilt( x, s, wh )
plot( s, type = "l" )
lines( spred, col = "red" )

jrevenaugh/TSAUMN documentation built on Nov. 8, 2019, 2:20 p.m.