Module 2 · Chapter 6 · Chapter Practicum

Design and Defend a Spatial Inference Plan

Audit sampling, spatial dependence, interpolation and regression as one geographically validated evidence system.

  • 2.P6
  • 420–540 minutes
  • Portfolio: Artifact 2.F — Spatial Inference and Validation Package
Open this lesson in the Academy workspace

Chapter 6 practicum — Design and Defend a Spatial Inference Plan

Learning outcome

By the end of this practicum, you will be able to audit a spatial sampling design, define and compare neighbour hypotheses, quantify spatial dependence, validate interpolation and regression across separated geography, map uncertainty and unsupported domains, and issue a professional release decision whose statistical claims remain conditional on spatial support and design.

  • Estimated time: 420–540 minutes
  • Prerequisites: Lessons 2.31–2.34
  • Portfolio output: Artifact 2.F — Spatial Inference and Validation Package
  • Training status: every supplied coordinate, value and identifier is synthetic and released for instruction under CC0-1.0

Why this practicum matters

Spatial statistics can make an analysis appear sophisticated while concealing the most important decisions. A Moran statistic is incomplete without weights. A sample count is incomplete without a frame and inclusion mechanism. A kriging surface is incomplete without variogram evidence and spatial holdouts. A spatial-regression coefficient is incomplete without a process hypothesis and geographic validation.

In professional work, these components must form one claim–evidence system. The objective is not to use every method. It is to decide which evidence can support which inference, demonstrate sensitivity and refuse outputs whose confidence exceeds the sampling design.

Scientific brief

The Baltic coastal meadow research group asks:

Can the current synthetic plot evidence support a spatially continuous description of vegetation condition inside the core meadow frame, and what supplementary sampling is required before stronger ecological inference?

The team needs a planning product, not a publication-ready biomass map. You must evaluate accepted probability observations, roadside convenience records, inaccessible frame cells and the isolated targeted plot separately. You may release a restricted exploratory surface, or decide not to release one. Both outcomes are valid when supported by transparent evidence.

1. Required training assets

Use spatial-statistics/README.md first. Keep the supplied files unchanged:

  • meadow_plot_observations.csv;
  • sampling_frame.csv;
  • spatial_validation_blocks.csv;
  • SPATIAL_INFERENCE_QA_TEMPLATE.md;
  • manifest.json.

Create a project structure:

spatial_inference_package/
├── README.md
├── environment.txt
├── inputs/
├── notebooks/
├── outputs/
│   ├── tables/
│   └── figures/
└── SPATIAL_INFERENCE_DECISION.md

Record software versions, random seeds and file checksums. Do not assign a real EPSG code to the synthetic local metric coordinates. The absence of a geographic CRS is intentional and prevents the instructional locations from being mistaken for field sites.

2. Gate A — define the inference target

Write the following before running a statistic:

  • population or spatial domain;
  • observation unit and physical support;
  • time represented by each variable;
  • response or target variable and units;
  • estimand or prediction use;
  • accepted, review and blocked evidence;
  • strongest causal claim prohibited by the design.

Use one primary target:

Describe and predict synthetic accepted plot-level NDVI inside the accessible core sampling frame for survey planning.

This statement does not promise true 10 m vegetation condition, regional transfer or causal biomass explanation. The output grid represents prediction locations, while the evidence support remains plot level.

Check your understandingWhat must be declared before building a spatial prediction surface?
Choose one answer

3. Gate B — audit frame, selection and realised observations

Create spatial_sampling_audit.csv with one row per frame or observed unit and these fields where applicable:

  • stable identifier;
  • source table;
  • x and y coordinate;
  • habitat and management strata;
  • frame eligibility;
  • accessibility and restriction reason;
  • selected status and route;
  • inclusion probability evidence;
  • response/QA status;
  • primary-analysis status;
  • decision reason.

