Skip to content

WIP ENH: Mixed mixin2 - #5502

Open
josef-pkt wants to merge 2 commits into
statsmodels:mainfrom
josef-pkt:mixed_mixin2
Open

josef-pkt wants to merge 2 commits into
statsmodels:mainfrom
josef-pkt:mixed_mixin2

Conversation

@josef-pkt

@josef-pkt josef-pkt commented Feb 16, 2019 •

Copy link
Copy Markdown
Member

new PR. replaces #3030

MixedMixin for random effects in MLE models, GLM and discrete

This version still uses a local uncommitted copy of the initial Halton sequence. That needs to be replaced by the halton sequence in master.

no unit tests, but examples in a gist notebook

see also an alternative implementation for MixedGLM #2516 (open unfinished GSOC project)

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage decreased (-0.2%) to 84.348% when pulling 8b007be on josef-pkt:mixed_mixin2 into db49000 on statsmodels:master.

@jbrockmendel

Copy link
Copy Markdown
Contributor

If this replaces #3030, can that be closed? Doing so would make it easier for would-be reviewers to triage.

@josef-pkt josef-pkt modified the milestones: 0.11, josef Oct 5, 2019
@josef-pkt

Copy link
Copy Markdown
Member Author

found my notebook again
mixed_poisson_updated.ipynb

class PoissonMixed2(MixedMixin, Poisson):
    pass

class LogitMixed2(MixedMixin, Logit):
    pass

class ProbitMixed2(MixedMixin, Probit):
    pass

class GLMMixed2(MixedMixin, GLM):
    pass

@josef-pkt

josef-pkt commented Feb 16, 2022 •

Copy link
Copy Markdown
Member Author

AFAIR: I used (tried out) 3 version for integration w.r.t. mixing distribution

  • halton
  • gaussian quadrature (not adaptive)
  • finite class distribution (fixed number of discrete points)

all use a finite number of integration points, but choice of points and probs differ across methods.

I see halton in the code but not the others.
???

multivariate integration might not be properly supported, i.e. it uses separate integrals for independent random effects.
no multivariate halton AFAIR

example code for gause-hermite quadrature is in #5499 (with copy of my script)

@josef-pkt

Copy link
Copy Markdown
Member Author

aside:
ivpoisson (? IIRC), etpoisson in Stata use gaussian quadrature to integrate out correlated effect using full MLE following Terza
That should be similar to numerically integrated loglikeobs in this case. (however it's conditioning on the selection model.)
HeckPoisson ?

@josef-pkt josef-pkt modified the milestones: josef, 0.14 Feb 17, 2022
@josef-pkt josef-pkt mentioned this pull request Feb 17, 2022
16 of 20 tasks
@josef-pkt josef-pkt modified the milestones: 0.14, 0.15 Nov 30, 2022
@josef-pkt

josef-pkt commented Mar 31, 2023 •

Copy link
Copy Markdown
Member Author

gist notebook https://gist.github.com/josef-pkt/6b6e35e325ff02ee8217
updated version: https://gist.github.com/josef-pkt/05686726e9ca9def9adaea09acf091a8
mixed_poisson.ipynb but includes logit and probit

I don't see any part that uses gauss-hermite quadrature (quick skimming an search)

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants