Closed rosieluain closed 1 year ago
Thank you for checking. I'll take a look later in the week on return to Bergen. It is quite probable that the local G* case was not tested.
On looking at:
the first line divides the nsim simulated lagged values by the sum of x, for the G-star case, and the second divides by the sum of x minus the value of x at i, so the regular G case.
Thank you - that code did not match the version I was using at all. I have now updated and the code matches and results are quite different. Sorry I did not check versions first - thank you!
Please note that I've opened #123 because of comparison with PySAL and Geoda; the current local G-star conditional permutation does not force the inclusion of the current observation in the lagged samples but perhaps should do so. Until #123 is resolved, conditional permutation of local G-star may diverge from the other two implementations.
Hello,
I started digging into the code for localG_perm to make sure I am understanding the results correctly.
In the definition of the function permG_int, there is the line:
res_p <- lx_i/(x_star - xi)
I am calculating G, but I believe this is the equation for G (not G), which would mean that I am comparing my G value to simulated G values. Should there be in an option within permG_int to calculate G if gstari or self.included is TRUE?
Thanks! Rosie