Exemplo n.º 1
0
def test_autoreg_score():
    data = sm.datasets.sunspots.load_pandas()
    ar = AutoReg(np.asarray(data.endog), 3, old_names=False)
    res = ar.fit()
    score = ar.score(res.params)
    assert isinstance(score, np.ndarray)
    assert score.shape == (4, )
    assert ar.information(res.params).shape == (4, 4)
Exemplo n.º 2
0
def test_autoreg_score():
    data = sunspots.load_pandas()
    ar = AutoReg(np.asarray(data.endog), 3)
    res = ar.fit()
    score = ar.score(res.params)
    assert isinstance(score, np.ndarray)
    assert score.shape == (4, )
    assert ar.information(res.params).shape == (4, 4)
    assert_allclose(-ar.hessian(res.params), ar.information(res.params))