| Version: | 1.2 | 
| License: | GPL-2 | 
| Description: | An implementation of a simple and highly optimized ordinary kriging algorithm to plot geographical data. | 
| Title: | Ordinary Kriging | 
| Author: | Omar E. Olmedo | 
| Maintainer: | Omar E. Olmedo <omareolmedo@gmail.com> | 
| Suggests: | maps | 
| Packaged: | 2022-06-24 16:37:35 UTC; omarolmedo | 
| NeedsCompilation: | yes | 
| Repository: | CRAN | 
| Date/Publication: | 2022-06-24 17:10:02 UTC | 
Map kriged data
Description
Create maps using the coordinates and predicted values in objects of class kriging.
Usage
  ## S3 method for class 'kriging'
image(x, main = NULL, xlab = "", ylab = "", col = heat.colors(100), ...)
Arguments
| x | object of class  | 
| main | See par. | 
| xlab | See par. | 
| ylab | See par. | 
| col | See par. | 
| ... | arguments, passed to image.default. | 
Author(s)
Omar E. Olmedo
See Also
Ordinary Kriging
Description
Simple and highly optimized ordinary kriging algorithm to plot geographical data
Usage
kriging(x, y, response, model = "spherical", lags = 10, pixels = 100, polygons = NULL)
Arguments
| x | vector of x-axis spatial points. | 
| y | vector of y-axis spatial points. | 
| response | vector of observed values. | 
| model | specification of the variogram model. Choices are  | 
| lags | number of lags. Defaults to  | 
| pixels | maximum number of points along either axis. Defaults to  | 
| polygons | list of polygons used to grid predicted values on to. The default value of  | 
Details
The kriging algorithm assumes a minimum number of observations in order to fit the variogram model.
Value
An object of class kriging that inherits from list and is composed of:
| model | character; variogram model. | 
| nugget | numeric; value of nugget parameter. | 
| range | numeric; value of range parameter. | 
| sill | numeric; value of sill parameter. | 
| map | data.frame; contains the predicted values along with the coordinate covariates. | 
| semivariogram | data.frame; contains the distance and semivariance values. | 
Author(s)
Omar E. Olmedo
See Also
Examples
# Krige random data for a specified area using a list of polygons
library(maps)
usa <- map("usa", "main", plot = FALSE)
p <- list(data.frame(usa$x, usa$y))
# Create some random data
x <- runif(50, min(p[[1]][,1]), max(p[[1]][,1]))
y <- runif(50, min(p[[1]][,2]), max(p[[1]][,2]))
z <- rnorm(50)
# Krige and create the map
kriged <- kriging(x, y, z, polygons=p, pixels=300)
image(kriged, xlim = extendrange(x), ylim = extendrange(y))
Plot Semivariogram
Description
Plots distance versus semivariance with a fitted curve indicating the model used.
Usage
## S3 method for class 'kriging'
plot(x, main = "Semivariogram", xlab = "Distance", ylab = "Semivariance", ...)
Arguments
| x | object of class  | 
| main | See par. | 
| xlab | See par. | 
| ylab | See par. | 
| ... | arguments, passed to plot.default. | 
Author(s)
Omar E. Olmedo