Skip to content

ENH/SUMM: diagnostics for Logit/binary/binomial #7719

Open

Description

@josef-pkt

We don't have an issue specific for diagnostics for Logit, binary or binomial. I read Binomial articles mainly to understand GLM diagnostics.
Also, I want to park two R packages below, that look useful based on their docs. I haven't looked much at details yet.

  • gof, hosmer-lemeshow type, ...
  • residual diagnostics
  • plots
  • predictive evaluation measures, classification
  • influence outlier, generic GLM
  • specification tests like RESET test, score tests dispersion, (artificial) variable added, ...
    mostly generic GLM, special link function tests for [0, 1] links, cdflinks

related issues, e.g. https://github.com/statsmodels/statsmodels/issues?q=+is%3Aopen+logit+label%3Atopic-diagnostic+

package rms
https://stats.stackexchange.com/a/207512/14187
strange question with negative weights https://stats.stackexchange.com/questions/160638/should-i-distrust-the-g-o-f-for-a-logistic-regression-with-weights-perfomed-with
https://cran.r-project.org/web/packages/rms/rms.pdf
blog post overview examples for rms https://www.nicholas-ollberding.com/post/an-introduction-to-the-harrell-verse-predictive-modeling-using-the-hmisc-and-rms-packages/

package LogisticDx
https://cran.r-project.org/web/packages/LogisticDx/LogisticDx.pdf
hasn't been updated since 2015, looks like it has a good list of Binomial diagnostics.
From the docstrings it is not clear what is for Bernoulli/binary and what assumes counts binomial.
Much seems to be for discrete exog, finite number of unique exog.
(2 issues https://github.com/dardisco/LogisticDx 1 bug, 1 explanation of difference in HL to Stata and book)

Activity

  1. added this to the 0.14 milestone on Sep 12, 2021
  2. josef-pkt commented on Mar 20, 2023

    @josef-pkt
    MemberAuthor

    parking a reference

    Cramer, J. S. “Robustness of Logit Analysis: Unobserved Heterogeneity and Mis-Specified Disturbances*.” Oxford Bulletin of Economics and Statistics 69, no. 4 (2007): 545–55. https://doi.org/10.1111/j.1468-0084.2007.00445.x.

    marginal effect is not affected by unobserved orthogonal heterogeneity (references Wooldridge for Probit)

    I think or guess:
    essentially we have a link misspecification, but parameter estimates compensate for the misspecification to get a differently parameterized equivalent solution.
    The article shows this for marginal effect, but I think it should also be true for predicted mean.
    (attenuated parameters account for Jensen's inequality ??? for conditional expectation but marginal for heterogeneity.)

    e.g. probit with normal heterogeneity is just a latent normal variable with larger variance than 1.
    If distribution of heterogeneity differs from the model latent error distribution, then the link function should be misspecified, unobserved error of latent variable would be sum of two distribution that are not in the same family.

    Can we use this for some diagnostics?

    related aside:
    Where is the diagnostic test for heteroscedasticity? Variance of latent error is not constant across observations or depends on exog.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions