Heterra

Part 2 · Spatial heterogeneity · Chapter 2

LISP

Local indicator of stratified power

The question

Where does a variable explain my response, and how strongly there? Does its explanatory power change across the study area?

You need

One point layer or table with longitude and latitude in WGS84 degrees, a numeric response y and one or more numeric explanatory variables. At least 30 complete rows.

You get

At every location, the local q and its p value for each variable, for pairs of variables and for all variables together, as maps, box plots and a table that sets them against the global q.

1The method

The idea

The geographical detector (Chapter 1) gives one q for a whole study area: the share of the variance of y that the strata of a variable explain. One number hides the places where the variable matters a lot and the places where it does not matter at all. LISP computes the same q locally: around every location it takes a window, discretises each variable inside that window, and computes q and its p value there. The result is a map of explanatory power for each variable.

Local extent κ = multiplier × a
a is the effective range of the semivariogram of y: the distance up to which values of y are spatially related. The window of a location holds all points within κ of it (at least the 10 nearest). The paper's default multiplier is 2.

The size of the window is not chosen by hand. It comes from the response itself: the semivariogram of y is fitted with an exponential model, and its range sets κ.

What is computed in each window

ResultStrataFields
Local q of each variableQuantile classes of the variable inside the window (4 by default)q_<x>, sig_<x>
Local power of a pair, ω1, ω2, …The two variables' classes crossed. The variable with the highest mean local q is paired with the next-ranked ones.omega1…, sig_omega1…
Local power of all variables, ω0Zones of a regression tree of y on all variablesomega0, sig_omega0

q and p are computed as in the R packages GD and localsp. A table then sets the local values against the global q of each variable, computed once over all points.

When to use it

Where it has been used

FieldResponse ySpatial unitStudy
GlaciologyChange of glacier thickness, 2000 to 2020Gridded glacier unitHu et al. (2024)
UrbanizationComposite urbanization indexCountySun et al. (2026), with geocomplexity patterns as extra variables, a step outside Heterra

Any set of point locations with one numeric response and several continuous explanatory variables fits.

Maps of the local power of eight variables and of its significance, with a violin plot
A published result. Local power of eight variables for the change of glacier thickness, each with a map of its significance, and the distribution of the local power of each variable. Source: Hu et al. (2024), Fig. 5.

Keep in mindq rises with the number of strata, so compare like with like: single variables with each other, pairs with each other. A pair or ω0 always has more strata than a single variable, and a higher q for that reason alone. q is a share of the local variance of y, not a coefficient, and it does not show causation.

2In Heterra

2.1 Prepare your data

One layer with one row per location: points, polygons, a regular grid or a table (Part 1 shows how to add data). Since version 1.6.0 a polygon layer can be used directly. The coordinates are two fields you choose; for a layer with geometry you can also choose Geometry X and Geometry Y, which for a polygon is a point inside it.

FieldTypeIn the example
Longitude, latitudeNumbers, WGS84 degreeslon, lat
Response yNumbery
Explanatory variablesNumbers, one or moreslope, elevation, lake_area, precipitation, summer_temp, winter_temp, aspect, albedo
Boundary (optional)A polygon layerlisp_boundary: the outline drawn on the maps in the charts. All points stay, and it changes no result.

The example has 500 simulated points in the study area of the LISP paper, the Greater Himalayas, with eight covariates named after the paper's variables. The values and the boundary are simulated, not observations, so the numbers illustrate the tool and do not describe a real study.

2.2 Run the example, step by step

Open the tool from the Toolbox (Spatial heterogeneity → LISP), click Tutorial, then Load Example. The points and the boundary appear on the map, and the panel on the right is filled in for you.

Heterra after Load Example: the 500 points inside the study-area boundary and the LISP panel at step 1
After Load Example: the layers on the left, the map in the middle, the LISP panel on the right at step 1 of 3.

The panel has three steps. Next moves on; Run appears at the last step, because only that step computes.

  1. LISP panel, step 1 DataDataChoose the layer, Longitude lon, Latitude lat and the Response y y, and tick the eight Explanatory variables. The boundary is optional.
  2. LISP panel, step 2 Local extentLocal extentKeep the Local extent multiplier at 2, so that κ = 2 × the range a. Leave Local extent κ by hand (km, optional) empty.
  3. LISP panel, step 3 Strata and interactionsStrata and interactionsKeep 4 Discretisation bins, 3 Interaction pairs and 5 Strata for the global benchmark. Click Run.

