Learn R Programming

seasonal (version 0.40.0)

qs: Diagnostical Statistics

Description

Functions to access diagnostical statics in a "seas" object. More statistics can be calculated with standard R functions (see examples). For accessing the complete output of X-13ARIMA-SEATS, use the out function. For diagnostical plots, see plot.seas.

Usage

qs(x)

spc(x)

fivebestmdl(x)

arimamodel(x)

Arguments

x
object of class "seas"

Value

  • qs returns the QS statistics for seasonality of input and output series and the corresponding p-values.

    spc returns the content of the .spc file, i.e. the specification as it is sent to X-13ARIMA-SEATS. Analyzing the spc output is useful for debugging.

    fivebestmdl returns the five best models as chosen by the BIC criterion. It needs the automdl spec to be activated (default). If it is not activated, the function tries to re-evaluate the model with the automdl spec activated.

    arimamodel retrurs the structure of a the ARIMA model, a numerical vector of the form (p d q)(P D Q), containing the non-seasonal and seasonal part of the ARIMA model.

References

Vignette with a more detailed description: http://cran.r-project.org/web/packages/seasonal/vignettes/seas.pdf

Wiki page with a comprehensive list of R examples from the X-13ARIMA-SEATS manual: https://github.com/christophsax/seasonal/wiki/Examples-of-X-13ARIMA-SEATS-in-R

Official X-13ARIMA-SEATS manual: http://www.census.gov/ts/x13as/docX13AS.pdf

See Also

seas for the main function.

plot.seas, for diagnostical plots.

out, for accessing the full output of X-13ARIMA-SEATS.

Examples

Run this code
m <- seas(AirPassengers)

qs(m)
spc(m)
fivebestmdl(m)
arimamodel(m)

# if no automdl spec is present, the model is re-evaluated
m2 <- seas(AirPassengers, arima.model = "(0 1 1)(0 1 1)")
spc(m2)           # arima overwrites the automdl spec
fivebestmdl(m2)   # re-evaluation with automdl

# more diagnostical statistics with R functions
shapiro.test(resid(m))  # no rejection of normality
Box.test(resid(m), lag = 24, type = "Ljung-Box")  # no auto-correlation

# accessing the full output (see ?out)
out(m)
out(m, search = "Ljung-Box")

Run the code above in your browser using DataLab