Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

LBQPlot

Plot Ljung-Box Test P-value vs Lag


Description

The Ljung-Box portmanteau p-value is plotted vs lag.

Usage

LBQPlot(res, lag.max = 30, StartLag = k + 1, k = 0, SquaredQ = FALSE)

Arguments

res

residuals

lag.max

maximum lag

StartLag

starting lag

k

number of AR parameters fit

SquaredQ

default, SquaredQ = FALSE, regular autocorrelations. If SquaredQ = TRUE use autocorrelations of squared residuals.

Value

Plot is produced as a side-effect. No output

Note

This function is normally invoked when plot.FitAR is used.

Author(s)

A.I. McLeod and Y. Zhang

References

Ljung, G.M. and Box, G.E.P. (1978) On a measure of lack of fit in time series models. Biometrika 65, 297-303.

McLeod, A.I. and Zhang, Y. (2006). Partial autocorrelation parameterization for subset autoregression. Journal of Time Series Analysis, 27, 599-612.

See Also

Examples

#fit subset AR and plot diagnostic check
 out<-FitAR(SeriesA, c(1,2,7), ARModel="ARp")
 res<-resid(out)
 LBQPlot(res)
#note that plot produces LBQPlot and RacfPlot
 plot(out)

FitAR

Subset AR Model Fitting

v1.94
GPL (>= 2)
Authors
A.I. McLeod, Ying Zhang and Changjiang Xu
Initial release
2013-03-15

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.