filtrar {uroot}R Documentation

Filter frequencies

Description

Filter selected frequencies in seasonal time series.

Usage

      filtrar (vari, s, t0, filtra, plot)
   

Arguments

vari a ts object.
s periodicity of the time series.
t0 year and season of the first observation.
filtra a vector indicating the frequencies to filter.
plot logical. If TRUE a plot of the filtered series is showed.

Details

filtra is a 0-1 vector of length s/2+1. The frequencies are ordered in the vector as follows: c (zero, pi, pi/2) for quarterly series and c (zero, pi, pi/2, 2pi/3, pi/3, 5pi/6, pi/6) for monthly series.

A zero in the element i of the vector indicates that the cycle associated to the corresponding frequency will not be filtered. The cycles related to frequencies that are set equal to 1 are filtered.

Value

A list containing: Data of the filtered series, coefficients and lags of the polynomial that configure the filter.

Author(s)

Javier López-de-Lacalle javlacalle@yahoo.es and Ignacio Díaz-Emparanza etpdihei@bs.ehu.es

Examples

      ## Filter seasonal frequencies.
      data(AirPassengers)
      filtrar (vari=AirPassengers, s=12, t0 = c(1949,1), filtra = c(0,1,1,1,1,1) , plot = TRUE)
   

[Package uroot version 1.3 Index]