Skip to content

spmodel

Spatial Statistical Modeling and Prediction

v0.12.0 · Jan 23, 2026 · GPL-3

Description

Fit, summarize, and predict for a variety of spatial statistical models applied to point-referenced and areal (lattice) data. Parameters are estimated using various methods. Additional modeling features include anisotropy, non-spatial random effects, partition factors, big data approaches, and more. Model-fit statistics are used to summarize, visualize, and compare models. Predictions at unobserved locations are readily obtainable. For additional details, see Dumelle et al. (2023) <doi:10.1371/journal.pone.0282524>.

Downloads

654

Last 30 days

5517th

654

Last 90 days

654

Last year

CRAN Check Status

2 ERROR
3 NOTE
9 OK
Show all 14 flavors
Flavor Status
r-devel-linux-x86_64-debian-clang OK
r-devel-linux-x86_64-debian-gcc OK
r-devel-linux-x86_64-fedora-clang ERROR
r-devel-linux-x86_64-fedora-gcc ERROR
r-devel-macos-arm64 OK
r-devel-windows-x86_64 OK
r-oldrel-macos-arm64 NOTE
r-oldrel-macos-x86_64 NOTE
r-oldrel-windows-x86_64 NOTE
r-patched-linux-x86_64 OK
r-release-linux-x86_64 OK
r-release-macos-arm64 OK
r-release-macos-x86_64 OK
r-release-windows-x86_64 OK
Check details (16 non-OK)
OK r-devel-linux-x86_64-debian-clang

*


            
OK r-devel-linux-x86_64-debian-gcc

*


            
ERROR r-devel-linux-x86_64-fedora-clang

examples

Running examples in ‘spmodel-Ex.R’ failed
The error most likely occurred in:

> ### Name: augment.spmodel
> ### Title: Augment data with information from fitted model objects
> ### Aliases: augment.spmodel augment.splm augment.spautor augment.spglm
> ###   augment.spgautor
> 
> ### ** Examples
> 
> spmod <- splm(z ~ water + tarp,
+   data = caribou,
+   spcov_type = "exponential", xcoord = x, ycoord = y
+ )
> augment(spmod)
# A tibble: 30 × 10
       z water tarp      x     y .fitted  .resid  .hat .cooksd .std.resid
   <dbl> <fct> <fct> <dbl> <dbl>   <dbl>   <dbl> <dbl>   <dbl>      <dbl>
 1  2.42 Y     clear     1     6    1.97  0.454  0.116 0.209        2.53 
 2  2.44 Y     shade     2     6    2.25  0.190  0.137 0.0468       1.09 
 3  1.81 Y     none      3     6    2.05 -0.237  0.137 0.0752      -1.38 
 4  1.97 N     clear     4     6    2.05 -0.0838 0.174 0.00211     -0.200
 5  2.38 N     shade     5     6    2.34  0.0407 0.153 0.0159       0.594
 6  2.22 Y     none      1     5    2.05  0.177  0.147 0.0434       1.00 
 7  2.10 N     clear     2     5    2.05  0.0512 0.156 0.00936      0.450
 8  1.80 Y     clear     3     5    1.97 -0.163  0.122 0.0135      -0.624
 9  1.96 Y     shade     4     5    2.25 -0.290  0.119 0.0642      -1.38 
10  2.10 Y     none      5     5    2.05  0.0522 0.131 0.0264       0.837
# ℹ 20 more rows
> spmod_sulf <- splm(sulfate ~ 1, data = sulfate, spcov_type = "exponential")
> augment(spmod_sulf)
Simple feature collection with 197 features and 6 fields
Geometry type: POINT
Dimension:     XY
Bounding box:  xmin: -2292550 ymin: 386181.1 xmax: 2173345 ymax: 3090370
Projected CRS: NAD83 / Conus Albers
# A tibble: 197 × 7
   sulfate .fitted .resid    .hat   .cooksd .std.resid           geometry
 *   <dbl>   <dbl>  <dbl>   <dbl>     <dbl>      <dbl>        <POINT [m]>
 1  12.9      5.92   7.00 0.00334 0.00161      -0.694  (817738.8 1080571)
 2  20.2      5.92  14.2  0.00256 0.00192       0.865  (914593.6 1295545)
 3  16.8      5.92  10.9  0.00259 0.000395      0.390  (359574.1 1178228)
 4  16.2      5.92  10.3  0.00239 0.000363      0.390  (265331.9 1239089)
 5   7.86     5.92   1.93 0.00202 0.00871      -2.07   (304528.8 1453636)
 6  15.4      5.92   9.43 0.00201 0.000240      0.345  (162932.8 1451625)
 7   0.986    5.92  -4.94 0.00380 0.000966     -0.503  (-1437776 1568022)
 8   0.425    5.92  -5.50 0.0138  0.00584      -0.646  (-1572878 1125529)
 9   3.58     5.92  -2.34 0.00673 0.0000148    -0.0467 (-1282009 1204889)
