Learn R Programming

spots (version 0.1.0)

BivariateMoransIStats: Bivariate Moran's I statistics

Description

Calculate theoretical expectation and standard deviation of bivariate Moran's I under the null hypothesis.

Usage

BivariateMoransIStats(X, W)

Arguments

X

A matrix with observations as rows and features as columns.

W

A weight matrix across all observations, i.e inverse of a pairwise distance matrix.

Value

A list containing the following:

  • E.I, the expectation of Moran's I under the null hypothesis.

  • SD.I, the standard deviation of Moran's I under the null hypothesis.

References

Czaplewski, R. L. Expected Value and Variance of Moran<U+2019>s Bivariate Spatial Autocorrelation Statistic for a Permutation Test. (U.S. Department of Agriculture, Forest Service, Rocky Mountain Forest and Range Experiment Station, 1993).

Examples

Run this code
# NOT RUN {
{
data.use <- quakes[1:100,]
W <- 1/as.matrix(dist(data.use[,1:2]))
diag(W) <- 0
res <- BivariateMoransIStats(data.use[,3:4], W)
}
# }

Run the code above in your browser using DataLab