The run takes about one second. The Chart page opens with the maps of the variable pairs, and the panel lists every result under Outputs: the local fields, then the tables, then the figures. A green line says that the results match the reference results computed with R. The local fields are added to a copy of the layer, which appears in the layer list.

Heterra after the LISP run: the maps of the variable pairs on the Chart page and the results in the panel
After Run: the maps of the variable pairs. The menu above the figure and the Outputs list in the panel open the other figures and the tables.

2.3 With your own data

  1. Add your points (Add Data), open LISP from the Toolbox and choose the layer, the coordinate fields, y and the variables in step 1.
  2. Start with the defaults: multiplier 2, 4 bins, 3 pairs. After the run, look at the semivariogram first and at the window sizes in the table Semivariogram fit and local extent.
  3. Without a coordinate system on the layer, set Map units under Advanced so that the maps get a scale bar and a north arrow. It changes only the charts.
  4. If the run warns that κ is at least the largest distance between points, every window holds all locations and the local values are the same everywhere. Type a distance in Local extent κ by hand (km, optional) in step 2 and run again (see below).

3Reading the results

Read the results in this order: the semivariogram first (is the window sensible?), then the box plots and the comparison table (which variables matter, on the whole?), then the maps (where?).

3.1 Semivariogram and local extent

Semivariogram of y: empirical points, the fitted exponential model, and dashed lines at the sill, the range a and the local extent kappa
Semivariogram and local extent κ: the experimental semivariogram (dots), the fitted exponential model (line), and dashed lines at the sill, at a and at κ.

What it shows. How the difference between values of y grows with the distance between points. The semivariogram is computed on an automatic Albers projection of the coordinates, in km, and fitted as the R package automap does. In the example the model rises from a nugget of 0.0027 to a sill of 0.0140; its effective range a is 263 km, so κ = 2 × a = 527 km. The table Semivariogram fit and local extent holds these numbers and the window sizes: 47 to 194 points, 138 at the median.

How to read it. The dots should follow the curve up to the range and then level off, as they do here up to about 700 km; the two last dots lie above the sill, beyond κ. Then check the windows. Each window is cut into 4 classes for a single variable and into more for a pair, so a window of a few dozen points is small: here the smallest has 47. If the windows are too small, raise the multiplier; if every window covers most of the study area, the local values can hardly differ from the global one.

When the semivariogram has no sill. Some variables keep rising over the whole study area. The fitted range is then far larger than the area, no multiplier brings κ back inside it, and the run warns that every window holds all locations. Since version 1.6.0 you can set the local extent yourself: type a distance in km in Local extent κ by hand (km, optional). The semivariogram is still fitted and drawn, the table keeps the fitted range next to your κ, and the caption of the figure and the log say that κ was set by hand. Heterra does not suggest a value: choose a distance that has a meaning in your study and gives windows of at least a few dozen locations, and report it as your own choice. This option is not part of the method of Hu et al. (2024).

In a paper

"The local extent was set to twice the effective range of the exponential semivariogram of y (a = 263 km, κ = 527 km; Hu et al. 2024). The local windows held 47 to 194 points (median 138)."

3.2 Local power and the comparison table

Two panels of box plots: the local q of each of the eight variables, and the local power of the three pairs and of omega 0
Local power: box plots over the 500 locations. a, the local q of each variable; b, the local power of the pairs (ω1 to ω3) and of all variables (ω0).

