-
Notifications
You must be signed in to change notification settings - Fork 24
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
enh: specify models using patsy formulas #32
Comments
this is something we talked about a couple of years ago, but i don't think patsy was quite mature enough then. ljwolf may have worked on this. i'm all for it, also to make sure the new panel stuff we are working on conforms. probably need a hangout to agree on API. |
awesome. I'll start some experiments as a proof of concept, then maybe we can circle back on some API choices |
This is awesome, @knaaptime. As Luc said, we talked about this at some point, and also about changing the way we show the results. I tend to always favor a single API that takes both structures. This is how I am currently working for panels: the code can take data in either long or wide formats. It’s just a matter of a try/except statement to figure out what to do. So my initial feeling is that a “don’t ask, just do” approach is better. But it would be great to further discuss this over a hangout! |
Yeah, I recall writing a prototype back in 2016, and we couldn't agree on whether it should be a separate constructor (like... ML_Lag.from_formula()) or a separate module with different inits (like spreg.formula.ML_Lag), and how to deal with the instrumental variable formulas. I like .from_formula(), and I think having an instrumental variables equation like nlm in R makes sense, more than extending the patsy grammar. |
not only is there a potential issue with spatial lags, there are also regime variables. how would those fit into the patsy syntax? |
I was thinking that, or even in |
I think it would be a major boon to usability to allow users to specify models using patsy formulas with geodataframes.
It looks like integrating it would be pretty straightforward, and I'm happy to get it started if it would be a welcome addition, so wanted to raise for discussion:
The text was updated successfully, but these errors were encountered: