Statalist


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

Re: st: RE: difficult ML program


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

--- Lenny Stoeldraijer <[email protected]> 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: http://www.stata.com/bookstore/mle.html

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

http://home.fsw.vu.nl/m.buis/
-----------------------------------------


      ___________________________________________________________ 
Rise to the challenge for Sport Relief with Yahoo! For Good  

http://uk.promotions.yahoo.com/forgood/
*
*   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/



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