lisa: Compute Moran's Local Index of Spatial Association (LISA)...

View source: R/moran.R

lisaR Documentation

Compute Moran's Local Index of Spatial Association (LISA) matrix

Description

This code was modified from the moran function above. LISA is directional and is the association centered around marker y. The column means of LISA are equal to Moran's I.

Usage

lisa(
  y,
  x,
  listw,
  comp = NULL,
  zero.policy = FALSE,
  NAOK = FALSE,
  demean = TRUE
)

Arguments

y

A vector to compute the index relative to.

x

A matrix of variables to compute the lisa with y.

listw

A listw object specifying the weighting matrix.

comp

A vector of integers, strings, or factors indicating broad tissue compartments in which to compute Moran's I.

zero.policy

How to deal with zones without neighbors. If TRUE assign zero to the lagged value of zones without neighbours, if FALSE assign NA

NAOK

If TRUE, NAs are removed in computations.

demean

If TRUE demean columns of x. Might not want to if x is dummy variables.

Value

Returns a list of matrices, where each matrix is the multivariate Moran's I for each tissue compartment.


statimagcoll/multiplexMoran documentation built on June 27, 2022, 4:26 p.m.