semivariogram {geostats}R Documentation

semivariogram

Description

Plots the semivariance of spatial data against inter-sample distance, and fits a spherical equation to it.

Usage

semivariogram(
  x,
  y,
  z,
  bw = NULL,
  nb = 13,
  plot = TRUE,
  fit = TRUE,
  model = c("spherical", "exponential", "gaussian"),
  ...
)

Arguments

x

numerical vector

y

numerical vector of the same length as x

z

numerical vector of the same length as x

bw

(optional) the bin width of the semivariance search algorithm

nb

(optional) the maximum number of bins to evaluate

plot

logical. If FALSE, suppresses the graphical output

fit

logical. If TRUE, returns the sill, nugget and range.

model

the parametric model to fit to the empirical semivariogram (only used if fit=TRUE).

...

optional arguments to be passed on to the generic plot function

Value

returns a list with the estimated semivariances at different distances for the data, and (if fit=TRUE), a vector with the sill, nugget and range.

Examples

data(meuse,package='geostats')
semivariogram(x=meuse$x,y=meuse$y,z=log(meuse$cadmium))

[Package geostats version 1.6 Index]