lsqr: The Least Squares Method via Householder Transformation

View source: R/lsqr.R

lsqrR Documentation

The Least Squares Method via Householder Transformation

Description

Compute regression coefficients of the model with minimum AIC by the least squares method via Householder transformation.

Usage

lsqr(y, lag = NULL, period = 365, plot = TRUE, ...)

Arguments

y

a univariate time series.

lag

number of sine and cosine components. Default is \sqrt{n}, where n is the length of the time series y.

period

period of one cycle.

plot

logical. If TRUE (default), original data and fitted trigonometric polynomial are plotted.

...

graphical arguments passed to plot.lsqr.

Value

An object of class "lsqr", which is a list with the following components:

aic

AIC's of the model with order 0,\dots,k ( = 2lag + 1).

sigma2

residual variance of the model with order 0,\dots,k.

maice.order

order of minimum AIC.

regress

regression coefficients of the model.

tripoly

trigonometric polynomial.

References

Kitagawa, G. (2020) Introduction to Time Series Modeling with Applications in R. Chapman & Hall/CRC.

Examples

# The daily maximum temperatures in Tokyo
data(Temperature)
lsqr(Temperature, lag = 10)

TSSS documentation built on Sept. 29, 2023, 9:07 a.m.