powered by
Creates the hessian matrix for a given likelihood function.
hessian(lik, theta, ...)
Hessian kxk matrix where k is the number of parameters included in the theta matrix
function
kx1 matrix
other parameters passed to lik function.
lik
lik <- function(theta) { return(theta[1]^2 + theta[2]^2) } hessian(lik, c(1, 1))
Run the code above in your browser using DataLab