test_seasonal_simplification
Test whether seasonal harmonics can be dropped from a time series model via a joint likelihood ratio test. Compares restricted and unrestricted fits to check if the harmonics are jointly significant.
Instructions
Joint LR test for eliminating seasonal harmonics: H₀: cos_k = sin_k = 0.
Fits a restricted model with the specified harmonics fixed to zero and computes LR = 2·(L_free − L_restricted) ~ χ²(df), where df = number of constrained parameters (2 per regular harmonic, 1 for Nyquist/alter).
Typical workflow after seasonal_param_analysis:
Pass the k values with |t| ≤ 2 in both cos and sin as freq_list.
If LR < χ²(df, 5%): safely remove those harmonics and refit.
If LR ≥ χ²(df, 5%): the harmonics are jointly significant — keep them.
Parameters
inp_path : path to a fitted .inp or .pre file freq_list : harmonic indices to test (None = test all harmonics jointly) alpha : significance level (default 0.05)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| alpha | No | ||
| inp_path | Yes | ||
| freq_list | No |