tsdiag: Diagnostic Plots for Time-Series Fits

Description Usage Arguments Details Value See Also Examples

Description

A generic function to plot time-series diagnostics.

Usage

1
tsdiag(object, gof.lag, ...)

Arguments

object

a fitted time-series model

gof.lag

the maximum number of lags for a Portmanteau goodness-of-fit test

...

further arguments to be passed to particular methods

Details

This is a generic function. It will generally plot the residuals, often standardized, the autocorrelation function of the residuals, and the p-values of a Portmanteau test for all lags up to gof.lag.

The methods for arima and StructTS objects plots residuals scaled by the estimate of their (individual) variance, and use the Ljung–Box version of the portmanteau test.

Value

None. Diagnostics are plotted.

See Also

arima, StructTS, Box.test

Examples

1
2
3
4
5
6
7
8
9
require(graphics)

fit <- arima(lh, c(1,0,0))
tsdiag(fit)

## see also examples(arima)

(fit <- StructTS(log10(JohnsonJohnson), type = "BSM"))
tsdiag(fit)

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.