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: ML estimation using stata

From   Sridhar Telidevara <>
Subject   st: ML estimation using stata
Date   Thu, 15 Apr 2010 13:25:41 -0400

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

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' = $x1*(ln((exp(-`theta1')*$ML_y1)^(exp(-`theta2'))*exp(-`theta2')/((1+(exp(-`theta1')*$ML_y1)^(exp(-`theta2')))^2*$ML_y1))...


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–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index