Description Usage Arguments Details Value Note See Also Examples
Covariance matrix for a covariance kernel object.
1 2 3 4 5 6 7 |
object |
An object with S4 class corresponding to a covariance kernel. |
X |
The usual matrix of spatial design points, with n rows and d cols where n is the number of spatial points and d is the 'spatial' dimension. |
compGrad |
Logical. If |
checkNames |
Logical. If |
index |
Integer giving the index of the derivation parameter in the official order. |
... |
Not used yet. |
The variance vector is computed in a C program using the .Call
interface. The R kernel function is evaluated within the C code using
eval
.
A vector of length nrow(X)
with general element V[i]
= K(X[i, ], X[i, ], θ) where
K(x1, x2,
θ) is the covariance kernel function.
The value of the parameter θ can be
extracted from the object with the coef
method.
coef
method
1 2 3 4 5 6 7 8 9 10 11 12 | myCov <- covTS(inputs = c("Temp", "Humid", "Press"),
kernel = "k1PowExp",
dep = c(range = "cst", shape = "cst"),
value = c(shape = 1.8, range = 1.1))
n <- 100; X <- matrix(runif(n*3), nrow = n, ncol = 3)
try(V1 <- varVec(myCov, X = X)) ## bad colnames
colnames(X) <- inputNames(myCov)
V2 <- varVec(myCov, X = X)
Xnew <- matrix(runif(n * 3), nrow = n, ncol = 3)
colnames(Xnew) <- inputNames(myCov)
V2 <- varVec(myCov, X = X)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.