Report:

  1. counts by habitat for the complete frame, accessible frame and accepted probability observations;
  2. missing inclusion probability by sampling route;
  3. nearest-neighbour distance by route;
  4. spatial distribution of inaccessible cells;
  5. the consequence of mixing roadside and probability observations;
  6. whether P024 belongs to the core inference domain.

Propose six supplementary sample locations using a stratified random or spatially balanced design. Preserve the full frame, seed and non-selected rows. Define a replacement rule before simulating one inaccessible selection.

4. Gate C — make spatial weights inspectable

Build at least three scientifically plausible neighbour definitions for accepted core plots:

  • four nearest neighbours;
  • six nearest neighbours;
  • a 170 m distance band.

For each definition, save:

  • rationale;
  • transformation;
  • minimum, median and maximum neighbours;
  • minimum, median and maximum link distance;
  • symmetry status;
  • island identifiers;
  • edge observations;
  • map filename.

Create weights_sensitivity.csv. Do not remove a definition because its result is weak or inconvenient. If P024 is included in a secondary analysis, record whether the distance rule exposes it as an island and how far k-nearest neighbours force it to connect.

5. Gate D — quantify spatial dependence cautiously

For accepted core NDVI and elevation:

  1. standardise or transform only with a documented reason;
  2. calculate global Moran's I under all three weights definitions;
  3. use at least 999 permutations and a fixed seed;
  4. retain observed I, expected I, permutation mean, permutation probability and z-score when available;
  5. map the values beside the selected graph;
  6. repeat with roadside review observations as a labelled sensitivity analysis;
  7. write one possible environmental explanation and two alternatives;
  8. state explicitly that autocorrelation does not establish cause.

The primary report should focus on global structure. Optional local statistics may appear only in an appendix that documents multiple-testing control, weights and exploratory status.

Check your understandingThree scientifically plausible weights definitions produce different Moran results. What should be released?
Choose one answer

6. Gate E — validate interpolation as a prediction task

Build an empirical variogram table for accepted core NDVI. Report distance-bin edges, midpoint, pair count and mean semivariance. Examine whether a broad coordinate trend, anisotropy or sparse long-distance pairs weaken a stationary interpretation.

Compare:

  • inverse-distance weighting with a declared power and neighbour rule;
  • ordinary kriging with a documented variogram model and parameters.

Use the same separated spatial blocks for both methods. Save interpolation_validation.csv with:

  • plot ID and holdout block;
  • observed value;
  • method and full parameter label;
  • prediction;
  • residual;
  • absolute and squared error;
  • distance to nearest training observation;
  • prediction variance when defined;
  • inside/outside core support;
  • QA note.

Report mean error, MAE and RMSE overall and by block. Map residuals with one common scale. If a method has a lower aggregate RMSE but systematic failure in one block, do not call it universally superior.

Create a prediction grid only inside a declared core domain. Map model-based uncertainty separately and add a support/extrapolation mask. The isolated plot must not cause the map to bridge an unobserved gap without warning.

7. Gate F — diagnose regression residuals

Fit a transparent baseline for synthetic biomass using accepted core NDVI and elevation. Document:

  • response and predictors;
  • units and support;
  • ordinary diagnostics;
  • coefficient interpretation as association;
  • four-nearest residual Moran's I plus weights sensitivity;
  • spatial-block validation performance;
  • influential or edge observations.

Select only one spatial alternative for detailed comparison. It may be an SLX, spatial-error, spatial-lag or cautiously exploratory geographically weighted formulation. The decision must follow a process hypothesis, not whichever method removes residual Moran's I most strongly.

Save residual_diagnostics.csv and model_comparison.csv. If the selected library cannot generate valid out-of-sample predictions for the required geography, record that limitation and do not replace it with in-sample information criteria.

Check your understandingA smooth interpolation has low random-split error but poor separated-block validation. What is the correct decision?
Choose one answer

8. Build the decision matrix

Create one matrix connecting every claim to its evidence:

