Description Usage Arguments Value Author(s) References Examples

This function modifies the Box.test function in the stats package, and it computes the Ljung-Box or Box-Pierce tests checking whether or not the residuals appear to be white noise.

1 2 |

`model` |
model fit from the arima function |

`lag` |
number of lags of the autocorrelation of the residuals to be included in the test statistic. (default=12) |

`type` |
either Ljung-Box or Box-Pierce |

`no.error` |
a system variable; normally it is not changed |

`omit.initial` |
if true, (d+Ds) initial residuals are omitted from the test |

a list:

`statistics` |
test statistic |

`p.value` |
p-value |

`parameter` |
d.f. of the Chi-square test |

`lag` |
no of lags |

Kung-Sik Chan, based on A. Trapletti's work on the Box.test function in the stats package

Box, G. E. P. and Pierce, D. A. (1970), Distribution of residual correlations in autoregressive-integrated moving average time series models. Journal of the American Statistical Association, 65, 15091526.

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

1 2 3 |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.