HH (version 2.2-17)

gof.calculation: Calculate Box--Ljung Goodness of Fit for ARIMA models in S-Plus.

Description

Calculate Box--Ljung Goodness of Fit for ARIMA models in S-Plus. In R we use the Box.test function.

Usage

gof.calculation(acf.list, gof.lag, n, n.parms)

Arguments

Value

See the gof value described in#ifndef S-Plus arima.diag #endif #ifdef S-Plus arima.diag #endif in S-Plus.

Details

This function is isolated from the S-Plus arima.diag function. It is used only in S-Plus.

See Also

#ifndef S-Plus arima.diag #endif #ifdef S-Plus arima.diag #endif in S-Plus.

Examples

Run this code
if.R(s={
co2.arima <- arima.mle(co2, list(list(order=c(0,1,1)),
                                 list(order=c(0,1,1), period=12)))
co2.acf <- acf(resid(co2.arima), plot=FALSE, lag=40)
co2.gof <- gof.calculation(co2.acf, 36, length(co2), 2)
xyplot(p.value ~ lag, data=co2.gof, panel=panel.gof,
       ylim=range(0, co2.gof$p.value))
},r={})

Run the code above in your browser using DataCamp Workspace