raw_moran: Spatial correlation at lag 1

Description Usage Arguments Details Value See Also Examples

View source: R/RcppExports.R

Description

This function computes the Moran's I index of spatial correlation at lag 1.

Usage

1
raw_moran(mat)

Arguments

mat

A matrix

Details

This function returns the spatial correlation as measured by the Moran's I index. If the variance of the matrix is zero, then NaN is returned.

Value

The Moran's I numeric value as a numeric number.

See Also

indicator_moran, generic_spews

Examples

1
2
3
# Spatial correlation of white noise is close to zero
rmat <- matrix(runif(1000) > .5, ncol = 100)
raw_moran(rmat) 

spatialwarnings documentation built on May 2, 2019, 5:16 p.m.