View source: R/correlationStatistics.R
moranPermutationTest | R Documentation |
Derive Moran's I p-value using permutation testing
moranPermutationTest( z, w, alternative = "greater", N = 10000, seed = 0, ncores = 1, plot = FALSE, ... )
z |
Feature value |
w |
Adjacency weight matrix |
alternative |
"two.sided", "less", or "greater" |
N |
Number of permutations |
seed |
Random seed |
ncores |
Number of cores for parallel processing |
plot |
Plot permutated distribution |
... |
Additional parameters to pass to histogram plotting |
Observed Moran's I statistic, the expected statistic under the null hypothesis of no spatial autocorrelation, the standard deviation under the null hypothesis, permutation p-value, and number of permutations
data(mOB) pos <- mOB$pos weight <- getSpatialNeighbors(pos) gexp <- normalizeCounts(mOB$counts, log=FALSE, verbose=FALSE)['Camk4',] moranPermutationTest(gexp, weight)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.