# freqrlo: Frequency response calculation for loess (or general)... In hafen/operator: Loess and STL operator matrix computation for time series

## Description

Returns the frequency response function for given loess smoothing parameters or for a specified operator matrix. Can return values for asymmetric fits.

## Usage

 ```1 2 3 4 5 6``` ```## Default S3 method: freqrlo(span, degree, M = 400, at = "symmetric") ## S3 method for class 'op' freqrlo(op, M = 400, at = 1) ## S3 method for class 'loess' freqrlo(x, M = 400, at = "symmetric") ```

## Arguments

 `span` span of loess smooth (must be odd integer). `degree` degree of loess smooth (must be 0, 1, or 2). `M` density of the grid of fourier frequencies, which range from 0 to 0.5. `at` at which design point the frequency response is to be calculated. This is interpreted as number of points from the end, with 1 being the endpoint. If an operator matrix is supplied, it is the row of the matrix to use. For symmetric neighborhoods, the value `"symmetric"` can be specified. `op` object of class `"op"`. The operator matrix in this object is used to calculate the frequency response. `x` object of class `"loess"`. Parameters from this objects are passed on to `freqrlo.default`.

## Value

A data frame of class `"freqr"` consisting of frequencies `fk` and frequency response values `frfv`.

Ryan Hafen

## References

W. S. Cleveland, E. Grosse and W. M. Shyu (1992) Local regression models. Chapter 8 of Statistical Models in S eds J. M. Chambers and T. J. Hastie, Wadsworth & Brooks/Cole.

R. Shumway and D. Stoffer. Time series analysis and its applications. Springer Verlag, 2000.

`freqr`, `plot.freqr`, `loess`, `loessOp`
 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21``` ```# symmetric loess smooth a <- freqrlo(11, 2) plot(a, strip=FALSE, axis=axis.period) # endpoint loess smooth b <- freqrlo(11, 2, at=1) plot(b, strip=FALSE, axis=axis.period) # accessing from loess ll <- loess(rnorm(100) ~ c(1:100), degree=1, span=15/100) ll.fr <- freqrlo(ll) plot(ll.fr) # STL overall operator co2.stl <- stl2(co2, t=as.vector(time(co2)), n.p=12, s.window=35, s.degree=1, t.degree=1, s.blend=0.5, t.blend=0.5) co2op <- stlOp(co2.stl) co2fr1 <- freqrlo(co2op\$fit, at=1, M=800) plot(co2fr1, aspect=0.25) ```