Package: spconform 0.1.2

spconform: Conformal Prediction for Spatially and Spatio-Temporally Dependent Data

Provides distribution-free, model-agnostic prediction intervals for spatially and spatio-temporally dependent data using localized conformal calibration. Implements locally weighted split conformal prediction for geostatistical (point-referenced) data based on spatial-distance kernels, and a neighbourhood-weighted conformal procedure for areal (lattice) data based on graph adjacency structures. Relaxes the standard exchangeability assumption using spatial proximity, following the localized conformal framework of Mao, Martin and Reich (2024) <doi:10.1080/01621459.2022.2147531>. Includes comprehensive spatial diagnostic tools to audit empirical coverage, conditional spatial strata, and boundary proximity effects.

Authors:Ahmed Sattar Jabbar [aut, cre]

spconform_0.1.2.tar.gz
spconform_0.1.2.zip(r-4.7-any)spconform_0.1.2.zip(r-4.6-any)spconform_0.1.2.zip(r-4.5-any)
spconform_0.1.2.tgz(r-4.6-any)spconform_0.1.2.tgz(r-4.5-any)
spconform_0.1.2.tar.gz(r-4.7-any)spconform_0.1.2.tar.gz(r-4.6-any)
spconform_0.1.2.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
spconform/json (API)

# Install 'spconform' in R:
install.packages('spconform', repos = c('https://amjed-droid.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/amjed-droid/spconform/issues

Pkgdown/docs site:https://amjed-droid.github.io

On CRAN:

Conda:

area-dataconformal-predictiongeostatisticsgeostatistics-lessonsmachine-learningprediction-intervalsspatial-analysisspatial-statisticsspatio-temporaluncertainty-quantification

4.90 score 1 stars 16 scripts 463 downloads 6 exports 0 dependencies

Last updated from:1069a842bf. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-develOK143
source / vignettesOK134
linux-releaseOK211
macos-releaseOK90
macos-oldrelOK109
windows-develOK85
windows-releaseOK73
windows-oldrelOK69
wasm-releaseOK99

Exports:areal_neighbor_weightscoverage_reportdiagnosescp_arealscp_geostatisticalspatial_kernel_weights

Dependencies:

Getting Help and Troubleshooting
1. Quick Support Matrix | 2. Frequently Asked Questions (FAQ) | Q1: My empirical coverage is slightly below $1 - \alpha$ (e.g. 88.5% instead of 90%). Is my model invalid? | Q2: Should I use scp_geostatistical() or scp_areal()? | Q3: How do spatial bandwidth and $k$-NN affect interval widths? | Q4: Does spconform support spatio-temporal data? | 3. Interpreting the Diagnostic Suite (diagnose()) | 1. Marginal Coverage & Interval Width | 2. Winkler Interval Score (WIS) | 3. Spatial Quadrant Stratification | 4. Convex Hull Boundary Proximity | 5. Spatial Autocorrelation (Moran's $I$) | 4. Model Integration Recipes (pred_fun) | Recipe 1: Random Forest (ranger) | Recipe 2: Generalized Additive Model (mgcv::gam) | Recipe 3: Ordinary Spatial Kriging (gstat) | 5. Troubleshooting Common Errors & Warnings | 1. Coordinate & Dimension Mismatches | Error: s_train and s0 must have the same number of coordinate columns | Issue: Single-point query vector treated as 1D vector instead of 1-row matrix | 2. Missing & Non-Finite Values (NA, NaN, Inf) | Error: s_train cannot contain NA or non-finite values or y_train contains missing values | 3. Custom Predictor (pred_fun) Return Types & Single-Row Drops | Error: pred_fun must return a numeric vector of length nrow(s_new) | 4. Coordinate Reference System (CRS) & Distance Scale Discrepancies | Symptom: Prediction intervals are excessively wide or bandwidth estimation is degenerate | 5. Areal Adjacency Matrix Structural Errors | Error: adjacency must be a square numeric matrix | Warning: Effective neighbourhood weight vanishingly small; falling back to unweighted quantile | 6. Calibration Sample Size vs. Nominal Miscoverage ($\alpha$) | Symptom: Conformal quantile returns the maximum nonconformity score or upper bound is uninformative | 7. Evaluation & Diagnostic Alignment | Error: y_true must have the same length as object$pred | Error: s_test is required for spatial stratification and boundary audits | 8. Graphics Layout & Multi-Panel Plot Devices | Warning: Plot margins too large or layout display clipped in RStudio | 6. Submitting a Minimal Reproducible Example (reprex) | 7. Citation & Academic Reference | 8. Maintainer Contact

Last update: 2026-10-14
Started: 2026-09-24

Introduction to spconform: Spatial and Spatio-Temporal Conformal Prediction
Overview | 1. Geostatistical (Point-Referenced) Prediction | Visualizing the Spatial Layout | Defining a Model-Agnostic Predictor | Fitting Locally Weighted Conformal Prediction Intervals | 2. Comprehensive Diagnostic Suite (diagnose()) | 3. Areal (Lattice) Conformal Prediction | 4. Software Architecture & Portability | References

Last update: 2026-09-24
Started: 2026-09-24