Compute bivariate global spatial correlation. You can use either Lee's L (default) or bivariate Moran's I statistics.
global_biv_spatcor(
seurat,
var1 = NULL,
var2 = NULL,
sim = 49,
lag = 1,
method = c("lee", "moran"),
alt = "two.sided",
layer = "data",
seed = 347548
)
a Seurat object containing Kandinsky data (`KanData()`)
character string or vector specifying the first variable(s) to use to compute bivariate spatial correlation.
character string or vector specifying the second variable(s) to use to compute bivariate spatial correlation
number of Monte Carlo simulations to be run for estimating Moran/Lee coefficients significance
integer value indicating the extent of cell/spot neighbours to be considered to calculate Moran/Lee 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.
character string specifying which method to use to estimate spatial correlation. Must be one of the following: "lee" (default), "moran".
a character string specifying the alternative hypothesis, Must be one of the following: "two.sided" (default), "greater" or "less".
character string indicating which Seurat layer will be considered to search for the variable of interest
numeric, random seed for reproducibility. Default is set to 347548
a data.frame reporting the chosen spatial statistic coefficient with the associated p value for each possible combination between variables specified with `var1` `var2` parameters.