Autoregressive (AR) model using the maximum likelihood criterion in the pandas dataframe: correlate () received an unexpected keyword argument "old behavior"

I have a subset of the pandas frame that contains time series that I want to parse using the AR or ARIMA model using statsmodel:

data_sci = H_Clinton_social_vector.Florida

The data is as follows:

Date
    2015-09-28     587
    2015-10-05     582
    2015-10-12     606
    2015-10-19     698

My AR model is created this way by aggregating time series weekly:

ar_model = sm.tsa.AR(data_sci, freq='W')
ar_model
<statsmodels.tsa.ar_model.AR at 0x1178f5490>

Then I want to perform a maximum likelihood assessment (MLE) of AR parameters with a margin of six months:

ar_res = ar_model.fit(maxlag=26, method='mle')

I get the following results:

correlate() got an unexpected keyword argument 'old behavior'

I don’t understand what the problem is, which I believe is related to automatic data correlation due to the correlation argument (). My data has a high autocorrelation, so this should be fine.

data set autocorrelation

stasmodels AR ARIMA .

+4
2

statsmodel numpy 1.10. stasmodel, ( NumPy), - Github.

-, , stasmodels :

Python >= 2.6, including Python 3.x
NumPy >= 1.5.1
SciPy >= 0.9.0
Pandas >= 0.7.1
Patsy >= 0.3.0

, Cython >= 20.1, . Uncompress, :

python setup.py install

statsmodel Github stasmodel:

python setup.py install

:

Cythonizing sources
Processing statsmodels/nonparametric/_smoothers_lowess.pyx
Processing statsmodels/nonparametric/linbin.pyx
Processing statsmodels/tsa/kalmanf/kalman_loglike.pyx
Processing statsmodels/tsa/statespace/_statespace.pyx.in

... statsmodel. AR , , .

+5

numpy 1.9.2 , . np.correlate() _presample_varcov, statsmodels.tsa.armodel .

numpy multiarray.correlate() (old behavior) 1.10 2015 (. docs), statsmodels (0.6.1 2014 ).

+2

Source: https://habr.com/ru/post/1620943/


All Articles