RMprod: Plain scalar product

Description Usage Arguments Details Value Note References See Also Examples

View source: R/RMmodels.R

Description

RMprod is a non-stationary covariance model given by

C(x,y) = \langle φ(x), φ(y)\rangle.

Usage

1
RMprod(phi, var, scale, Aniso, proj)

Arguments

phi

any function of class RMmodel

var,scale,Aniso,proj

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

Details

In general, this model defines a positive definite kernel and hence a covariance model for all functions φ with values in an arbitrary Hilbert space. However, as already mentioned above, φ should stem from a covariance or variogram model, here.

Value

RMprod returns an object of class RMmodel.

Note

Do not mix up this model with RMmult.

See also RMS for a simple, alternative method to set an arbitrary, i.e. location dependent, univariate variance.

References

Wendland, H. Scattered Data Approximation (2005) Cambridge: Cambridge University Press.

See Also

RMid, RMid, RMsum, RMmodel, RMmult.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
RFoptions(seed=0) ## *ANY* simulation will have the random seed 0; set
##                   RFoptions(seed=NA) to make them all random again


RFcov(RMprod(RMid()), as.matrix(1:10), as.matrix(1:10), grid=FALSE)


## C(x,y) =  exp(-||x|| + ||y||)
RFcov(RMprod(RMexp()), as.matrix(1:10), as.matrix(1:10), grid=FALSE)

## C(x,y) =  exp(-||x / 10|| + ||y / 10 ||)
model <- RMprod(RMexp(scale=10))
x <- seq(0,10,len=100)
z <- RFsimulate(model=model, x=x, y=x)
plot(z)

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