Learn R Programming

pgam (version 0.3.2)

periodogram: Periodogram

Description

A raw periodogram is returned end optionally plotted.

Usage

periodogram(x, rows = length(x), plot = TRUE, title = NULL, ...)

Arguments

x
time series
rows
number of rows to be returned. Default is $n$
plot
if TRUE a raw periodogram is plotted
title
alternative title for plotting
...
further arguments to plot function

Value

  • Periodogram ordered by intensity.

Details

Although the raw periodogram is a biased estimator of the spectrum of a time series, it still is a good indicator of unresolved seasonality patterns in residuals of the fitted model. See intensity for frequencies extraction.

References

Box, G., Jenkins, G., Reinsel, G. (1994) Time Series Analysis : Forecasting and Control. 3rd edition, Prentice Hall, New Jersey.

See Also

pgam, intensity

Examples

Run this code
library(pgam)
data(aihrio)
attach(aihrio)
form <- ITRESP5~f(WEEK)+HOLIDAYS+rain+PM+g(tmpmax,7)+g(wet,3)
m <- pgam(form,aihrio,omega=.8,beta=.01,maxit=1e2,eps=1e-4,optim.method="BFGS",partial.resid="response")

r <- resid(m)
p <- periodogram(r)

Run the code above in your browser using DataLab