Calculate the BDS test statistic for independence of a time series
Parameters: | x : 1d array
max_dim : integer
epsilon : scalar, optional
distance : scalar, optional
|
---|---|
Returns: | bds_stat : float
pvalue : float
|
Notes
The null hypothesis of the test statistic is for an independent and identically distributed (i.i.d.) time series, and an unspecified alternative hypothesis.
This test is often used as a residual diagnostic.
The calculation involves matrices of size (nobs, nobs), so this test will not work with very long datasets.
Implementation conditions on the first m-1 initial values, which are required to calculate the m-histories: x_t^m = (x_t, x_{t-1}, ... x_{t-(m-1)})