pysal / spreg

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

does spreg support standardized coefficient? #86

Closed shuai-zhou closed 2 years ago

shuai-zhou commented 2 years ago

I was just wondering if spreg supports standardized coefficient, or is it legitimate to think this way or to obtain standardized coefficient from spatial models? Do the standardized coefficients have similar explanations as standardized coefficients from non-spatial models, i.e., the larger the abstract values of the standardized coefficient, the larger the effect of that variable.

ljwolf commented 2 years ago

Hi,

Yes, definitely, you can standardize the data yourself before inputting it into the model. The sklearn.preprocessingmodule provides many different approaches to feature standardization. If you preprocess your y and X, then spreg can fit on them, no problem.

In abstract, yes the interpretation of a standardized coefficient is the same in a spatial model as in an aspatial model with respect to the interpretations you mention. However, for spatial lag (of Y or X) and spatial durbin-style models, you do need to be aware of the direct/indirect effect interpretations. More on this is in geographicdata.science/book, chapter 11