-
Notifications
You must be signed in to change notification settings - Fork 300
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
Spatiol Temporal Prediction #1254
Comments
Hey @kmirijan! Thanks for the issue. On prediction, we generally suggest people create the predictions themselves. For the models that don't have "lag" in their title, you should be able to construct predictions using the data matrix and the On the other problem, you need to use dummy/one-hot encoded variables to express your year effects the way you request. Check out Finally, you indeed might be using the wrong models. The spatial econometric methods in I'd suggest checking out our book, chapters 11 and 12, for a full treatment treatment and discussion of how you can use geographic methods to improve prediction in other typical prediction-oriented models. |
I've actually been reading the book! It's very good. I've been following Chapter 11 pretty closely. Although I haven't looked at Chapter 12 all that much. I'm a bit confused as to what you mean by expressing year effects with And in your opinion, what pysal models would work best for this kind of spatio-temporal prediction? |
Hey everyone, this is less of a feature request and more of a question. I hope this is the right place to ask this.
I am working on a project where I attempt to predict heroin overdose rates is the US by county using spreg, and I've run into 2 issues.
The first issue is that spreg models don't seem to have a predict function, so I can't actually predict with it. I'll be honest, I don't even know if the models in the spreg package are the right ones for this problem anyway.
The other problem I'm running into that I can't find a way to use both spatial and temporal components at the same time.
If I arrange by data like this, I can't take calculate spatial weights since you can't do that with coincident points, which is what happens when you have multiple years of data for the same county
An example of a model I could use here that didn't take into account spatial effects is OLSRegimes.
If I do try to have spatial effects, then I can't have the data split by year, as I need to ensure the the same geometric point doesn't come up twice in the data, and the data has to look like this
And the models I've used so far like GM_Error_Het just haven't performed well so far.
Is there something I'm doing wrong here? Am I using the wrong models? Is something about my data not right? Or does pysal simply not support this functionality and I have to look elsewhere.
The text was updated successfully, but these errors were encountered: