RFcovmatrix: Covariance matrix

Description Usage Arguments Details Value See Also Examples

View source: R/rf.R

Description

RFcovmatrix returns the covariance matrix for a set of points;

Usage

1
2
RFcovmatrix(model, x, y = NULL, z = NULL, T = NULL, grid, params,
            distances, dim,...)

Arguments

model,params \argModel
x \argX
y,z \argYz
T \argT
grid \argGrid
distances,dim \argDistances
... \argDots

Details

RFcovmatrix returns a covariance matrix. Here, a matrix of coordinates (x) or a vector or a matrix of distances is expected.

RFcovmatrix also allows for variogram models. Then the negative of the variogram matrix is returned.

Value

RFcovmatrix returns a covariance matrix.

See Also

RMmodel, RFsimulate, RFfit, RFfctn, RFcalc, RFcov, RFpseudovariogram, RFvariogram.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
##################################################
# Example: get covariance matrix C(x_i,x_j)    
# at given locations x_i, i=1,...,n 
#
# here for an isotropic stationary covariance model
# yields a 4 times 4 covariance matrix of the form
# C(0)   C(5)   C(3)   C(2.5)
# C(5)   C(0)   C(4)   C(2.5)
# C(3)   C(4)   C(0)   C(2.5)
# C(2.5) C(2.5) C(2.5) C(0)

model <- RMexp() # the covariance function C(x,y)=C(r) of this model
#                  depends only on the distance r between x and y
RFcovmatrix(model=model, distances=c(5,3,2.5,4,2.5,2.5), dim=4)

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