Repository navigation
Description
This is a specific part of #5342 #5342 (comment)
I have difficulty to figure out how design_info, param_names and similar are handled in base model.
Essentially, I don't see where and by what code things get attached to a model or model.data instance.
My example is GLMGAM, where I tried to get formula and data handling exog_linear separate from the spline components in exog. But I don't understand why we have have attributes that I thought shouldn't be there and why some attributes like exog_names are not what I think they should be.
example
from_formula adds kwargs in the call to the class __init__. Any extra kwargs are attached to the model, except 'design_info', 'formula' are explicitly excluded in base.model.Model._handle_data.
It would be better to check this on a simple example because GLMGAM has too many other moving parts that affect the behavior.
The basic idea
- We use our standard data and formula handling for the core exog, but not for the
exog_extra. - transformation in predict, and and maybe constraint creation in wald tests will need extra code to split between the core exog and exog_extra.
I thought this might also be useful for the case with a large number of nuisance dummy variables, but I'm not sure whether it will help for that case. The "absorb" models have possibly a different exog and inference structure.
In the case of this issue, the split between exog_core (?) and exog_extra is an interface and data handling question, the underlying numpy arrays in the model are not affected by this split, i.e. we have full exog, params and cov_params.
Aside: exog in tsa might be similar if/when we support formulas, i.e. we commonly split between user provided exog and internally added trend and other deterministic terms, even though the composition of the full exog is independent of its composition and user interface in the main computation/estimation.
Activity