R/06_Utils.R
global_univ_spatcor.Rd
Compute global Moran's I spatial autocorrelation statistic
global_univ_spatcor(
seurat,
var = NULL,
sim = 49,
lag = 1,
alt = "greater",
seed = 347548
)
a Seurat object containing Kandinsky data (`KanData()`)
character string or vector specifying the variable(s) to use to compute Moran's I statistics
number of Monte Carlo simulations to be run for estimating Moran coefficients significance
integer value indicating the extent of cell/spot neighbours to be considered to calculate Moran statistics. `lag = 1` indicates that only 1st order neighbours will be considered, while `lag=2` indicates that all neighbours of each 1st order neighbour will be also considered for each spot/cell, and so on.
a character string specifying the alternative hypothesis, Must be one of the following: "two.sided", "greater" (default), or "less".
numeric, random seed for reproducibility. Default is set to 347548
a data.frame reporting Moran's I spatial autocorrelation statistics with the associated p value for each selected variable.