# Re: st: My first Maximum Likelihood

 From Stas Kolenikov To statalist@hsphsun2.harvard.edu Subject Re: st: My first Maximum Likelihood Date Tue, 22 Oct 2002 13:43:03 -0400 (EDT)

```Renzo,

>  program define mylikelihood
>  	args lnf theta1 theta2
>  	replace
> `lnf'=37*ln(norm((1000-`theta1')/`theta2')+30*ln(1-norm((1000-`theta1')/
> `theta2'))
>  end
>
>
>  ml model lf mylikelihood (Rincome= LB marital educ race xnorcsiz)
>  ml check
>  ml search
>  ml maximize
>  ml clear
>
>
>  Any idea? Suggestions?

It would help a lot if you provided the output and the error messages you
got.

Off the top of my head, I see a couple of difficulties with your program.
The first one is that you have two `theta's, but only specify one equation
in your -ml model- statement -- you would need to add another one which
would probably look like /sigma=.

Another thing seems more substantial -- are you sure your model is
identified? My understanding of probit regressions has been that the
variance of residuals is standardized to one, and not without a reason:
otherwise, you can scale up both the regression coefficients and the
variance by a common factor without changing the model and the likelihood.
You might have this problem if you have a constant term among your
regressors. Stata will not be able to find all this out by itself, but you
won't make it converge. That's exactly what lack of identification is:
there are many values of the parameters which yield exactly the same
likelihood, i.e., there is a ridge in the likelihood profile, and Stata
would have tremendously difficult time around it (even with -difficult-
option).

---                                    Stas Kolenikov
--       Ph.D. student in Statistics at UNC-Chapel Hill
- http://www.komkon.org/~tacik/  -- Stas.Kolenikov@unc.edu

* This e-mail and all attachments to it are not intended to provide any
* reasonable point of view and was transmitted to you in error. It
* should be immediately deleted by all recepients unless they really
* enjoy communicating with the author :). Other restrictions apply.

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/
```