butterworth.wge: Perform Butterworth Filter

View source: R/butterworth.wge.R

butterworth.wgeR Documentation

Perform Butterworth Filter

Description

The user can specify the order of the filter, and whether it is low pass ("low"), high pass ("high"), band stop ("stop"), or band pass ("pass") filter. Requires the CRAN package 'signal'.

Usage

butterworth.wge(x, order, type, cutoff,plot=TRUE)

Arguments

x

Realization to be filtered

order

Order of the Butterworth filter

type

Either "low", "high", "stop", or "pass" as dicsussed in Descriptions

cutoff

For "low" and "high": cutoff is a real number. For "stop" and "band": cutoff is a 2-component vector

plot

If plot=TRUE then plots of the original and filtered data are produced.

Value

The filtered data

Note

Requires CRAN package 'signal'

Author(s)

Wayne Woodward

References

"Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott

Examples

data(wages)
    butterworth.wge(wages,order=4,type="low",cutoff=.05)

tswge documentation built on Feb. 16, 2023, 6:51 p.m.