spmodel Workshop

Author

Michael Dumelle, Matt Higham, and Jay Ver Hoef

Introduction

Hello 👋 and welcome! The purpose of this site is to provide workshop materials for the spmodel workshop at the 2023 Spatial Statistics Conference 🌎. Slides that accompany this workshop are available for download linked here. Slides that accompany a short presentation given elsewhere at the conference are available for download linked here. Slides are downloaded by clicking the “Download raw file” button via the ellipsis or downward arrow symbol on the right side of the screen.

What is spmodel? The spmodel R package (Dumelle, Higham, and Ver Hoef 2023) can be used to fit, summarize, and predict for a variety of spatial statistical models. Some of the things that spmodel can do include:

  • Fit spatial linear and generalized linear models for point-referenced and areal (lattice) data
  • Compare model fits and inspect model diagnostics
  • Predict at unobserved spatial locations (i.e., Kriging)
  • And much more!

Why use spmodel? There are many great spatial modeling packages in R. A few reasons to use spmodel for spatial analysis are that:

  • spmodel syntax is similar to base R syntax for functions like lm(), glm(), summary(), and predict(), making the transition from fitting non-spatial models to spatial models relatively seamless.
  • There are a wide variety of spmodel capabilities that give the user significant control over the specific spatial model being fit.
  • spmodel is compatible with other modern R packages like broom and sf.

Throughout the rest of these materials, we introduce spmodel through a few applied examples. We connect basic summary output with the spatial linear model for both point-referenced and areal (lattice) data. We discuss prediction and generalized linear spatial models for response variables whose distribution is not Gaussian. Along the way, we mention a few other advanced spmodel features.

Workshop Summary. The spmodel R package can be used to fit, summarize, and predict for a variety of spatial statistical models for both point-referenced and areal spatial data. What distinguishes spmodel from many other R packages for modeling spatial data is (1) a syntactic structure similar to the syntactic structure of base R functions lm() and glm() that makes spmodel relatively easy to learn, (2) the breadth of options that give the user a high amount of control over the model being fit, and (3) compatibility with other modern R packages like broom and sf. By the end of this workshop, participants can expect to be able to use spmodel to fit spatial linear models for point-referenced and areal (lattice) data, make predictions for unobserved spatial locations, fit anisotropic models for point-referenced data, fit spatial models with additional non-spatial random effects, fit generalized linear models for spatial data, and use big data methods to analyze large spatial data sets. More information on spmodel can be found on our website at https://usepa.github.io/spmodel/.

Technical Details

spmodel’s Technical Details Vignette contains the technical details for all functions in spmodel that perform computations.

Author Introduction

Michael Dumelle is a statistician for the United States Environmental Protection Agency (USEPA). He works primarily on facilitating the survey design and analysis of USEPA’s National Aquatic Resource Surveys (NARS), which characterize the condition of waters across the United States. His primary research interests are in spatial statistics, survey design, environmental and ecological applications, and software development.

Matt Higham is an assistant professor of statistics at St. Lawrence University, a small liberal arts college in Canton, New York. His primary research interests are in spatial statistics and in applications of statistics to ecological settings. He enjoys using R to teach undergraduate students the foundations of statistical computing and data science.

Jay Ver Hoef is a senior scientist and statistician for the Marine Mammal Lab, part of the Alaska Fisheries Science Center of NOAA Fisheries, located in Seattle, Washington, although Jay lives in Fairbanks, Alaska. He is a fellow of the American Statistical Association, and Jay consults on a wide variety of topics related to marine mammals and stream networks. His main statistical interests are in spatial statistics and Bayesian statistics, especially applied to ecological and environmental data.

Set Up

The packages that we use throughout this bundle include spmodel and ggplot2. To install and load them, run

Citation Information

If you use spmodel in a formal report or publication, please cite it:

citation(package = "spmodel")

To cite spmodel in publications use:

  Dumelle M, Higham M, Ver Hoef JM (2023). spmodel: Spatial statistical
  modeling and prediction in R. PLOS ONE 18(3): e0282524.
  https://doi.org/10.1371/journal.pone.0282524

A BibTeX entry for LaTeX users is

  @Article{,
    title = {{spmodel}: Spatial statistical modeling and prediction in {R}},
    author = {Michael Dumelle and Matt Higham and Jay M. {Ver Hoef}},
    journal = {PLOS ONE},
    year = {2023},
    volume = {18},
    number = {3},
    pages = {1--32},
    doi = {10.1371/journal.pone.0282524},
    url = {https://doi.org/10.1371/journal.pone.0282524},
  }

The spmodel journal article associated with the citation is linked here.

Disclaimer

The views expressed in this manuscript are those of the authors and do not necessarily represent the views or policies of the U.S. Environmental Protection Agency or the U.S. National Oceanic and Atmospheric Administration. Any mention of trade names, products, or services does not imply an endorsement by the U.S. government, the U.S. Environmental Protection Agency, or the U.S. National Oceanic and Atmospheric Administration. The U.S. Environmental Protection Agency and the U.S. National Oceanic and Atmospheric Administration do not endorse any commercial products, services, or enterprises.