Calculate Moran's I between two groups with irregular data shape.
IrregularMoransI(
X,
W,
group1,
group2,
OLS = FALSE,
normalize = TRUE,
alternative = c("two.sided", "less", "greater"),
p.adjust.method = "BH"
)
A matrix with observations as rows and features as columns.
A weight matrix across all observations, i.e inverse of a pairwise distance matrix.
The indices or names for the first group of observations.
The indices or names for the second group of observations.
Whether to use OLSMoransI
, default is FALSE
and BivariateMoransI
is used.
Whether to normalize the weight matrix such that each row adds up to one. Default is TRUE
.
Alternative hypothesis used, default is two.sided
.
Method used for multiple comparisons correction, default is BH
. See p.adjust
.
A list containing the output from BivariateMoransI
or OLSMoransI
.