Exemple #1
0
def test_resid_rename_warnings_ar():
    model = ARModel(design=X, rho=0.4)
    results_ar = model.fit(Y)
    with pytest.warns(FutureWarning, match="'resid'"):
        assert_array_equal(results_ar.resid, results_ar.residuals)
    with pytest.warns(FutureWarning, match="'wresid"):
        assert_array_equal(results_ar.wresid, results_ar.whitened_residuals)
Exemple #2
0
def test_AR_degenerate():
    Xd = X.copy()
    Xd[:, 0] = Xd[:, 1] + Xd[:, 2]
    model = ARModel(design=Xd, rho=0.9)
    results = model.fit(Y)
    assert results.df_residuals == 31
Exemple #3
0
def test_AR_degenerate():
    Xd = X.copy()
    Xd[:, 0] = Xd[:, 1] + Xd[:, 2]
    model = ARModel(design=Xd, rho=0.9)
    results = model.fit(Y)
    assert_equal(results.df_resid, 31)
Exemple #4
0
def test_AR():
    model = ARModel(design=X, rho=0.4)
    results = model.fit(Y)
    assert results.df_residuals == 30
    assert results.residuals.shape[0] == 40
    assert results.predicted.shape[0] == 40
Exemple #5
0
def test_AR():
    model = ARModel(design=X, rho=0.4)
    results = model.fit(Y)
    assert_equal(results.df_resid, 30)