constrainedKriging
Constrained, Covariance-Matching Constrained and Universal Point or Block Kriging
Description
Provides functions for efficient computation of non-linear spatial predictions with local change of support (Hofer, C. and Papritz, A. (2011) "constrainedKriging: An R-package for customary, constrained and covariance-matching constrained point or block kriging" <doi:10.1016/j.cageo.2011.02.009>). This package supplies functions for two-dimensional spatial interpolation by constrained (Cressie, N. (1993) "Aggregation in geostatistical problems" <doi:10.1007/978-94-011-1739-5_3>), covariance-matching constrained (Aldworth, J. and Cressie, N. (2003) "Prediction of nonlinear spatial functionals" <doi:10.1016/S0378-3758(02)00321-X>) and universal (external drift) Kriging for points or blocks of any shape from data with a non-stationary mean function and an isotropic weakly stationary covariance function. The linear spatial interpolation methods, constrained and covariance-matching constrained Kriging, provide approximately unbiased prediction for non-linear target values under change of support. This package extends the range of tools for spatial predictions available in R and provides an alternative to conditional simulation for non-linear spatial prediction problems with local change of support.
Downloads
303
Last 30 days
10405th
523
Last 90 days
523
Last year
Trend: +37.7% (30d vs prior 30d)
CRAN Check Status
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 | OK |
| r-oldrel-macos-x86_64 | OK |
| r-oldrel-windows-x86_64 | 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 | OK |
Check details (14 non-OK)
*
*
examples
Running examples in ‘constrainedKriging-Ex.R’ failed
The error most likely occurred in:
> ### Name: CKrige
> ### Title: Constrained, Covariance-matching Constrained and Universal
> ### Kriging
> ### Aliases: CKrige CKrige.points CKrige.polygons CKrige-methods
> ### CKrige,formula,data.frame,formula,preCKrigePoints-method
> ### CKrige,formula,data.frame,formula,preCKrigePolygons-method
> ### print.CKrige.exout.polygons summary.CKrige.exout.polygons
> ### print.CKrige.exout.points summary.CKrige.exout.points
> ### Keywords: methods
>
> ### ** Examples
>
>
>
>
> ### example 7: universal block Kriging of mean over whole domain
> ### cf chapter 4 of vignette of package georob
> ### (https://CRAN.R-project.org/package=georob)
> if(!requireNamespace("gstat", quietly = TRUE)){
+ stop("install package gstat to run example")
+ }
> ### load coalash data
> data(coalash, package="gstat")
>
> ### generate SpatialPointsDataFrame covering entire domain of coalash data
> coalash.domain <- rbind(c(0.5,0), c(16.5,0), c(16.5,24), c(0.5,24), c(0.5,0))
> coalash.domain <- SpatialPolygonsDataFrame(
+ SpatialPolygons(list(Polygons(list(Polygon(coalash.domain)), ID= "domain"))),
+ data=data.frame(x=8.5,y=12,row.names="domain"))
>
> ### universal block Kriging
> preCK_coalash <- preCKrige(newdata = coalash.domain, model = covmodel(modelname =
+ "exponential", mev = 1.023, nugget = 0, variance = 0.268,
+ scale = 1.907), pwidth = 16, pheight = 24)
> UK_coalash <- CKrige(formula = coalash ~ x, data = coalash,
+ locations = ~ x+y, object = preCK_coalash, method = 1)
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).
examples
Running examples in ‘constrainedKriging-Ex.R’ failed
The error most likely occurred in:
> ### Name: CKrige
> ### Title: Constrained, Covariance-matching Constrained and Universal
> ### Kriging
> ### Aliases: CKrige CKrige.points CKrige.polygons CKrige-methods
> ### CKrige,formula,data.frame,formula,preCKrigePoints-method
> ### CKrige,formula,data.frame,formula,preCKrigePolygons-method
> ### print.CKrige.exout.polygons summary.CKrige.exout.polygons
> ### print.CKrige.exout.points summary.CKrige.exout.points
> ### Keywords: methods
>
> ### ** Examples
>
>
>
>
> ### example 7: universal block Kriging of mean over whole domain
> ### cf chapter 4 of vignette of package georob
> ### (https://CRAN.R-project.org/package=georob)
> if(!requireNamespace("gstat", quietly = TRUE)){
+ stop("install package gstat to run example")
+ }
> ### load coalash data
> data(coalash, package="gstat")
>
> ### generate SpatialPointsDataFrame covering entire domain of coalash data
> coalash.domain <- rbind(c(0.5,0), c(16.5,0), c(16.5,24), c(0.5,24), c(0.5,0))
> coalash.domain <- SpatialPolygonsDataFrame(
+ SpatialPolygons(list(Polygons(list(Polygon(coalash.domain)), ID= "domain"))),
+ data=data.frame(x=8.5,y=12,row.names="domain"))
>
> ### universal block Kriging
> preCK_coalash <- preCKrige(newdata = coalash.domain, model = covmodel(modelname =
+ "exponential", mev = 1.023, nugget = 0, variance = 0.268,
+ scale = 1.907), pwidth = 16, pheight = 24)
> UK_coalash <- CKrige(formula = coalash ~ x, data = coalash,
+ locations = ~ x+y, object = preCK_coalash, method = 1)
*
*
*
*
*
*
*
*
*
*
Check History
ERROR 12 OK · 0 NOTE · 0 WARNING · 2 ERROR · 0 FAILURE Mar 9, 2026
examples
Running examples in ‘constrainedKriging-Ex.R’ failed The error most likely occurred in: > ### Name: CKrige > ### Title: Constrained, Covariance-matching Constrained and Universal > ### Kriging > ### Aliases: CKrige CKrige.points CKrige.polygons CKrige-methods > ### CKrige,formula,data.frame,formula,preCKrigePoints-method > ### CKrige,formula,data.frame,formula,preCKrigePolygons-method > ### print.CKrige.exout.polygons summary.CKrige.exout.polygons > ### print.CKrige.exout.points summa
examples
Running examples in ‘constrainedKriging-Ex.R’ failed The error most likely occurred in: > ### Name: CKrige > ### Title: Constrained, Covariance-matching Constrained and Universal > ### Kriging > ### Aliases: CKrige CKrige.points CKrige.polygons CKrige-methods > ### CKrige,formula,data.frame,formula,preCKrigePoints-method > ### CKrige,formula,data.frame,formula,preCKrigePolygons-method > ### print.CKrige.exout.polygons summary.CKrige.exout.polygons > ### print.CKrige.exout.points summa