TSSS (version 1.3.4-5)

polreg: Polynomial Regression Model

Description

Estimate the trend using the AIC best polynomial regression model.

Usage

polreg(y, order, plot = TRUE, ...)

Value

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

order.maice

MAICE (minimum AIC estimate) order.

sigma2

residual variance of the model with order \(M\). (\(0 \leq M \leq\) order)

aic

AIC of the model with order \(M\). (\(0 \leq M \leq\) order)

daic

AIC - minimum AIC.

coef

regression coefficients \(A(I,M)\) with order \(M\).

(\(1 \leq M \leq\) order, \(1 \leq I \leq M\))

trend

trend component.

Arguments

y

a univariate time series.

order

maximum order of polynomial regression.

plot

logical. If TRUE (default), original data and trend component are plotted.

...

graphical arguments passed to plot.polreg.

References

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

Examples

Run this code
# The daily maximum temperatures for Tokyo
data(Temperature)
polreg(Temperature, order = 7)

# Wholesale hardware data
data(WHARD)
y <- log10(WHARD)
polreg(y, order = 15)

Run the code above in your browser using DataLab