From 7bd2e8a929e1b77bcc1006e6a3eee68fe239b1cb Mon Sep 17 00:00:00 2001 From: Debian Science Maintainers Date: Wed, 30 Nov 2022 21:29:37 +0000 Subject: [PATCH] Avoid NaN crash in test_structural Out-of-range frequency.cycle starting values make untransform_params return NaN, which crashes summary() Author: Rebecca N. Palmer Forwarded: no Gbp-Pq: Name fix_test_bounds.patch --- .../tsa/statespace/tests/results/results_structural.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/statsmodels/tsa/statespace/tests/results/results_structural.py b/statsmodels/tsa/statespace/tests/results/results_structural.py index 61e3580..f731eac 100644 --- a/statsmodels/tsa/statespace/tests/results/results_structural.py +++ b/statsmodels/tsa/statespace/tests/results/results_structural.py @@ -291,12 +291,15 @@ lltrend_cycle_seasonal_reg_ar1_approx_diffuse = { # Monthly frequency dataset {'level': 'lltrend', 'autoregressive': 1, 'cycle': True, 'stochastic_cycle': True, 'seasonal': 4, 'autoregressive': 1, - 'exog': True, 'mle_regression': False, 'freq': 'MS'}, + 'exog': True, 'mle_regression': False, 'freq': 'MS', + 'cycle_period_bounds': (1.5*4, 12*4)}, + # explicit cycle_period_bounds needed because the default *12 + # makes start_params out of range # Minutely frequency dataset {'level': 'lltrend', 'autoregressive': 1, 'cycle': True, 'stochastic_cycle': True, 'seasonal': 4, 'autoregressive': 1, 'exog': True, 'mle_regression': False, 'freq': 'T', - 'cycle_period_bounds': (1.5*12, 12*12)}, + 'cycle_period_bounds': (1.5*4, 12*4)}, ], 'params': [0.0001, 0.01, 0.06, 0.0001, 0.0001, 0.1, 2*pi / 10, 0.2], 'start_params': [0.0001, 0.01, 0.06, 0.0001, 0.0001, 0.1, 2*pi / 10, 0.2], -- 2.30.2