Learn R Programming

tfarima (version 0.4.1)

wkfilter.as_ucarima: Wiener-Kolmogorov filter

Description

wkfilter extracts a signal for a time series described by an ARIMA model given the ARIMA model for the signal.

Usage

# S3 method for as_ucarima
wkfilter(object, z = NULL, tol = 1e-05, envir = parent.frame(), ...)

wkfilter(object, ...)

# S3 method for um wkfilter( object, um.uc, z = NULL, output = c("series", "filter"), tol = 1e-05, envir = parent.frame(), ... )

Value

An object of class ts containing the estimated signal.

Arguments

object

an object of class um.

z

an optional ts object. If NULL, the time series to be filtered is contained in the um.z object.

tol

numeric tolerance used in polynomial divisions. Default is 1e-5.

envir

environment to get z when not provided.

...

additional arguments.

um.uc

ARIMA models for the observed time series and the unobserved component (signal).

output

character, output of the function: `"series"` (default) returns the filtered time series, or `"filter"` returns the filter coefficients.

Examples

Run this code
um1 <- airline(AirPassengers, bc = TRUE)
uca1 <- as.ucarima(um1, i = "(1-B)2")
trend <- wkfilter(um1, uca1$ucm$signal1)
seas <- wkfilter(um1, uca1$ucm$signal2)

Run the code above in your browser using DataLab