Learn R Programming

TSSS (version 1.2.3)

boxcox: Box-Cox Transformation

Description

Computes Box-Cox transformation and find an optimal lambda with minimum AIC.

Usage

boxcox(y, plot = TRUE, …)

Arguments

y

a univariate time series.

plot

logical. If TRUE (default), original data and transformed data with minimum AIC are plotted.

…

further arguments to be passed to plot.boxcox.

Value

An object of class "boxcox", which is a list with the following elements:

mean

mean of original data.

var

variance of original data.

aic

AIC of the model with respect to the original data.

llkhood

log-likelihood of the model with respect to the original data.

z

transformed data.

aic.z

AIC of the model with respect to the transformed data.

llkhood.z

log-likelihood of the model with respect to the transformed data.

References

Kitagawa, G. (2010) Introduction to Time Series Modeling. Chapman & Hall/CRC.

Examples

Run this code
# NOT RUN {
# Sun spot number data
data(Sunspot)
boxcox(Sunspot)

# Wholesale hardware data
data(WHARD)
boxcox(WHARD)
# }

Run the code above in your browser using DataLab