coef-methods | R Documentation |
Extract some of or all the coefficients of a covariance kernel object as vector, list or matrix.
## S4 method for signature 'covMan'
coef(object)
## S4 method for signature 'covTS'
coef(object, type = "all", as = "vector")
object |
An object representing a covariance kernel, the coefficient of which will be extracted. |
type |
Character string or vector specifying which type(s) of coefficients in the
structure will be extracted. Can be |
as |
Character string specifying the output structure to be used. The
default is |
A numeric vector of coefficients or a structure as specified by
as
containing the coefficients selected by type
.
The coef<-
replacement method which takes a vector of
replacement values.
d <- 3
myCov1 <- covTS(d = d, kernel = "k1Exp", dep = c(range = "input"),
value = c(range = 1.1))
myCov1
## versatile 'coef' method
coef(myCov1)
coef(myCov1, as = "matrix")
coef(myCov1, as = "list")
coef(myCov1, as = "matrix", type = "range")
coef(myCov1) <- c(0.2, 0.3, 0.4, 4, 16, 25)
coef(myCov1, as = "matrix")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.