Claim areaRequired evidenceAccepted resultMain sensitivityUnsupported claimDecision
Sampling representationframe, inclusion mechanism, realised response
Spatial dependencevariable, weights, permutations, map
Interpolationcontinuity model, spatial holdout, support mask
Regressionbaseline, residual geography, alternative, validation
Ecological interpretationmeasurement meaning and independent evidence

Use the statuses:

  • accept: evidence supports the declared limited use;
  • review: evidence is informative but a named uncertainty or sensitivity remains;
  • block: the proposed use exceeds the current design or validation.

9. Produce the spatial inference map

Create spatial_inference_map.pdf with at least four coordinated panels:

  1. accepted, review, inaccessible and proposed sampling locations;
  2. selected neighbour graph and NDVI values;
  3. preferred exploratory prediction surface with observation locations;
  4. validation residuals and uncertainty/support mask.

The map must state that the coordinates are a synthetic local metric grid. Include units, an equal aspect ratio, an accessible colour scheme, clear missing/blocked symbology and a text description in the report. Do not add a geographic basemap or real place name.

10. Write the release decision

Create SPATIAL_INFERENCE_DECISION.md with a maximum of 1,000 words:

  1. Question and intended use
  2. Population, frame and realised sample
  3. Spatial-dependence evidence
  4. Interpolation and spatial-validation evidence
  5. Regression diagnostic
  6. Uncertainty and unsupported domain
  7. Release status
  8. Supplementary sampling priority

Choose one final status:

  • release for exploratory survey planning;
  • release only inside a restricted domain with prominent uncertainty;
  • do not release a continuous surface.

State one interpretation the evidence supports and three it does not. Include a next action with an owner or responsible role.

11. Professional Mistakes — Spatial Statistics and Geostatistics

Use this as a final review table. Every row needs an explicit status and action in your notebook or decision record.

Professional mistakeWhy it failsEvidence that reveals itRequired recovery
Treating coordinates as spatially meaningful without units or CRS evidenceneighbour distance becomes ambiguousmetadata and coordinate auditverify reference or retain documented local metric status
Selecting weights after searching for significanceinference becomes outcome-tunedmissing pre-analysis rationaledefine plausible weights first and report sensitivity
Reporting Moran's I without Wthe statistic cannot be interpretedincomplete methods tablerecord neighbours, transformation and islands
Interpreting I against zero onlynull expectation may differexpected-I outputreport expected value and permutation reference
Calling autocorrelation a causepattern does not identify mechanismcausal wordingseparate description from competing explanations
Letting k-nearest neighbours hide an islandforced long links may be implausiblelink-distance mapcompare a distance rule and review the domain
Ignoring edge observationsneighbour structure differs near boundariesneighbour-count summarymap and test edge sensitivity
Mixing accepted and review rows silentlyQA and design conditions changesource-status reconciliationretain statuses and run labelled sensitivity analysis
Calling roadside plots randomunknown inclusion mechanism is concealedroute and provenance auditlabel convenience evidence and restrict inference
Deleting inaccessible frame unitstarget-frame gaps disappearframe reconciliationpreserve restrictions and redefine domain honestly
Moving selected plots for convenienceselection probabilities become unclearplanned-versus-realised coordinatesuse a predeclared replacement rule
Treating equal stratum sample counts as population proportionsunweighted estimates can be distortedframe and sample sharesuse design-aware estimates or stratum results
Interpolating an unsuitable variablecontinuity assumption is unsupportedprocess review and variogramrefuse the surface or redesign the model
Choosing the smoothest interpolated mapappearance replaces validationabsent holdout resultscompare identical spatial folds
Fitting a variogram before checking trendnon-stationary mean enters dependence modelvalue and residual mapsmodel trend or restrict domain first
Treating the nugget as sensor error onlymicroscale and support variation are ignoredreplicate/support evidenceuse cautious short-range-variance language
Ignoring variogram pair countssparse bins appear authoritativelag tablereport pair counts and sensitivity
Calling kriging variance observed errorit is conditional model uncertaintyholdout residualsdistinguish model variance from empirical error
Predicting across the P024 gapoutput grid hides extrapolationdistance/support maskrestrict domain and flag unsupported cells
Validating with random neighbouring plotslocal dependence leaks into test datafold map and neighbour overlapuse separated blocks or sites
Selecting regression family from p-valuesmodel lacks a process hypothesismethods rationalelocate dependence in predictors, response or error conceptually
Interpreting spatial lag as an ordinary local coefficientfeedback creates indirect impactsmodel definitionreport appropriate direct/indirect impacts
Treating GWR maps as confirmed local mechanismslocal estimates may be unstablebandwidth, collinearity and uncertaintyretain exploratory language and independent validation
Using in-sample R² as geographic validationfit does not test transferabsent block metricsevaluate held-out geography
Eliminating residual autocorrelation at any costcomplexity may not improve science or predictioncross-model comparisonbalance diagnosis, transfer, stability and interpretation
Claiming NDVI causes biomassobservational association is not causal evidencedesign and causal sketchreport association and required causal evidence
Publishing only the final surfacedecisions and failures cannot be reconstructedmissing package filesdeliver frame, weights, validation, uncertainty and decision record

