esda.MoranLocalConditional¶
- class esda.MoranLocalConditional(permutations=999, unit_scale=True, transformer=None, alternative='two-sided')[source]¶
Fit a local moran statistic for y after regressing out the effects of confounding X on y. A “stronger” version of the MoranLocalPartial statistic, as defined by [Wol24]
Methods
by_col(df, cols[, w, inplace, pvalue, outvals])Function to compute a Moran_Local statistic on a dataframe.
explore(gdf[, crit_value])Create interactive map of LISA indicators
fit(X, y, W)Parameters :2: (WARNING/2) Title underline too short. Parameters --------- y (N,1) array array of data that is the targeted "outcome" covariate to compute the multivariable Moran's I X (N,3) array array of data that is used as "confounding factors" to account for their covariance with Y. W (N,N) weights object spatial weights instance as W or Graph aligned with y. Immediately row-standardized.
get_cluster_labels([crit_value])Return LISA cluster labels for each observation.
plot(gdf[, crit_value])Create static map of LISA indicators
plot_combination(gdf, attribute[, ...])Produce three-plot visualisation of Moran Scatteprlot, LISA cluster and Choropleth maps, with Local Moran region and quadrant masking
plot_scatter([crit_value, ax, scatter_kwds, ...])Plot a Moran scatterplot with optional coloring for significant points.
- fit(X, y, W)[source]¶
Parameters¶
- y(N,1) array
array of data that is the targeted “outcome” covariate to compute the multivariable Moran’s I
- X(N,3) array
array of data that is used as “confounding factors” to account for their covariance with Y.
- W(N,N) weights object
spatial weights instance as W or Graph aligned with y. Immediately row-standardized.
- Returns:
AfittedMoranLocalConditional()estimator