10   2.38     5.92  -3.54 0.0123  0.0000139    -0.0335 (-1972775 1464991)
# ℹ 187 more rows
> augment(spmod_sulf, newdata = sulfate_preds)
OMP: Warning #96: Cannot form a team with 24 threads, using 2 instead.
OMP: Hint Consider unsetting KMP_DEVICE_THREAD_LIMIT (KMP_ALL_THREADS), KMP_TEAMS_THREAD_LIMIT, and OMP_THREAD_LIMIT (if any are set).
ERROR r-devel-linux-x86_64-fedora-clang

re-building of vignette outputs

Error(s) in re-building vignettes:
--- re-building ‘introduction.Rmd’ using rmarkdown
OMP: Warning #96: Cannot form a team with 24 threads, using 2 instead.
OMP: Hint Consider unsetting KMP_DEVICE_THREAD_LIMIT (KMP_ALL_THREADS), KMP_TEAMS_THREAD_LIMIT, and OMP_THREAD_LIMIT (if any are set).
ERROR r-devel-linux-x86_64-fedora-gcc

examples

Running examples in ‘spmodel-Ex.R’ failed
The error most likely occurred in:

> ### Name: augment.spmodel
> ### Title: Augment data with information from fitted model objects
> ### Aliases: augment.spmodel augment.splm augment.spautor augment.spglm
> ###   augment.spgautor
> 
> ### ** Examples
> 
> spmod <- splm(z ~ water + tarp,
+   data = caribou,
+   spcov_type = "exponential", xcoord = x, ycoord = y
+ )
> augment(spmod)
# A tibble: 30 × 10
       z water tarp      x     y .fitted  .resid  .hat .cooksd .std.resid
   <dbl> <fct> <fct> <dbl> <dbl>   <dbl>   <dbl> <dbl>   <dbl>      <dbl>
 1  2.42 Y     clear     1     6    1.97  0.454  0.116 0.209        2.53 
 2  2.44 Y     shade     2     6    2.25  0.190  0.137 0.0468       1.09 
 3  1.81 Y     none      3     6    2.05 -0.237  0.137 0.0752      -1.38 
 4  1.97 N     clear     4     6    2.05 -0.0838 0.174 0.00211     -0.200
 5  2.38 N     shade     5     6    2.34  0.0407 0.153 0.0159       0.594
 6  2.22 Y     none      1     5    2.05  0.177  0.147 0.0434       1.00 
 7  2.10 N     clear     2     5    2.05  0.0512 0.156 0.00936      0.450
 8  1.80 Y     clear     3     5    1.97 -0.163  0.122 0.0135      -0.624
 9  1.96 Y     shade     4     5    2.25 -0.290  0.119 0.0642      -1.38 
10  2.10 Y     none      5     5    2.05  0.0522 0.131 0.0264       0.837
# ℹ 20 more rows
> spmod_sulf <- splm(sulfate ~ 1, data = sulfate, spcov_type = "exponential")
> augment(spmod_sulf)
Simple feature collection with 197 features and 6 fields
Geometry type: POINT
Dimension:     XY
Bounding box:  xmin: -2292550 ymin: 386181.1 xmax: 2173345 ymax: 3090370
Projected CRS: NAD83 / Conus Albers
# A tibble: 197 × 7
   sulfate .fitted .resid    .hat   .cooksd .std.resid           geometry
 *   <dbl>   <dbl>  <dbl>   <dbl>     <dbl>      <dbl>        <POINT [m]>
 1  12.9      5.92   7.00 0.00334 0.00161      -0.694  (817738.8 1080571)
 2  20.2      5.92  14.2  0.00256 0.00192       0.865  (914593.6 1295545)
 3  16.8      5.92  10.9  0.00259 0.000395      0.390  (359574.1 1178228)
 4  16.2      5.92  10.3  0.00239 0.000363      0.390  (265331.9 1239089)
 5   7.86     5.92   1.93 0.00202 0.00871      -2.07   (304528.8 1453636)
 6  15.4      5.92   9.43 0.00201 0.000240      0.345  (162932.8 1451625)
 7   0.986    5.92  -4.94 0.00380 0.000966     -0.503  (-1437776 1568022)
 8   0.425    5.92  -5.50 0.0138  0.00584      -0.646  (-1572878 1125529)
 9   3.58     5.92  -2.34 0.00673 0.0000148    -0.0467 (-1282009 1204889)
