Coder Social home page Coder Social logo

Comments (3)

iamwfx avatar iamwfx commented on September 28, 2024

Also, typo here in the original text:
db["w_Pct_Leave_std"] = db["w_Pct_Leave"] - db["Pct_Leave"].mean() should be db["w_Pct_Leave"].mean()

from book.

ljwolf avatar ljwolf commented on September 28, 2024

The top one we will definitely fix, thanks!

The bottom, though, is indeed correct but unclear in the "Local" chapter, and technically wrong in the global chapter. We've tried to edit this before & clearly failed. I'll change both to be consistent and compute the "spatial lag of centered % leave," as this is what we use and also intend to discuss.

To explain (for @darribas and @sjsrey in future edits...), the original statistic is stated only in terms of z and w. There's no mean(Wz) in the statistic, just in the scatterplot. In the original LISA paper, the mean of W.TOTCON and TOTCON are dashed lines. But, the dashed line for W.TOTCON is above zero on the y-axis:

Screenshot 2023-03-06 at 14 05 19

So, we definitely plot centered x vs. W(centered x)... but what about the "axis" we're plotting onto it?

Well... this is where we may differ from GeoDa (and from Anselin (1995)) is that we also classify based on the original mean of X. spdep also does this afaict. I think this is the correct approach, too: in this scheme, "high-high" classifications reflect observations with higher-than-average x and also higher-than-average x nearby. Classifying with respect to mean(Wx) shifts this latter part to "higher-than-average spatial lag" which is less intuitive...

None of it affects the actual slope of the line in the plot, just the intercept. Our version will give the intercept of the line as the average of the spatial lag when x is at its mean, while the other version would force a regression through the origin.

from book.

darribas avatar darribas commented on September 28, 2024

Paging this thread which also discussed the matter:

#32 (comment)

from book.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.