Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SUMM: frequency weights, contingency tables, exog with discrete support #2599

Open
josef-pkt opened this issue Aug 24, 2015 · 2 comments
Open

Comments

@josef-pkt
Copy link
Member

objective: better support for datasets that only include categorical exog

motivation: examples like in this http://data.princeton.edu/wws509/stata/c6s5.html have only categorical exog where the data is given in the form of contingency tables.

This would be relatively easy to support if the models had frequency weights fweights.
Related support for the data is mostly available in pandas.

related issues:

...

@josef-pkt
Copy link
Member Author

I'm thinking of using a new model, e.g. OrderedModel or OrdinalModel, for trying out the design for this. with weights and fweights and pandas Categorical support for endog.

@josef-pkt
Copy link
Member Author

implementation idea for fweights:

use new attribute or property wnobs so we don't collide with current nobs.
wnobs could be a property of the model that returns either _wnobs if available or nobs, otherwise we would have to check before usage whether wnobs is available in a model.
The property could be added to LikelihoodModel so it will be inherited automatically.

todo: we still have to check usage of nobs versus len(endog) or exog.shape[0]. I think there is an open issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant