File: RFcovmatrix.Rd

package info (click to toggle)
r-cran-randomfields 3.3.14-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 4,916 kB
  • sloc: cpp: 52,159; ansic: 3,015; makefile: 2; sh: 1
file content (72 lines) | stat: -rw-r--r-- 1,770 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
\name{RFcovmatrix}
\alias{RFcovmatrix}
\title{Covariance matrix}
\description{
 \command{\link{RFcovmatrix}} returns the covariance matrix for a set of points;
 }
\usage{
RFcovmatrix(model, x, y = NULL, z = NULL, T = NULL, grid, params,
            distances, dim,...)

}
\arguments{
  \item{model,params}{\argModel }
 \item{x}{\argX}
 \item{y,z}{\argYz}
 \item{T}{\argT}
 \item{grid}{\argGrid}
 \item{distances,dim}{\argDistances}
 \item{...}{\argDots}
}
\details{
 \command{RFcovmatrix} returns a covariance matrix. Here, a matrix of coordinates (\code{x}) or a vector or a matrix of \code{distances}
 is expected.
 
 \command{RFcovmatrix} also allows for variogram models. Then the negative of the
 variogram matrix is returned.
}

\value{

 \command{RFcovmatrix} returns a covariance matrix. 
}

\me

\seealso{	
 \command{\link{RMmodel}},
 \command{\link{RFsimulate}},
 \command{\link{RFfit}},
 \command{\link{RFfctn}},
 \command{\link{RFcalc}},
 \command{\link{RFcov}},
 \command{\link{RFpseudovariogram}},
 \command{\link{RFvariogram}}.
}

\examples{\dontshow{StartExample()}

##################################################
# 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)


\dontshow{FinalizeExample()}}
\keyword{spatial}