RMspheric: The Spherical Covariance Model

Description Usage Arguments Details Value Note References See Also Examples

View source: R/RMmodels.R

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 ≥ 0 between two points and is given by

C(r) = (1 - 1.5 r + 0.5 r^3) 1_{[0,1]}(r).

Usage

1
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.

Details

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

The covariance function has a finite range.

Value

RMspheric returns an object of class RMmodel.

Note

Although this model is valid on a sphere, do not mix up this model with valid models on a sphere; see spherical models for a list of the latter.

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, spherical models.

Examples

1
2
3
4
5
6
7
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))

Example output

Loading required package: sp
Loading required package: RandomFieldsUtils

Attaching package: 'RandomFields'

The following object is masked from 'package:RandomFieldsUtils':

    RFoptions

The following objects are masked from 'package:base':

    abs, acosh, asin, asinh, atan, atan2, atanh, cos, cosh, exp, expm1,
    floor, gamma, lgamma, log, log1p, log2, logb, max, min, round, sin,
    sinh, sqrt, tan, tanh, trunc

NULL
NOTE: simulation is performed with fixed random seed 0.
Set 'RFoptions(seed=NA)' to make the seed arbitrary.
New output format of RFsimulate: S4 object of class 'RFsp';
for a bare, but faster array format use 'RFoptions(spConform=FALSE)'.

RandomFields documentation built on Jan. 19, 2022, 1:06 a.m.