Repository navigation
ENH: diagnostic, post-estimation for binary, multinomial and ordinal models - #7094
Conversation
|
Hello @josef-pkt! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found: There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2020-11-18 22:12:48 UTC |
e90f5fe to
2e9affa
Compare
|
HL after MNLogit close to but small differences to Stata mlogitgof something strange, if I negate the sort_var, then chi2 statistic changes, when using quicksort using stable sort: sort_var is complement of prob of 1st/reference category sort_var is prob of 1st/reference category |
|
nice, one line to add estimate of noncentrality parameter and confint to hosmer-lemeshow |
|
internal names chi2_stat is linear in nobs, i.e. nobs times the probability version. what's the interpreation chisquare statistic computed for an individual groups? I'm not clear right now what the normalization should be. I would like to have a partial decomposition of the overall chisquare by groups. One possibility is to use a normalized noncentrality parameter, i.e. nc / nobs. TBC |
|
ok, It looks like my confusion was because I didn't distinguish limiting behavior under null or under an alternative under null
under alternative
also chisquare rvs are additive |
|
CI in |
|
playing a bit with multinomial model good for plot and finding "outliers" not clear to me yet: Analogy is Mahalanobis distance in multivariate model/sample, e.g. issues or PRs (?) on outlier detection in mv-samples and robust cov estimation. Problem also here is that a single observation (one multinomial choice, n=1) doesn't justify asymptotic chisquare distribution. (I haven't done any literature search for diagnostic residuals for multinomial.) |
|
R code, assuming csv file is in working directory |
|
Stata code (history including commands not needed) for HL logit note for ologit and mlogit (history including commands not needed) notes |
|
no update in more than a month merging when it comes back green. I need to start the next round. |
|
I forgot to add |
|
AFAICS, there is no stats._diagnostic_multinomial (unless it's uncommitted in an old checkout) prob_larger_ordinal_choice and other multinomial helper functions are in stats.diagnostic_gen, included in this PR |
getting started with more diagnostics and postestimation
Hosmer-Lemeshow gof test,
multinomial support stats functions
stochastic larger
P(x < y) + 0.5 P(x=y)helper functions#7069 extension to ordered model
#1190 diagnostic after discrete, GLM
...