I use optim() in R to do a lot of MLE. I've used the approach for a lot of problems, but the one I'm working on right now consists of fitting the parameters of the generalized extreme value distribution (GEV). There are three parameters (location scale shape), and I want to get the standard errors from this fit. An example of a paper doing this is Katz et al. 2005, and here is the online code for the article. I am unaffiliated with this publication. I should also point out that the GEV question is just an example of the type of approach I take -- most of my MLE fits are time series models (state-space). I could give more examples if needed.
1) Which of the arguments to optim() are of particular relevance to the statistical validity of using the optim() Hessian to computer standard errors?
- The first thing that comes to mind is the type of algorithm -- In R, optim() is a wrapper for several types of optimization algorithms (see above link for reference on optim()). I don't even think all of them return a Hessian.
- I also think that the parameters relating to the
reltol
andabstol
parameters could be important, but I don't fully understand what they do.
2) Is there some pre-treatment of the data (e.g., standardizing data before doing the MLE) that is advisable if I want to use the hessian to compute S.E.'s of the fitted parameters?
3) In general, of what do I need to be careful. I just don't want to incorrectly use this approach.
4) Is there anything you can think of that I definitely should not do?
Thanks.