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
FAQ-D/REF: data handling for multiple exog, multi-part models #3903
I have no idea what the best current approach is to handle a second exog.
AFAIK this has not been systematically added to model and might need refactoring.
MixedLM.from_formula also has special, model specific code to handle the extra exog formula re_formula
cases:
The problem at the moment is that zero-inflated PR #3755 does not have full support for this, and it's not obvious how to add it.
Other models like IV2SLS don't allow formulas for instruments, but there the instruments are not in the param_names.
Several other multipart models are in PRs or in planning.
another issue: How are other exog treated in llnull?
example zero inflated or model with a second parameter specified as linear combination of some exog.
If I add the second exog, exog_infl to _get_init_kwds, then the full second exog would be used in llnull. Instead we only want to use a constant also in the second exog. This happens if the second exog is None, i.e. the default.
I don't know how general this is. E.g whether llnull in MixedLM includes any of the extra exog.
similar unresolved/notimplemented in HetGLS: How does it work there? that model code is old.
similar question in heckman or two stage models like IV. In that case 1st stage will not matter because we don't have an endogenous variable in the Null model.
(workaround in count models: use specific llnull method that is already in DiscreteResults, and add another keyword _null_keys_drop or _exog_other_keys. I don't know which other use cases the extra list of keys would have.)
currently not supported in zero-inflated models.
The general exog handling can be delegated to the sub-models, model_main and model_infl in zero-inflated. However, this does not go through the common missing handling, i.e. if there are missing different missing values in the two submodels, then this will break. (I think I don't fix this now in #3908)
What's the pattern to get both pandas handling of separate exog or separate submodels and joint missing handling without a lot of spaghetti code?
Activity
josef-pkt commentedon Sep 6, 2017
another issue: How are other exog treated in llnull?
example zero inflated or model with a second parameter specified as linear combination of some exog.
If I add the second exog,
exog_inflto_get_init_kwds, then the full second exog would be used in llnull. Instead we only want to use a constant also in the second exog. This happens if the second exog is None, i.e. the default.I don't know how general this is. E.g whether llnull in MixedLM includes any of the extra exog.
similar unresolved/notimplemented in HetGLS: How does it work there? that model code is old.
similar question in
heckmanor two stage models like IV. In that case 1st stage will not matter because we don't have an endogenous variable in the Null model.(workaround in count models: use specific llnull method that is already in DiscreteResults, and add another keyword
_null_keys_dropor_exog_other_keys. I don't know which other use cases the extra list of keys would have.)josef-pkt commentedon Sep 6, 2017
missinghandling:currently not supported in zero-inflated models.
The general exog handling can be delegated to the sub-models, model_main and model_infl in zero-inflated. However, this does not go through the common missing handling, i.e. if there are missing different missing values in the two submodels, then this will break. (I think I don't fix this now in #3908)
What's the pattern to get both pandas handling of separate exog or separate submodels and joint missing handling without a lot of spaghetti code?