SThet_invdist_test.Rd
Computes the global spatial autocorrelation statistics Moran's I and/or Geary's C for a set of genes
SThet_invdist_test(
x = NULL,
genes = NULL,
samples = NULL,
method = "moran",
k = NULL,
overwrite = T,
cores = NULL
)
an STlist
a vector of gene names to compute statistics
the samples to compute statistics
The spatial statistic(s) to estimate. It can be set to 'moran', 'geary' or both. Default is 'moran'
the number of neighbors to estimate weights. By default NULL, meaning that spatial weights will be estimated from Euclidean distances. If an positive integer is entered, then the faster k nearest-neighbors approach is used. Please keep in mind that estimates are not as accurate as when using the default distance-based method.
logical indicating if previous statistics should be overwritten. Default to FALSE (do not overwrite)
an STlist containing spatial statistics
The function computes global spatial autocorrelation statistics (Moran's I and/or
Geary's C) for the requested genes and samples. Then computation uses the
package spdep
. The calculated statistics are stored in the STlist, which can
be accessed with the get_gene_meta
function. For visual comparative analysis,
the function compare_SThet
can be used afterwards.