Test for Serial Correlation
Generate random sample of an ARProcess.
The estimated correlation function slowly decreases as a function of lag.
Out[2]= | |
Test for serial correlation up to lag 10.
Out[3]= | |
The tests confirm that data is serially correlated.
Out[4]= | |
Now generate a random sample from a GARCHProcess.
The values of the estimated correlation function at nonzero lags are very small.
Out[6]= | |
Check the first path with the AutocorrelationTest.
Out[7]= | |
Out[8]= | |
There is no serial correlation, but the slices are not independent.
Check the independence between the slice at time zero and the four following slices using Hoeffding's independence test.
Show scattered plots of slice values at time zero and at other times and the conclusions of the test.
show complete Wolfram Language inputhide input
Out[12]= | |