12. Required deliverables

Submit all nine files:

  1. README.md
  2. spatial_sampling_audit.csv
  3. weights_sensitivity.csv
  4. interpolation_validation.csv
  5. residual_diagnostics.csv
  6. model_comparison.csv
  7. spatial_inference_map.pdf
  8. SPATIAL_INFERENCE_DECISION.md
  9. spatial_statistics_practicum.ipynb

The notebook must run from top to bottom using relative paths and immutable inputs. It must preserve random seeds, rejected rows, sensitivity definitions and package versions. Screenshots may support review but cannot replace executable tables and code.

13. Assessment rubric

DimensionExcellent evidenceRevision required
Technical correctnessweights, statistics, variogram, interpolation, residuals and validation are calculated with compatible rows and documented unitsmethods run but neighbourhood, support, folds or units are ambiguous
Conceptual understandingsampling, dependence, continuity and residual processes are separated and linked to defensible hypothesesmethods are presented as interchangeable software choices
Reproducibilityframe, inputs, checksums, seeds, parameters, software, outputs and exclusions are traceableselected locations or model defaults cannot be recreated
Scientific communicationmaps and decision record distinguish observations, predictions, uncertainty, extrapolation and unsupported causationsmooth surfaces or coefficients are presented as ecological truth

Automatic revision is required if the submission:

  • calls convenience locations random;
  • omits the weights definition from an autocorrelation result;
  • validates interpolation or regression only with random neighbouring rows;
  • treats kriging variance as empirical accuracy;
  • assigns a real CRS to the synthetic coordinates;
  • reports causal NDVI–biomass language;
  • hides inaccessible cells, review rows, islands or extrapolation.

14. Reflection and portfolio handover

Reflection

  • Which single decision changed your conclusion most: domain, sampling set, weights, variogram or validation geography?
  • What new field location would reduce the most important uncertainty?
  • Which output is safe for survey planning but unsafe for ecological reporting?
  • How will this chapter change the validation design of the final UAV and Satellite Analysis Pipeline?

Submission

Upload the nine required files, one screenshot of the rerun notebook, one screenshot of the map at readable scale and a 150-word handover note addressed to the scientist responsible for the next field campaign. The note must identify the release status, blocked interpretation, priority sample and file that contains full decision evidence.

Portfolio artifact

Add Artifact 2.F — Spatial Inference and Validation Package to the UAV and Satellite Analysis Pipeline. It should demonstrate that you can turn spatial observations into a restricted, validated inference without allowing maps, p-values or advanced model names to outrun the sampling design.