Skip to main content
U.S. flag

An official website of the United States government

Here’s how you know

Dot gov

Official websites use .gov
A .gov website belongs to an official government organization in the United States.

HTTPS

Secure .gov websites use HTTPS
A lock ( Lock A locked padlock ) or https:// means you’ve safely connected to the .gov website. Share sensitive information only on official, secure websites.

  • Environmental Topics
  • Laws & Regulations
  • Report a Violation
  • About EPA
Risk Assessment
Contact Us

Spatial Analysis and Statistical Modeling with R and spmodel

On this page:

  • Overview
Statistical models often assume that the data are independent. Incorrectly assuming data independence can harm models, resulting in incorrect slope estimates, misleading p-values, and poor predictions. The independence assumption is often inappropriate for spatial data, as spatial observations close together tend to be more similar than spatial observations far apart (Tobler’s Law). Statistical models for spatial data that incorporate spatial dependence tend to notably outperform similar models that rely on independence. Unfortunately, building spatial dependence directly into statistical models is challenging, both from theoretical and computational perspectives, limiting the use of these models in ecological settings. However, recent advances in R software, which we will discuss throughout the workshop, make acquiring spatial data and building spatial models much more accessible.In this workshop, we will first focus on R tools for accessing and handling the spatial data required to build models, highlighting R data libraries like EPA’s StreamCatTools, FedData, prism, and other data web services. Then we will focus on using these data to build spatial statistical models using the R package spmodel (https://usepa.github.io/spmodel/). With spmodel, ecologists can seamlessly incorporate spatial dependence into their statistical models. spmodel implements user-friendly syntax that builds from the lm() and glm() functions familiar to base-R users, which significantly eases the transition from fitting independence models to fitting spatial models. We will practice using spmodel to fit these spatial statistical models, interpret the model fit and inspect model diagnostics, perform model selection, and make predictions at unobserved locations. We also discuss some advanced spmodel tools and extensions to modeling binary, count, and skewed data, implementing random forests, and incorporating dependence via non-Euclidean distance measures like neighborhood distance or stream distance.

Impact/Purpose

This workshop will provide ecologists with hands-on tools for applying spatial models to their spatial data. They will get practice with software to fit these models and compare them to nonspatial models, usually noting the significant increase in model fit when incorporating the spatial component. They will also get background on what spatial models are and how they work. Finally, they will get practice handling spatial data in R, helping them fit these models to all sorts of different data types.

Citation

Dumelle, M. AND R. Hill. Spatial Analysis and Statistical Modeling with R and spmodel. 2024 Society for Freshwater Science Conference, Philadelphia, PA, June 02 - 06, 2024.
  • Risk Assessment Home
  • About Risk Assessment
  • Risk Recent Additions
  • Human Health Risk Assessment
  • Ecological Risk Assessment
  • Risk Advanced Search
    • Risk Publications
  • Risk Assessment Guidance
  • Risk Tools and Databases
  • Superfund Risk Assessment
  • Where you live
Contact Us to ask a question, provide feedback, or report a problem.
Last updated on July 15, 2024
United States Environmental Protection Agency

Discover.

  • Accessibility Statement
  • Budget & Performance
  • Contracting
  • EPA www Web Snapshots
  • Grants
  • No FEAR Act Data
  • Privacy
  • Privacy and Security Notice

Connect.

  • Data
  • Inspector General
  • Jobs
  • Newsroom
  • Open Government
  • Regulations.gov
  • Subscribe
  • USA.gov
  • White House

Ask.

  • Contact EPA
  • EPA Disclaimers
  • Hotlines
  • FOIA Requests
  • Frequent Questions

Follow.