logLik.gekm: Log-Likelihood of a gekm Object

View source: R/logLik.gekm.R

logLik.gekmR Documentation

Log-Likelihood of a gekm Object

Description

Returns the log-likelihood of a gekm object.

Usage

## S3 method for class 'gekm'
logLik(object, ...)

Arguments

object

an object of class gekm.

...

not used.

Value

The log-likelihood value of the model evaluated at the estimated coefficients.

Author(s)

Carmen van Meegen

References

Oakley, J. and O'Hagan, A. (2002). Bayesian Inference for the Uncertainty Distribution of Computer Model Outputs. Biometrika, 89(4):769–784. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1093/biomet/89.4.769")}.

Park, J.-S. and Beak, J. (2001). Efficient Computation of Maximum Likelihood Estimators in a Spatial Linear Model with Power Exponential Covariogram. Computers & Geosciences, 27(1):1–7. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1016/S0098-3004(00)00016-9")}.

Rasmussen, C. E. and Williams, C. K. I. (2006). Gaussian Processes for Machine Learning. The MIT Press. https://gaussianprocess.org/gpml/.

Santner, T. J., Williams, B. J., and Notz, W. I. (2018). The Design and Analysis of Computer Experiments. 2nd edition. Springer-Verlag.

Zimmermann, R. (2015). On the Condition Number Anomaly of Gaussian Correlation Matrices. Linear Algebra and its Applications, 466:512–526. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1016/j.laa.2014.10.038")}.

See Also

gekm for fitting a (gradient-enhanced) Kriging model.

Examples

## 1-dimensional example

# Define test function and its gradient from Oakley and O’Hagan (2002)
f <- function(x) 5 + x + cos(x)
fGrad <- function(x) 1 - sin(x)

# Generate coordinates and calculate slopes
x <- seq(-5, 5, length = 5)
y <- f(x)
dy <- fGrad(x)
dat <- data.frame(x, y)
deri <- data.frame(x = dy)

# Fit (gradient-enhanced) Kriging model
km.1d <- gekm(y ~ x, data = dat, covtype = "gaussian", theta = 1)
gekm.1d <- gekm(y ~ x, data = dat, deriv = deri, covtype = "gaussian", theta = 1)

# Extract log-likelihood value 
logLik(km.1d)
logLik(gekm.1d)

gek documentation built on Jan. 31, 2026, 1:07 a.m.

Related to logLik.gekm in gek...