Skip to content

FAQ/FAQ-D: results of derived or transformed models #2407

Open

Description

@josef-pkt

Some models or fit_xxx methods return a results instance where some results have been modified. The modification are in several cases based on an auxiliary model or different parameterization or on parameter restrictions that are not defined within the model that is associated with the results instance.

Typical example: fit_constrained where we estimate a model under constraints but return the results for the original parameterization where the model itself doesn't incorporate the constraint.

What works differently in a derived results instance like this?

  • loglike, score, hessian are for the original model
    • score will not be zero
    • hessian will not be the same as the inverse of appropriately scale normalized_cov_params or nonrobust cov_params_default
    • both score and hessian correspond to the unrestricted model evaluated at the restricted parameters as in a score or Lagrange multiplier test
    • hessian will not be invertible if restrictions where used to impose identification or nonsingular design. (eg. when dropping perfectly collinear variables or using full dummy sets with parameter restrictions) We might still be able to use pinv but I'm not sure when that is (theoretically) appropriate.
  • k_xxx, degrees of freedom will be based on auxiliary model
    • those should depend on k_vars and k_constraints, i.e. effective counts and dof
  • predict should/will work fine in the original exog space and original parameterization
  • wald_tests: should work without problems
    • this is based on the assumption that the reduction/transformation is treated as based on known constraints. (e.g. pinv in OLS is the regularized solution)
    • no concept of estimability is incorporated in the implementation (AFAIU)
    • cov_params should have all restrictions incorporated, cov_params has less than full rank

dangerous things

generic and inherited code that might do the wrong thing

not known yet (insufficient test coverage for non-main results, not enough example cases)

candidates:

  • code that uses score and hessian as if they were for the restricted model
    • get_covparams_robust ?
  • code that uses exog.shape[1] for df_model or the number of effective parameters
  • (internal) if we get code that does something with mle_retvals and mle_settings
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions