moran: Compute Moran's I matrix

View source: R/moran.R

moranR Documentation

Compute Moran's I matrix

Description

This code was modified from the original in the spdep package.

Usage

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

Arguments

x

A matrix of variables to compute the bivariate Moran's I

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.