Learn R Programming

FinTS (version 0.1-17)

autocorTest: Box-Ljung autocorrelation test

Description

Ljung-Box test for autocorrelation

Usage

autocorTest(x, lag=log(length(x)))

Arguments

x
a numeric vector or a univariate time series
lag
the statistic will be based on 'lag' autocorrelation coefficients. Tsay (p. 27-28) says, "Simulation studies suggest that the choice of [lag = log(length(x))] provides better power performance. This general rule needs modification in analy

source

http://faculty.chicagogsb.edu/ruey.tsay/teaching/fts2

Details

This is provided for compatibility with the S-Plus script in Tsay (p. 30).

References

Ruey Tsay (2005) Analysis of Financial Time Series, 2nd ed. (Wiley)

See Also

BoxTest

Examples

Run this code
data(m.ibm2697)
autocorTest(m.ibm2697, 5)

Run the code above in your browser using DataLab