TSSS (version 1.3.4-5)

lsqr: 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, ...)

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 ( = 2\)lag\( + 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.

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.

References

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

Examples

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

Run the code above in your browser using DataLab