esda.MoranLocalPartial

class esda.MoranLocalPartial(permutations=999, unit_scale=True, partial_labels=True, alternative='two-sided')[source]

Methods

fit(X, y, W)

Fit the partial local Moran statistic on input data

Attributes

association_

The association between y and the local average of y, removing the correlation due to x and the local average of y

labels_

The classifications (in terms of cluster-type and outlier-type) for the association_ statistics.

partials_

The components of the local statistic.

reference_distribution_

Simulated distribution of association_, assuming that there is

significance_

The pseudo-p-value built using map randomization for the structural relationship between y and its local average, removing the correlation due to the relationship between x and the local average of y.

property association_

The association between y and the local average of y, removing the correlation due to x and the local average of y

fit(X, y, W)[source]

Fit the partial local Moran statistic on input data

Parameters:
X(N,p) array

array of data that is used as “confounding factors” to account for their covariance with Y.

y(N,1) array

array of data that is the targeted “outcome” covariate to compute the multivariable Moran’s I

W(N,N) weights object

spatial weights instance as W or Graph aligned with y. Immediately row-standardized.

Returns:
selfobject

this MoranLocalPartial() statistic after fitting to data

property labels_

The classifications (in terms of cluster-type and outlier-type) for the association_ statistics. If the quads requested are mvquads, then the classification is done with respect to the left and right components (first and second columns of partials_).

If the quads requested are uvquads, then this will only be computed with respect to the outcome and the local average. The cluster typology is:

  • 1: above-average left component (either y or D @ DtDi),

    above-average right component (local average of y)

  • 2: below-average left component (either y or D @ DtDi),

    above-average right component (local average of y)

  • 3: below-average left component (either y or D @ DtDi)

    below-average right component (local average of y)

  • 4: above-average left component (either y or D @ DtDi)

    below-average right component (local average of y)

property partials_

The components of the local statistic. The first column is the structural exogenous component of the data, and the second is the local average of y.

property reference_distribution_
Simulated distribution of association_, assuming that there is
  • no structural relationship between y and its local average;

  • the same observed structural relationship between y and x.

property significance_

The pseudo-p-value built using map randomization for the structural relationship between y and its local average, removing the correlation due to the relationship between x and the local average of y.