pysal.explore.esda.
Moran_Local
(y, w, transformation='r', permutations=999, geoda_quads=False)[source]¶Local Moran Statistics
Parameters: |
|
---|
Notes
For technical details see [Ans95].
Examples
>>> import pysal.lib
>>> import numpy as np
>>> np.random.seed(10)
>>> w = pysal.lib.io.open(pysal.lib.examples.get_path("desmith.gal")).read()
>>> f = pysal.lib.io.open(pysal.lib.examples.get_path("desmith.txt"))
>>> y = np.array(f.by_col['z'])
>>> from pysal.explore.esda.moran import Moran_Local
>>> lm = Moran_Local(y, w, transformation = "r", permutations = 99)
>>> lm.q
array([4, 4, 4, 2, 3, 3, 1, 4, 3, 3])
>>> lm.p_z_sim[0]
0.24669152541631179
>>> lm = Moran_Local(y, w, transformation = "r", permutations = 99, geoda_quads=True)
>>> lm.q
array([4, 4, 4, 3, 2, 2, 1, 4, 2, 2])
Note random components result is slightly different values across architectures so the results have been removed from doctests and will be moved into unittests that are conditional on architectures
Attributes: |
|
---|
Methods
by_col (df, cols[, w, inplace, pvalue, outvals]) |
Function to compute a Moran_Local statistic on a dataframe |
calc |
__init__
(y, w, transformation='r', permutations=999, geoda_quads=False)[source]¶Initialize self. See help(type(self)) for accurate signature.
Methods
__init__ (y, w[, transformation, …]) |
Initialize self. |
by_col (df, cols[, w, inplace, pvalue, outvals]) |
Function to compute a Moran_Local statistic on a dataframe |
calc (w, z) |