1

Often times when I do custom maximum likelihood estimation in R I will plot cuts through the likelihood along all coordinates of the parameter vector so as to get a sense of what the likelihood surface looks around the parameter vector R claims is the optimum (I am not the only one to have had this idea, apparently). Often times this has proved to be instructive and once or twice it has helped me find out that the vector, which I thought maximized the likelihood, really didn't. The plots I make look a little something like this (note that for var3 the parameter doesn't maximize the likelihood whereas for all others it looks like it's pretty close):

Likelihood neighborhoods

My question is: Is there an easy way -- or really any way at all -- to generate such plots in Stata?

Community
  • 1
  • 1
RoyalTS
  • 9,545
  • 12
  • 60
  • 101
  • You could and should be using standard searches to find this out e.g. http://www.stata-journal.com/sjsearch.html?choice=keyword&q=profile+likelihood – Nick Cox Jan 25 '14 at 10:13
  • Thanks! I had tried to search for this, but it never occurred to me to search for "profile likelihood" and even of that result set only one result actually helps me. – RoyalTS Jan 25 '14 at 18:15
  • I just spent 3 hours trying to get this to work I'm still no closer to any solution. None of the results at the link you posted get me very far because they all seem to deal with various special estimation commands rather than generic `ml`s. Then I discovered `ml plot`, which does exactly what I want but apparently only works after the model is defined but before the maximum has been found. Running it after `ml maximize` results in a `model not defined` error. What am I missing? – RoyalTS Jan 25 '14 at 22:25
  • I am not aware that you are missing anything. The implication of your searches is that you need to write your own program for what you want. I should have said that there is a way to do this in Stata, but it's not easy. – Nick Cox Jan 26 '14 at 11:40

0 Answers0