CGGP_internal_gneglogpost: Gradient of negative log likelihood posterior

View source: R/CGGP_gneglogpost.R

CGGP_internal_gneglogpostR Documentation

Gradient of negative log likelihood posterior

Description

Gradient of negative log likelihood posterior

Usage

CGGP_internal_gneglogpost(
  theta,
  CGGP,
  y,
  ...,
  return_lik = FALSE,
  ys = NULL,
  Xs = NULL,
  HandlingSuppData = "Correct"
)

Arguments

theta

Log of correlation parameters

CGGP

CGGP object

y

CGGP$design measured values

...

Forces you to name remaining arguments

return_lik

If yes, it returns a list with lik and glik

ys

Supplementary output data

Xs

Supplementary input data

HandlingSuppData

How should supplementary data be handled? * Correct: full likelihood with grid and supplemental data * Only: only use supplemental data * Ignore: ignore supplemental data

Value

Vector for gradient of likelihood w.r.t. x (theta)

Examples

cg <- CGGPcreate(d=3, batchsize=20)
Y <- apply(cg$design, 1, function(x){x[1]+x[2]^2})
cg <- CGGPfit(cg, Y)
CGGP_internal_gneglogpost(cg$thetaMAP, CGGP=cg, y=cg$y)

CollinErickson/CGGP documentation built on Feb. 6, 2024, 2:24 a.m.