pysal / spreg

Spatial econometric regression in Python
https://pysal.org/spreg/
Other
66 stars 23 forks source link

Updates for spreg 1.4 #118

Closed pedrovma closed 11 months ago

pedrovma commented 11 months ago

This PR incorporates several new developments into spreg.

Main changes:

Despite the major changes, this commit does not break any previous code. This update was developed in a private branch by Luc Anselin and Pedro Amaral.

knaaptime commented 11 months ago

that failure is a quick fix. It's looking for the master branch on libpysal which no longer exists. Just need to change this line to have @main instead of @master

I can do a PR into your fork if thats easiest

knaaptime commented 11 months ago

this is nice, thought i havent tested the slx_lags functionality yet. One thing i notice in the new output is that the latex argument doesnt do anything just yet. Might be nice to raise a NotYetImplemented error in the output function at the moment if someone tries to use it. (also, im not sure what you have planned for that, but since output comes back nicely as a pandas dataframe, the to_latex() method right on the df usually works fairly well)

pedrovma commented 11 months ago

this is nice, thought i havent tested the slx_lags functionality yet. One thing i notice in the new output is that the latex argument doesnt do anything just yet. Might be nice to raise a NotYetImplemented error in the output function at the moment if someone tries to use it. (also, im not sure what you have planned for that, but since output comes back nicely as a pandas dataframe, the to_latex() method right on the df usually works fairly well)

Good idea about the message regarding latex, as it is currently just a placeholder argument to be implemented later. The idea is to have the full results printed as latex. The output dataframe only stores the coefficients and their variance. No tests or other statistics are stored there currently.

knaaptime commented 11 months ago

The idea is to have the full results printed as latex. The output dataframe only stores the coefficients and their variance. No tests or other statistics are stored there currently.

I figured that was probably it. It might be possible to build on something like stargazer to avoid doing it from scratch?

pedrovma commented 11 months ago

I figured that was probably it. It might be possible to build on something like stargazer to avoid doing it from scratch?

I didn't know about stargazer. Very nice! I'll look into it before starting. Many thanks!

Except for specific warning messages, I made sure that all text returned to the user is already concentrated in output.py, so it shouldn't be very hard to implement this at some point.