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
ENH/Design: GLM - add endog type (discrete, continuous, family) specific results statistics #7687
Some results statistics in GLM are only available for some types of endog or some families.
We should find a way to add them to the results class as family dependent results.
standard prediction table only makes sense in binary, possibly multinomial, case ENH: adding pred_table to GLM, closes #1653 #6252,
(Hosmer lemeshow/ binned cases work on predicted probabilities not classification choice)
specification tests for specific families, e.g. Poisson specific overdispersion tests. or binomial specific once we have them
for simple cases like adding McFadden pseudo R2, we need a flag for discrete distributions.
In many cases we fix scale=1 for the same list of cases.
Tweedie is for mixed type, continuous with a mass point. For McFadden pR2 this means it is not discrete.
We can have a consistent interface if we add generic methods names like get_diagnostic and we return an instance of family/type specific classes.
This avoids special case methods like pred_table, that apply only in some cases, and would be noise in others. We avoid instance methods as much as possible to avoid pickling problems.
I'm not planning to black out (set to nan or raise) Likelihood statistics for QMLE cases, e.g. when using Poisson for continuous endog.
In the current setting, there is no clear indication that users want QMLE, except for adjusting wald_test with robust cov_type.
I don't think it's good to broaden cov_type to the interpretation to general is_misspedified = True.
(e.g. HC, overdispersion, heteroscedasticity could mean something like negbin instead of poisson and not continuous distribution on R+ instead of discrete.)
R has explicit quasi-poisson family for over- or excess dispersion, and, AFAIR, Stata has now QMLE for continuous variables based on Binomial/Binary and Poisson, e.g. for continuous fractions.
"intpf" non-negative integers with finite domain, e.g. Binomial, Beta-Binomial
**not clear: **
These are basically multinomial, structure comes from model parameterization, can be multivariate.
But we are starting to have some diagnostics specific to those.
categorical
ordinal
do we need a specific distribution for binary?
Bernoulli
Ordinal and Bernoulli are essentially implemented as interval censored rv. That's a modifier, and not a basic distribution.
Similarly, DiscretizedCount.
need also, (not sure what generic support we get for those)
mixed discrete-continuous: Tweedie. Zero-Inflated Beta, left or right censored
but inflation and censoring is a modifier, not a basic distribution
For modifiers, we have the choice between adding those to dfamilies or to the model.
e.g. is censoring handled in the model.loglike or in the dfamily.loglike.
aside: if we need derivatives for cdf (for censoring), then, I guess, they should go into the dfamily.
AFAIR, currently binomial/ordinal censoring uses fixed scale.
model candidate to check: ordinal with heteroscedasticity.
What derivatives do we need for censored weibull and gaussian/Tobit?
Activity
josef-pkt commentedon Sep 4, 2021
I'm not planning to black out (set to nan or raise) Likelihood statistics for QMLE cases, e.g. when using Poisson for continuous endog.
In the current setting, there is no clear indication that users want QMLE, except for adjusting wald_test with robust cov_type.
I don't think it's good to broaden cov_type to the interpretation to general
is_misspedified = True.(e.g. HC, overdispersion, heteroscedasticity could mean something like negbin instead of poisson and not continuous distribution on R+ instead of discrete.)
R has explicit quasi-poisson family for over- or excess dispersion, and, AFAIR, Stata has now QMLE for continuous variables based on Binomial/Binary and Poisson, e.g. for continuous fractions.
josef-pkt commentedon Sep 8, 2021
example plots
#7687 for binary
i.e in GLM plots we need to distinguish by type of endog, binary, count, continuous, mixed/tweedie
josef-pkt commentedon Oct 12, 2021
I'm starting with dfamilies for #7778
codes/names by domain of endog
I started dfamilies for most of the following
**not clear: **
These are basically multinomial, structure comes from model parameterization, can be multivariate.
But we are starting to have some diagnostics specific to those.
do we need a specific distribution for binary?
Ordinal and Bernoulli are essentially implemented as interval censored rv. That's a modifier, and not a basic distribution.
Similarly, DiscretizedCount.
need also, (not sure what generic support we get for those)
For modifiers, we have the choice between adding those to dfamilies or to the model.
e.g. is censoring handled in the model.loglike or in the dfamily.loglike.
aside: if we need derivatives for cdf (for censoring), then, I guess, they should go into the dfamily.
AFAIR, currently binomial/ordinal censoring uses fixed scale.
model candidate to check: ordinal with heteroscedasticity.
What derivatives do we need for censored weibull and gaussian/Tobit?