logLikelihoodFun.Kriging: Compute Log-Likelihood of Kriging Model

View source: R/KrigingClass.R

logLikelihoodFun.KrigingR Documentation

Compute Log-Likelihood of Kriging Model

Description

Compute Log-Likelihood of Kriging Model

Usage

## S3 method for class 'Kriging'
logLikelihoodFun(object, theta, grad = FALSE, hess = FALSE, bench = FALSE, ...)

Arguments

object

An S3 Kriging object.

theta

A numeric vector of (positive) range parameters at which the log-likelihood will be evaluated.

grad

Logical. Should the function return the gradient?

hess

Logical. Should the function return Hessian?

bench

Logical. Should the function display benchmarking output?

...

Not used.

Value

The log-Likelihood computed for given \boldsymbol{theta}.

Author(s)

Yann Richet yann.richet@irsn.fr

Examples

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, kernel = "matern3_2")
print(k)

ll <- function(theta) logLikelihoodFun(k, theta)$logLikelihood

t <- seq(from = 0.001, to = 2, length.out = 101)
plot(t, ll(t), type = 'l')
abline(v = k$theta(), col = "blue")

rlibkriging documentation built on July 9, 2023, 5:53 p.m.