If you are maximising a likelihood then the covariance matrix of the estimates is (asymptotically) the inverse of the negative of the Hessian. The standard errors are the square roots of the diagonal elements of the covariance (from elsewhere on the web!, from Prof. Thomas Lumley and Spencer Graves, Eng.).
For a 95% confidence interval
interval<-data.frame(value=fit$par, upper=upper, lower=lower)
- If you are maximizing the log(likelihood), then the NEGATIVE of the
hessian is the "observed information" (such as here).
- If you MINIMIZE a "deviance" = (-2)*log(likelihood), then the HALF of the hessian is the observed information.
- In the unlikely event that you are maximizing the
likelihood itself, you need to divide the negative of the hessian by
the likelihood to get the observed information.
See this for further limitations due to optimization routine used.