powered by
LjungBoxPierceTest
LjungBoxPierceTest determines the test statistic and p values for several lags for a residual series
LjungBoxPierceTest(y, n.par = 0, maxlag = 48)
the series of residuals, a vector or a time series
number of parameters which had been estimated
maximal lag up to which the test statistic is computed, default is maxlag = 48
BT matrix with columns: lags, degrees of freedom, test statistic, p-value
# NOT RUN { data(COFFEE) out <- arima(COFFEE,order=c(1,0,0)) BT <- LjungBoxPierceTest(out$residuals,1,20) # }
Run the code above in your browser using DataLab