Skip to contents

Local spatial heteroscedasticity (LOSH) (Ord and Getis 2012) is defined as

Hi=jwij|ej|ah1jwij H_i = \frac{\sum_j w_{ij}\left| e_j \right|^a}{h_1\sum_j w_{ij}}

where where nn is the number of spots or locations, ii and jj are different locations, or spots in the Visium context, wijw_{ij} is a spatial weight, which can be inversely proportional to distance between spots or an indicator of whether two spots are neighbors, subject to various definitions of neighborhood, h1=i|ei|a/nh_1 = \sum_i \left| e_i \right|^a/n, ej=xjxje_j = x_j - \bar{x}_j, xx is a variable with values at each location, and

xj=jwjkxkjwjk. \bar{x}_j = \frac{\sum_j w_{jk}x_k}{\sum_j w_{jk}}.

By default, a=2a = 2 so LOSH is like a local variance. See (Ord and Getis 2012) for more details and interpretation.

Below is a list of vignettes that use Moran’s I. The links point to the sections that use Moran’s I. The corresponding Google Colab notebooks are also linked to. The list is sorted by technology.

Vignette Colab Notebook Description
Spatial analysis with 10X example Visium dataset Colab Notebook Perform LOSH on QC metrics in mouse olfactory bulb dataset from 10X website.
Spatial Visium exploratory data analysis Colab Notebook Perform LOSH on gene Myh2 (myosin heavy chain 2) in mouse skeletal muscle dataset
CosMX NSCLC analysis Colab Notebook Perform LOSH on QC metrics and on marker genes in a human non-small cell lung cancer dataset
Xenium breast cancer analysis Colab Notebook Perform LOSH on QC metrics and marker genes in a human breast cancer dataset
10X v3 Basic Colab Notebook Apply LOSH to QC metrics and marker genes in non-spatial human PBMC scRNA-seq dataset, with k nearest neighbor graph in gene expression PCA space rather than histological space

References

Ord, J Keith, and Arthur Getis. 2012. “Local Spatial Heteroscedasticity (LOSH).” Ann. Reg. Sci. 48 (2): 529–39.