Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: RE: ML estimation using stata

From   "Nick Cox" <>
To   <>
Subject   st: RE: ML estimation using stata
Date   Thu, 15 Apr 2010 18:38:02 +0100

A general comment is that a good way to test a program like this is to
check that it produces sensible estimates for data that you know to be
well described by the model. Otherwise how you do know that you are not
trying to fit the wrong model to the data (or the model or the wrong

Also, is that really the log-likelihood? I expect to see more plus signs
in log-likelihood definitions. 


Sridhar Telidevara

ML estimation is not able to find feasible values for the following

X is a dummy variable in the data. I defined  X to be a global
variable and gave the name x1 to X.

global x1 X

program define myprog
      version 11

      args todo b lnf
      tempvar theta1 theta2
      mleval `theta1'=`b', eq(1)
      mleval `theta2'=`b', eq(2) scalar

	quietly {
mlsum `lnf' =


ml check resolves x1 to X. However, it is unable to find feasible
values.  I guess it's the problem with x1. Otherwise it's a simple
program.  can somebody please help?

*   For searches and help try:

© Copyright 1996–2016 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index