spatialCrossCorTest: Tests for significance of spatial cross correlation for two...

View source: R/correlationStatistics.R

spatialCrossCorTestR Documentation

Tests for significance of spatial cross correlation for two features using random label null model

Description

Tests for significance of spatial cross correlation for two features using random label null model

Usage

spatialCrossCorTest(x, y, w, n = 1000, ncores = 1, plot = FALSE, ...)

Arguments

x

Feature 1 value

y

Feature 2 value

w

Binary weight matrix

n

Permutation iterations

ncores

Number of cores for parallel processing

plot

Plot permutated distribution

...

Additional parameters to pass to histogram plotting

Value

Two-sided test p-value

Examples

## Not run: 
data(mOB)
pos <- mOB$pos
w <- getSpatialNeighbors(pos)
gexp <- normalizeCounts(mOB$counts, log=FALSE, verbose=FALSE)
pv1 <- spatialCrossCorTest(gexp['Gpsm1',], gexp['Nrgn',], w)
pv2 <- spatialCrossCorTest(gexp['Gpsm1',], gexp['Glul',], w)
pv3 <- spatialCrossCorTest(gexp[1,], gexp[2,], w)

## End(Not run)

JEFworks/MERingue documentation built on June 11, 2022, 4:16 a.m.