Learn R Programming

RandomFields (version 3.1.16)

RMspheric: The Spherical Covariance Model

Description

RMspheric is a stationary isotropic covariance model which is only valid up to dimension 3. The corresponding covariance function only depends on the distance $r \ge 0$ between two points and is given by $$C(r) = \left(1 - \frac{3}{2} r + \frac{1}{2} r^3\right) 1_{[0,1]}(r)$$

Usage

RMspheric(var, scale, Aniso, proj)

Arguments

var,scale,Aniso,proj
optional arguments; same meaning for any RMmodel. If not passed, the above covariance function remains unmodified.

Value

RMspheric returns an object of class RMmodel

Details

This covariance model is valid only for dimensions less than or equal to 3.

The covariance function has a finite range.

References

Gelfand, A. E., Diggle, P., Fuentes, M. and Guttorp, P. (eds.) (2010) Handbook of Spatial Statistics. Boca Raton: Chapman & Hall/CRL.

See Also

RMmodel, RFsimulate, RFfit, linkspherical models

Examples

Run this code
RFoptions(seed=0) ## *ANY* simulation will have the random seed 0; set
##                   RFoptions(seed=NA) to make them all random again

model <- RMspheric()
x <- seq(0, 10, 0.02)
plot(model)
plot(RFsimulate(model, x=x))

Run the code above in your browser using DataLab