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: score_test for multi-link and multi-parameter (multi distribution args) models #7821
availability of restricted params and full, unrestricted score and hessian
this is independent of the composition of params, and would also work for multilink models
However, one of the ways to compute restricted params is fit_constrained which currently does not work for models with extra params or multi-links.
variable addition score tests with score and hessian constructed from the score_factor and hessian_factor
This currently works only for one-parameter models like GLM, for which score_factor and hessian_factor are 1-dim.
For models with several links/exog or with extra_params, score and hessian need multiple derivatives and factors.
This is currently not implemented.
Models with extra params that are constant, e.g. NegBin and GPP
We need to extend score_test for the mean model. However,
If the constant extra-params case is the null model, then we could test exog dependent, varying parameter as in the multi-link case.
Multi-link models: Models with exog dependent dispersion or scale, BetaModel and #7793
One possible specification test is testing that scale (extra params) is constant, i.e. coefficients of (slope) explanatory variables are zero.
Implementation would need to handle multiple score_factors and hessian_factors.
Multi-part models: e.g. zero-inflation which uses internally two submodels to delegate to.
Possible specification test: constant versus varying, exog-dependent zero-inflation.
Implementation may be able to delegate to submodels. #7597 includes specification test for poisson about poisson versus zero-inflated or zero-modified poisson
One problem for multi-link model is that we have different exog with inconsistent names across models.
We need to find a way to specify which link/exog gets the exog_xxx_extra.
I guess we need to delegate some parts to the specific model.
The variable addition usecase is important enough to do some extra work for it.
I guess, we will have a similar problem extending fit_constrained to multi-link, multi-exog models if we follow the current pattern of exog transformation. (maybe switching to constrained optimizers will be simpler)
Also, using the transformation approach does not allow "cross-equation" restrictions when we have multiple exog
another design question: Do we append extra score/hess at the end or insert next to model exog_xxx?
I guess inserting is easier if we reuse or follow the pattern of model score_obs and hessian.
Appending at the end would be more useful when we split into new and old moment conditions.
Activity
josef-pkt commentedon Nov 23, 2021
One problem for multi-link model is that we have different exog with inconsistent names across models.
We need to find a way to specify which link/exog gets the exog_xxx_extra.
I guess we need to delegate some parts to the specific model.
The variable addition usecase is important enough to do some extra work for it.
I guess, we will have a similar problem extending
fit_constrainedto multi-link, multi-exog models if we follow the current pattern of exog transformation. (maybe switching to constrained optimizers will be simpler)Also, using the transformation approach does not allow "cross-equation" restrictions when we have multiple exog
another design question: Do we append extra score/hess at the end or insert next to model exog_xxx?
I guess inserting is easier if we reuse or follow the pattern of model score_obs and hessian.
Appending at the end would be more useful when we split into new and old moment conditions.
josef-pkt commentedon Apr 19, 2023
reference and comments on generalized residuals (score_factor)
#7897 (comment)