What it shows. The spread of the local values. The table Local and global power of determinants (the paper's Table 2) gives the same in numbers, with the share of locations where p < 0.05 and the global q:

Variable or pairLocal meanLocal min to maxp < 0.05 (%)Global q
slope0.3060.167 to 0.5501000.321
elevation0.1270.004 to 0.50661.40.104
lake_area0.1070.019 to 0.31976.40.091
precipitation0.0670.001 to 0.22739.80.043
winter_temp0.0410.003 to 0.28118.60.018
albedo0.0370.001 to 0.3109.00.011
summer_temp0.0330.002 to 0.11410.20.010
aspect0.0240.000 to 0.13311.60.008
slope ∩ elevation (ω1)0.4550.285 to 0.7351000.431
slope ∩ lake_area (ω2)0.4540.265 to 0.66799.00.436
slope ∩ precipitation (ω3)0.4080.265 to 0.65097.60.361
All variables (ω0)0.6610.526 to 0.7601000.564

How to read it. Compare within a group. Among the single variables slope leads, with a mean local q of 0.31, and it is significant everywhere. The range matters as much as the mean: elevation explains 13% on average but up to 51% somewhere, which a global q of 0.10 does not show. A variable with a small global q can still be locally relevant (albedo: global 0.011, local maximum 0.31, significant at 9% of the locations).

Do not read the step from single variables to pairs to ω0 as a gain. With this example's windows and 4 bins, the mean local q after shuffling the variables can serve as a baseline: about 0.025 for a single variable, 0.14 for a pair and 0.38 for ω0. The zones of ω0 are grown from y itself and reflect its spatial structure; ω0 can serve as a reference for the other values. The share with p < 0.05 compares variables on the same y. To compare different analyses, keep the unit and the zero of y the same, because p changes when a constant is added to y, while q does not.

In a paper

"Slope has the largest local power of determinant (mean 0.31, range 0.17 to 0.55; significant at all locations, p < 0.05), followed by elevation (mean 0.13, significant at 61% of the locations) and lake area (0.11, 76%). The local power of elevation ranges from 0.004 to 0.51, against a global q of 0.10."

3.3 Maps of the local q

Eight groups of two maps, one group per variable: the local q in five classes above, its p value in three classes below
Maps of the local q and its p value: one group per variable under one letter, the local q above and its p value below.

What it shows. Where each variable explains y. The q maps use five quintile classes shared by all variables (the table Map classes lists the breaks: 0.016, 0.035, 0.069 and 0.149), so the colours can be compared between maps. The p maps have three classes: p < 0.01, p < 0.05 and p ≥ 0.05.

How to read it. Read each q map with the p map below it: a high q counts where it is also significant. Because the classes are shared, one variable may fill few of them: slope is in the top class at every location, since its smallest local q (0.167) is above the last break. For elevation, the top class and p < 0.01 cover the west of the area and smaller parts further east, and the centre is not significant. For the pattern inside one variable, map its field yourself: q_slope ranges from 0.17 to 0.55 with no west–east trend, although the simulation raises the coefficient of slope eastwards. q is a share of the local variance of y, not a coefficient.

In a paper

"The local power of elevation is spatially uneven (Figure X b): it is mostly above 0.15 and significant (p < 0.01) in the west of the study area, and is not significant in the centre. Overall it is significant at 61% of the locations."

3.4 Maps of the variable pairs

Three groups of two maps, one per variable pair: the local power of the pair above, its p value below
Maps of the variable pairs: one group per pair, the local power above and its p value below. This is the figure shown first after a run.

What it shows. The local power of slope crossed with each of the next three variables. The table Variable pairs says which pair each ω is. The three maps share one set of quintile classes, from 0.265 to 0.760, different from the classes of the single variables.

How to read it. Compare the pairs with each other, not with the single variables. The pairs have about the same mean (0.455, 0.454 and 0.408) but different patterns: slope ∩ elevation is highest at the western end, slope ∩ lake_area in the south. Nearly all locations are significant, as expected when one variable of each pair is slope.

In a paper

"The local power of slope ∩ elevation (mean 0.46, range 0.28 to 0.73) and of slope ∩ lake area (mean 0.45) is significant at 99% of the locations or more; the two pairs peak in different parts of the study area (Figure X)."

3.5 Maps of ω0

Two maps: omega 0 in five classes, and its p value
Maps of ω0 (all variables): a, ω0 in its own quintile classes; b, its p value.

What it shows. The local power of all variables together, on regression-tree zones. This map has its own classes, from 0.526 to 0.760, taken from its own values.

How to read it. ω0 is high everywhere and p < 0.01 at every location, which is expected: the tree's zones are grown from y. Use the map to see where the variables together describe y better or worse, and use ω0 as an upper reference for the single variables and pairs, not as a result to rank against them.

In a paper

"All variables together (ω0, regression-tree zones) reach a mean local power of 0.66 (range 0.53 to 0.76). Because these zones are derived from y, ω0 is reported as a reference only."

Export a figure from the Chart page as PDF or SVG (vector) or PNG at 300 dpi; Data CSV saves the numbers behind it. Export results in the panel writes a report of the run with the method, the steps, the figures and the tables (Part 1).

3.6 Reading the results together

The outputs tell one story in steps: how large "local" is (the semivariogram and κ), which variables matter on the whole and how much their power varies (the box plots and the comparison table), where each variable is strong and significant (the maps of the local q), and with which other variable (the maps of the pairs). Read them in this order:

  1. Semivariogram and local extent: check that the curve levels off and that the windows hold enough points.
  2. Local power and the comparison table: the ranking of the variables, the range of each local q, and the local values against the global q.
  3. Maps of the local q: where each variable explains y, read with the p map below it.
  4. Maps of the variable pairs: where two variables together explain y, compared between pairs.
  5. Maps of ω0: a reference for all variables together, not a result to rank.

What LISP is notIt is not a local regression: it gives no coefficients, no direction of an effect and no predicted values. It measures how much of the variance of y inside a window the strata of a variable explain. It also does not name the type of an interaction. For a map of predicted values, use a method of Part 4.

3.7 From the results to a manuscript

SectionWhat to writeFrom Heterra
MethodsThe local q; how the local extent is set (semivariogram model, range a, multiplier, κ); the number of bins; how the pairs and ω0 are formedThe settings of the run (in the exported report); table Semivariogram fit and local extent; table Variable pairs
ResultsFollow the order of the analysis: local extent, ranking of the variables, maps of the local q, pairs. One finding per subsection, each with a numberFigures Semivariogram and local extent κ, Local power, Maps of the local q and its p value and Maps of the variable pairs; table Local and global power of determinants
DiscussionSort the variables into three groups: local mean close to the global q with a narrow range (the local view adds little); a wide local range (the global q hides the variation); not significant globally but significant in parts of the area (found only locally). Name the part of the area each conclusion depends on. Say whether the ranking holds with another multiplier or number of binsTable Local and global power of determinants; the maps; a second run with another setting
Common pitfalls
  • Do not compare q values obtained with different numbers of bins: finer strata explain more variance by construction.
  • A semivariogram that keeps rising and has no sill gives an unstable range, and with it an unstable κ. Interpret such a run with care. If you set κ by hand, say so and give the reason for the distance; do not try several distances and keep the one whose maps you prefer.
  • Report the median number of points in a window. Below about 30, the classes inside a window hold too few points.
  • Only the leading variable is paired with the next-ranked ones. A variable further down the ranking is tested in a pair only if you raise Interaction pairs.

4Exercises

Exercises 1 to 3 use the example. Exercise 4 is for your own data.

Exercise 1Read

Run the example with its settings and open the table Local and global power of determinants. Which single variable has the second-largest mean local q? Which has the second-largest share of locations with p < 0.05? Which variables have a global q that is not significant at the 0.05 level?

Answer

Elevation has the second-largest mean (0.127), but lake_area has the second-largest share of significant locations (76.4%, against 61.4% for elevation). The global q is not significant for winter_temp (p = 0.064), albedo (0.25), summer_temp (0.30) and aspect (0.40).

Exercise 2Change a setting

In step 2, set the Local extent multiplier to 1 and run again. What is κ now? Which numbers of the comparison table can change, and which cannot? Look at the window sizes in the table Semivariogram fit and local extent before you trust the new maps.

Answer

The range a comes from the semivariogram of y and stays 263 km, so κ = 1 × a = 263 km. The windows are smaller, so every local value (mean, minimum, maximum, share with p < 0.05) can change. The global q is computed over all points and stays the same. Smaller windows show finer patterns but leave fewer points per class, so fewer locations may be significant. Both runs stay in History.

Exercise 3Interpret

A colleague writes: "All variables together reach a local power of 0.66, twice that of slope (0.31), so the other seven variables add as much explanation as slope." Is the sentence justified?

Answer

No. q rises with the number of strata, and ω0 is computed on regression-tree zones grown from y itself. With shuffled variables the mean local q is already about 0.38 for ω0, against about 0.025 for a single variable, so the two numbers are not on the same footing. Compare single variables with each other and pairs with each other, and report ω0 as a reference.

Exercise 4Your data

Run LISP on your own points with at least three explanatory variables. Write three sentences for a results section: one on the local extent (a, κ and the window sizes), one on the ranking of the variables (mean local q, its range and the share with p < 0.05), and one on where the leading variable is strong and significant. Export the maps of the local q as PDF.

Checklist

Are the coordinates WGS84 degrees? Does the semivariogram level off, and does the smallest window hold enough points for the number of bins? Did you compare single variables only with single variables? Did you read every q map together with its p map? Did you report the local range next to the global q?

References

Heterra guide, for version 1.6.0. © 2026 Yongze Song. Documentation and tutorial data: CC BY 4.0.