| logLikFun | R Documentation |
Calculates the negative “concentrated” log-likelihood.
logLikFun(param, object, ...)
## Default S3 method:
logLikFun(param, object, x, y, dx = NULL, dy = NULL,
covtype = c("matern5_2", "matern3_2", "gaussian"),
tolerance = NULL, envir = NULL, ...)
## S3 method for class 'gekm'
logLikFun(param, object, ...)
param |
a numeric |
object |
a numeric |
x |
a |
y |
a |
dx |
the derivatives of the model matrix |
dy |
the |
covtype |
a |
tolerance |
a tolerance for the conditional number of the correlation matrix, see |
envir |
an |
... |
arguments to be passed to the default method. |
The value of the negative “concentrated” log-likelihood at param.
Carmen van Meegen
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")}.
logLikGrad for calculating gradients of the negative “concentrated” log-likelihood.
gekm for fitting a (gradient-enhanced) Kriging model.
## 2-dimensional example
# Generate coordinates and calculate slopes
x1 <- seq(-1.75, 1.75, length = 3)
x2 <- seq(-0.75, 0.75, length = 3)
X <- expand.grid(x1 = x1, x2 = x2)
y <- camel6(X)
dy <- camel6Grad(X)
dat <- data.frame(X, y)
deri <- data.frame(dy)
# Fit (gradient-enhanced) Kriging model
km.2d <- gekm(y ~ 1, data = dat, covtype = "gaussian", optimizer = "L-BFGS-B")
gekm.2d <- gekm(y ~ 1, data = dat, deriv = deri, covtype = "gaussian", optimizer = "L-BFGS-B")
# Compute negative 'concentrated' log-likelihood values
n.grid <- 30
theta1.grid <- seq(0.5, 4, length = n.grid)
theta2.grid <- seq(0.5, 2, length = n.grid)
params <- expand.grid(theta1 = theta1.grid, theta2 = theta2.grid)
logLik.km.2d <- apply(params, 1, logLikFun, km.2d)
logLik.gekm.2d <- apply(params, 1, logLikFun, gekm.2d)
# Plot negative 'concentrated' log-likelihood
par(mfrow = c(1, 2), oma = c(3.6, 3.5, 1.5, 0.2), mar = c(0, 0, 1.5, 0))
contour(theta1.grid, theta2.grid, matrix(logLik.km.2d, nrow = n.grid, ncol = n.grid),
nlevels = 50, main = "Kriging")
points(km.2d$theta[1], km.2d$theta[2], col = "red", pch = 16)
contour(theta1.grid, theta2.grid, matrix(logLik.gekm.2d, nrow = n.grid, ncol = n.grid),
nlevels = 50, main = "GEK", yaxt = "n")
points(gekm.2d$theta[1], gekm.2d$theta[2], col = "red", pch = 16)
title(main = "Negative 'concentrated' log-likelihood", outer = TRUE)
mtext(side = 1, outer = TRUE, line = 2.5, expression(theta[1]))
mtext(side = 2, outer = TRUE, line = 2.5, expression(theta[2]))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.