[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: RE: difficult ML program

From   Maarten buis <>
Subject   Re: st: RE: difficult ML program
Date   Fri, 7 Mar 2008 10:01:50 +0000 (GMT)

--- Lenny Stoeldraijer <> wrote:
> Is there a way to to put the following loglikelihood into a ml-code:
> D*(b+X)-exp(b)*Y 
> where b is the parameter to be estimated, D is a dummy variable and X
> and Y are vectors.

You can do that in -ml-, and it is not too hard, but I doubt whehter
your log likelihood function is correct. This looks suspiciously like
the log likelihood of an exponential regression in excelerated failure
time format, except that X would be in both the log hazard function
(fist part) and the log survivor function (second part). (I am assuming
that X is a list of explanatory variables with parameters that also
need to be estimated.) I would strongly suggest you take a good look at
-streg-, because I don't think you need to program this yourself.

If you are serious about doing it yourself you will have to buy
"Maximum Likelihood Estimation with Stata" by William Gould, Jeffrey
Pitblado, and William Sribney:

This kind of programming is not hard, but you need a good reference and
good store of example code to get you started. The book I just
reccomended will provide both.

-- Maarten

Maarten L. Buis
Department of Social Research Methodology
Vrije Universiteit Amsterdam
Boelelaan 1081
1081 HV Amsterdam
The Netherlands

visiting address:
Buitenveldertselaan 3 (Metropolitan), room Z434

+31 20 5986715

Rise to the challenge for Sport Relief with Yahoo! For Good
*   For searches and help try:

© Copyright 1996–2019 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index