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

Generalised Additive Mixed Model #6211

Open
TomKealy opened this issue Oct 25, 2019 · 2 comments
Open

Generalised Additive Mixed Model #6211

TomKealy opened this issue Oct 25, 2019 · 2 comments

Comments

@TomKealy
Copy link

TomKealy commented Oct 25, 2019

Is your feature request related to a problem? Please describe

I want to reproduce the GAMM portion of this post:

https://petolau.github.io/Analyzing-double-seasonal-time-series-with-GAM-in-R/

as the R function gamm currently has no python equivalent. Since this is a broad class of models which currently has no equivalent and since you already have GLMGam functionality, this could be a good addition to statsmodels.

Describe the solution you'd like

I volunteer to produce this!

We could extend the Linear Mixed Model class like the GLM class has been extended for statsmodels.gam.GLMGam.

Describe alternatives you have considered

Since gamm has no python coverage, there is no alternative solution

Additional context

I will volunteer to produce this feature, but I will need some guidance.

@josef-pkt
Copy link
Member

Do you have a single time series or panel/longitudinal data?

AFAIC, our mixed model does not handle AR error correlation.
It won't be the best model to handle time series data.

I don't know how difficult it would be to add penalized splines to Mixed model, i.e. how to get to a general GAMM version.
I can help with any parts related to penalized splines.

@kshedden
Copy link
Contributor

I looked at this closely back in May. I made some updates in #5898 specifically to begin this process. But I didn't have time to work on it after than point. It will require deep familiarity with this very complicated code to add this feature.

We have totally separate codebases for mixed linear and mixed GLM. The latter uses a non-standard variational Bayes fitting approach. I have not thought at all about adding GAM features to our mixed GLM.

@josef-pkt josef-pkt changed the title Generalised Additive Mixted Model Generalised Additive Mixed Model Oct 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants