Nothing
checkGH <- function(object, tol = 1e-4) {
nll <- function(parm) -logLik(object, parm = parm)
### check gradient and hessian
suppressWarnings(gr <- numDeriv::grad(nll, coef(object)))
s <- Gradient(object)
ret <- isTRUE(all.equal(gr, s, check.attributes = FALSE, tol = tol))
suppressWarnings(H1 <- numDeriv::hessian(nll, coef(object)))
H2 <- Hessian(object)
ret <- ret & isTRUE(all.equal(H1, H2, check.attributes = FALSE, tol = tol))
return(ret)
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.