periodogram: Periodogram

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/ares.r

Description

Compute and plot the periodogram of the residuals

Usage

1
2
periodogram(x, type = "deviance", print = TRUE, rows = 20,
	test = TRUE, new = TRUE, digits = getOption("digits"))

Arguments

x

a model fitted by fit_core or a vector of residuals

type

a quoted string indicating the type of residuals to extract. Default is "deviance". See get_residuals

print

a logical indicating whether the statistics should be printed

digits

an integer indicating the number of decimal places to print. Default is given by the system option digits

rows

an integer giving the number of rows to print

test

a logical indicating whether the uniformity test should be run. See periodogram_test

new

if TRUE a new graph window is opened

Details

This function computes the Fourier frequencies ω=2π j/n with j<n/2 and the periodogram intensity I≤ft(ω\right). A graph of I≤ft(ω\right) against the frequencies is plotted.

If object is a model then the residuals are extracted otherwise the periodogram is computed for the vector supplied.

Value

A data frame with the frequencies, periods, and intensities sorted by the latest in decreasing order.

Author(s)

Washington Junger wjunger@ims.uerj.br and Antonio Ponce de Leon ponce@ims.uerj.br

References

Schwartz, J., Spix, C., Touloumi, G. et al. (1996) Methodological issues in studies of air pollution and daily counts of deaths or hospital admissions. J Epidemiol. Community Health 50 (suppl 1), S12–S18.

Box, G., Jenkins, G., Reinsel, G. (1994) Time Series Analysis : Forecasting and Control. 3 ed., Prentice Hall.

Diggle, P. J. (1990) Time Series: A Biostatistical Introduction. Oxford University Press.

See Also

fit_core,get_residuals

Examples

1
2
3
4
5
data(admrio)
setup(admrio,"date")
f <- resp5~s(time)+weekdays+s(tmpmax)+s(humid)
m <- fit_core(f)
periodogram(m)

wjunger/ares documentation built on Dec. 23, 2021, 5:17 p.m.