Statalist The Stata Listserver


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

st: Setting initial values in ML estimation


From   DEEPANKAR BASU <basu.15@osu.edu>
To   statalist@hsphsun2.harvard.edu
Subject   st: Setting initial values in ML estimation
Date   Mon, 17 Jul 2006 13:13:56 -0400

Hi!

As far as I can see, Stata takes zero initial values for all coefficients in an -ml- estimation (with method -lf-). How do I prevent Stata from doing so? How do I instead specify the initial values that I want Stata to start with? I want to do this to prevent the log-likelihood from getting stuck at -infinity; when it starts with initial values of zeros, the loglikelihood seems to get stuck at -infinity. Probably that is why it generates an error saying "cannot generate feasible values" when I use the -ml check- statement.
 
To set up my preferred initial values, I have tried the following: after the -ml model- statement, I have used -ml init- to set up my initial values for a subset of my coefficients. I have let Stata pick initial values for the rest of my coefficients. 

But, then when I see the iteration log with -ml max, trace - I see that the coefficient vector in iteration number 0 (zero) is still not the one I had specified with the -ml init- statement. What is going wrong? Any help would be appreciated.

Details of my statements are given below; I have included the first output from the iteration log though I do not know if that will be intelligible (the formatting gets messed up). As you will notice, I am setting up initial values for a bunch of constants figuring in my likelihood function. I am doing this to prevent the log-likelihood from getting stuck at -infinity (which it does if it starts with initial values of zeros).

. ml model lf gender66_lf (fsize: dfsize p21 p31 p32 = age edu rur work middle poor, nocons) (alpha:) (target: p41 p42 p43 p51 p52 p53 p54 p61 p62 p63 p64 p65 dfsize1 = edu rur work middle poor) /four /five /six /seven /eight /nine /ten /eleven /twelve /thirteen, tech(bhhh nr);

. #delimit cr
delimiter now cr
 
. ml init /four=1.0  

. ml init /five=0.32  

. ml init /seven=0.85 

. ml init /eight=1.42  

. ml init /ten=0.38 

. ml init /eleven=0.59 

. ml init /twelve=0.86 

. ml max, trace

initial:       log likelihood = -72821.591
rescaling entire vector +.
rescale:       log likelihood =  -72819.04
rescaling equations .......+.+++++++++++++++++++++++...++++++++++++++++++++++++++.
sign reverse ++++++++++++++++++++++++++.....++++++++++++++++++++++++.++++++++++++++++++++++..+...
rescaling equations .....................+++++++++++++++++++.....
rescale eq:    log likelihood = -72784.475
------------------------------------------------------------------------------
Iteration 0:
Coefficient vector:
        fsize:     fsize:     fsize:     fsize:     fsize:     fsize:     alpha:    target:    target:    target:    target:
          age        edu        rur       work     middle       poor      _cons        edu        rur       work     middle
r1          0          0          0          0          0          0          0          0          0          0          0

       target:    target:      four:      five:       six:     seven:     eight:      nine:       ten:    eleven:    twelve:
         poor      _cons      _cons      _cons      _cons      _cons      _cons      _cons      _cons      _cons      _cons
r1          0          0          1   1.91e-08          0      -.425        .71          0   1.13e-08    .036875        .86

     thirteen:
        _cons
r1          0

Thanks.
Deepankar




*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index