10   2.38     5.92  -3.54 0.0123  0.0000139    -0.0335 (-1972775 1464991)
# ℹ 187 more rows
> augment(spmod_sulf, newdata = sulfate_preds)
ERROR r-devel-linux-x86_64-fedora-gcc

re-building of vignette outputs

Error(s) in re-building vignettes:
--- re-building ‘introduction.Rmd’ using rmarkdown
OK r-devel-macos-arm64

*


            
OK r-devel-windows-x86_64

*


            
NOTE r-oldrel-macos-arm64

installed package size

  installed size is  5.8Mb
  sub-directories of 1Mb or more:
    R      2.0Mb
    data   1.7Mb
    doc    1.5Mb
NOTE r-oldrel-macos-x86_64

installed package size

  installed size is  5.9Mb
  sub-directories of 1Mb or more:
    R      2.0Mb
    data   1.8Mb
    doc    1.5Mb
NOTE r-oldrel-windows-x86_64

installed package size

  installed size is  5.0Mb
  sub-directories of 1Mb or more:
    R      1.2Mb
    data   1.7Mb
    doc    1.5Mb
OK r-patched-linux-x86_64

*


            
OK r-release-linux-x86_64

*


            
OK r-release-macos-arm64

*


            
OK r-release-macos-x86_64

*


            
OK r-release-windows-x86_64

*


            

Check History

ERROR 9 OK · 3 NOTE · 0 WARNING · 2 ERROR · 0 FAILURE Mar 9, 2026
ERROR r-devel-linux-x86_64-fedora-clang

examples

Running examples in ‘spmodel-Ex.R’ failed
The error most likely occurred in:

> ### Name: augment.spmodel
> ### Title: Augment data with information from fitted model objects
> ### Aliases: augment.spmodel augment.splm augment.spautor augment.spglm
> ###   augment.spgautor
> 
> ### ** Examples
> 
> spmod <- splm(z ~ water + tarp,
+   data = caribou,
+   spcov_type = "exponential", xcoord = x, ycoord = y
+ )
> augment(spmod)
# A tibble: 30 × 10
       z water tarp      x     y .fitted  .resid  .h
ERROR r-devel-linux-x86_64-fedora-gcc

examples

Running examples in ‘spmodel-Ex.R’ failed
The error most likely occurred in:

> ### Name: augment.spmodel
> ### Title: Augment data with information from fitted model objects
> ### Aliases: augment.spmodel augment.splm augment.spautor augment.spglm
> ###   augment.spgautor
> 
> ### ** Examples
> 
> spmod <- splm(z ~ water + tarp,
+   data = caribou,
+   spcov_type = "exponential", xcoord = x, ycoord = y
+ )
> augment(spmod)
# A tibble: 30 × 10
       z water tarp      x     y .fitted  .resid  .h
NOTE r-oldrel-macos-arm64

installed package size

  installed size is  5.8Mb
  sub-directories of 1Mb or more:
    R      2.0Mb
    data   1.7Mb
    doc    1.5Mb
NOTE r-oldrel-macos-x86_64

installed package size

  installed size is  5.9Mb
  sub-directories of 1Mb or more:
    R      2.0Mb
    data   1.8Mb
    doc    1.5Mb
NOTE r-oldrel-windows-x86_64

installed package size

  installed size is  5.0Mb
  sub-directories of 1Mb or more:
    R      1.2Mb
    data   1.7Mb
    doc    1.5Mb

Reverse Dependencies (1)

imports

Dependency Network

Dependencies Reverse dependencies generics Matrix sf tibble SSN2 spmodel

Version History

new 0.12.0 Mar 9, 2026