logMargPostFun.Kriging | R Documentation |
Compute the log-marginal posterior of a kriging model, using the prior XXXY.
## S3 method for class 'Kriging'
logMargPostFun(object, theta, return_grad = FALSE, bench = FALSE, ...)
object |
S3 Kriging object. |
theta |
Numeric vector of correlation range parameters at which the function is to be evaluated. |
return_grad |
Logical. Should the function return the gradient (w.r.t theta)? |
bench |
Logical. Should the function display benchmarking output? |
... |
Not used. |
The value of the log-marginal posterior computed for the given vector theta.
Yann Richet yann.richet@irsn.fr
XXXY A reference describing the model (prior, ...)
rgasp
in the RobustGaSP package.
f <- function(x) 1 - 1 / 2 * (sin(12 * x) / (1 + x) + 2 * cos(7 * x) * x^5 + 0.7)
set.seed(123)
X <- as.matrix(runif(10))
y <- f(X)
k <- Kriging(y, X, "matern3_2", objective="LMP")
print(k)
lmp <- function(theta) logMargPostFun(k, theta)$logMargPost
t <- seq(from = 0.01, to = 2, length.out = 101)
plot(t, lmp(t), type = "l")
abline(v = k$theta(), col = "blue")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.