hessian | R Documentation |
Creates the hessian matrix for a given likelihood function.
hessian(lik, theta, ...)
lik |
function |
theta |
kx1 matrix |
... |
other parameters passed to |
Hessian kxk matrix where k is the number of parameters included in the theta matrix
lik <- function(theta) {
return(theta[1]^2 + theta[2]^2)
}
hessian(lik, c(1, 1))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.