-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
aic in ar/arima/... #3574
Comments
see #1802 for related issue (and #1733, #1719 and #3514 ) How many parameters are in a model? Do we count scale as a parameter? The main problem is that conventions differ by statistical package and model. Plus we don't want to break backwards compatibility without a good reason. The definition or convention that is implemented in statsmodels often depends on what reference package was used for writing the unit tests during development. (*) We have some differences to Stata where we adjust the unit tests to match Stata when our function doesn't match it because we use different definition, convention or degrees of freedom correction. Related aside: |
related: Given that it is often difficult to judge what the behavior should be, I have a tendency to add options, choose one default but make it possible for users to replicate other packages or other definitions or conventions. |
I don't envy you the task of juggling all of the possible implementations, especially the backward-compatibility part. The handle-it-once approach in ResultMixin is nice, especially the property-like setup. You have definitely given this more thought than I have, so I'm going to stick to trying to figure out the AR[...] case for now and add a few misc comments below. For AR, it looks increasingly like the IC should depend on the estimation method. In fact, there is a For ARMA, it looks like your comment about the variance being estimated might explain the extra +1. For VAR, I think there may be a factor of
The Misc:
This seems like an argument for making
In many cases we have a |
I had forgotten about the constant issue in (aside in another case, cluster robust standard errors, I introduced I need to look at your other comments more carefully, but will be largely offline for the rest of today. |
just as general idea or principle I think VAR and related SVAR, VECM are the outliers here that need special treatment and are mainly least squares estimators right now. (Some parts still use the MLE interpretation, but don't necessarily use a full MLE optimization) |
Related to #3568, I am trying to simplify the AR[...] models and have them inherit some attributes as properties from a general case. There are two inconsistencies I need help understanding.
The aic/bic/hqic are defined slightly differently in ARMAResults, ARResults, and VARResults. The differences can be understood by just looking at aic:
ARResults:
aic = np.log(self.sigma2) + 2 * (df_model+1) / nobs
VARResults:
aic = ld + 2 * (neqs * df_model) / nobs
Here
ld
is analogous tonp.log(self.sigma2)
.ARMAResults:
aic = -2 * llf + 2 * (df_model+1)
In the CSS case,
llf
can be simplified to the point where this is a positive affine transform of the version in ARResults.Finally the actual questions.
Is there a reason not to use a common definition between AR vs ARMA/ARIMA?
If we set neqs=1 in the VAR, we should end up with an AR, but there is an extra 1 unaccounted for. Where did it go?
The text was updated successfully, but these errors were encountered: