You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
BUG: KalmanFilter.loglike() disagrees with loglikeobs().sum() and result.llf under exact diffuse initialization with concentrated scale #10741
When combining exact diffuse initialization (model.initialize_diffuse()) with concentrated scale (model.filter_concentrated = True), KalmanFilter.loglike() computes a different likelihood from model.loglikeobs().sum(), result.llf, and an unconcentrated model evaluated at the fitted scale (model.fixed_scale(...)).
In a minimal 2-observation, 1-state model:
model.loglike()returns-4.906342`
model.loglikeobs().sum()returns-4.004213`
result.llfreturns-4.004213`
model.fixed_scale(...)returns-4.004213`
This discrepancy (~0.902 log-likelihood units) arises because KalmanFilter.loglike() in kalman_filter.py:
Omits finite innovations occurring during diffuse periods from the quadratic log-likelihood penalty.
Subtracts kfilter.nobs_kendog_diffuse_nonsingular from the finite innovation count instead of adding it.
Does not account for loglikelihood_burn when burn ends inside the diffuse initialization period.
Activity
BUG: include finite exact-diffuse innovations in concentrated loglike
Merge pull request statsmodels#10742 from Swapnil-J20/case30-exact-di…