Repository navigation
Open
Description
Trying to get an overview of specification and diagnostic tests and plots by model categories.
general
- variable addition score_test
- reset type tests
- PIT type test and plots, gof (continuous versus discrete)
- binned endog space, predictive distribution (chisquare test)
- variance/heteroscedasticity/dispersion tests (most likely model specific)
- nonlinearity, functional form tests (most likely variable addition score or cm tests)
- comparing models, information criteria, likelihood ratio tests, Vuong tests, ...
- ? White test, hausman test, (I did not look at those outside linear models)
- IM ratio ?
- overidentifying restrictions tests (GMM) (not clear which)
- correlation tests ?
- endogeneity tests ?
- nonparametric tests ?
- bootstrap ?
- cross validation ?
- ...
discrete - count
- diagnostic plots (already available)
- excess probability tests (zero-inflation or deflation)
- ...
discrete - binary
- ???
- plots ?
- ...
models without mean parameterization
examples
- accelerated failure time, R+ models
- models for flexible, multi-parameter distributions
- ...
methods
- predictive distribution, aic, ...
- variable addition tests for each distribution parameter, dargs
- no "moment" tests available, but "probability moments" and "quantile moments" (e.g. for binned endog space)
- ...
Implementation
- generic methods (score_test, lm-test, cmt, eventually reusing GMM)
- model specific methods
- this will be a pain to verify because only parts are available in other packages, most likely Monte Carlo verification
- "asymptotically equivalent" methods can be used to cross-check
- generic code will be used by many models and verified in several special cases (which compensate for deficiency of unit tests for generic code)
- get_diagnostic and class hierarchy for diagnostic and specification methods
- some of it will need multi-link models (e.g.
Hetmodels with score test for heteroscedasticity) - some methods will be restricted to models that have methods like results.score_test already implemented
- we can reuse and extend predict and get_prediction
- tools: like variables to add in reset type tests, moment restrictions
- difficult work: choosing defaults and recommendations (which "asymptotically equivalent" method do we use)
- ...
current
- linear model OLS, diagnostic and specification tests
- Count Diagnostic and Poisson: this is my current area to get this started
- ...
Activity
josef-pkt commentedon Dec 13, 2021
rough idea:
return
summaryby diagnostic topice.g.
zero inflation
return basic statistics, frequency, observed number of zeros, and probability of zeros implied by model. (we have confint for prob-zero)
and then hypothesis tests as far as possible.
We could also add CMT for functional form of variance function. e.g. related to power in NBP and GPP and their ZI versions.
This could be similar to reset test but for variance/resid_pearson.
dispersion
basic statistic is pearson chi2, After #7929 all discrete models have resid_pearson
gof
statistics related to predictive distribution.
CountDiagnostic already has gof plots.
Other?
outlier is separate
get_influencetopic and we cannot easily add it to gof or similar topicmean function
we could have a collection of default methods in a summary, e.g. reset score tests and similar.
josef-pkt commentedon Dec 20, 2021
R package that has a list of diagnostic topics
https://cran.r-project.org/web/packages/performance/performance.pdf
I found it in a search for count models, but they don't have much for what I was looking for
zero-inflation is just observed and expected, not a test,
poisson overdispersion is based on Gelman
but topic list looks good, and they have other things besides main diagnostics
They have outlier test including based on cooks_d, but the document doesn't say whether there are model specific definitions.
(only based on brief partial skimming of the doc pdf file)