Statalist The Stata Listserver


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

Re: st: a problem on convergence of mle


From   "Jian Zhang" <jzh@ucdavis.edu>
To   Maarten buis <maartenbuis@yahoo.co.uk>, statalist@hsphsun2.harvard.edu
Subject   Re: st: a problem on convergence of mle
Date   Tue, 17 Oct 2006 18:16:50 -0700 (PDT)

Thanks, Maarten!   My loglikelihood function comes from equation 11 of the paper by Carroll, 
Dynan and Krane in Review of Economics and Statistics 85(3) 2003.  Please let me know if you 
cann't get access to the paper. If not, i will send you an electronic version.  

Here is the program I wrote for the loglikelihood function for equation 11 in their paper.

capture program drop transform1
program transform1
	version 9.2 
	args lnf xb sigma theta
	tempvar g
	quietly {
		gen double `g'=(ln(`theta'*$ML_y1+sqrt((`theta')^2*($ML_y1)^2+1)))/`theta'
		replace `lnf'=-1/2*ln((`sigma')^2)-1/2*1/((`sigma')^2)*(`g'-`xb')^2 ///
		-1/2*ln(1+(`theta')^2*($ML_y1)^2)
	}
end	 
ml model lf transform1 (dependent variable=independent variable ....) /sigma /theta, robust 
cluster(groupvar)
ml maximize

When I used the whole sample, the loglikelihood didn't converge.  But when I used a subsample,  
it in fact converged.  Thus it seems to me that the log likelihood function is fine.

Many thanks,

Best regards, Jian  



> 
> 
> --- Jian Zhang <jzh@ucdavis.edu> wrote:
> > I am maximizing a log likelihood function using stata ml commands. 
> > But it doesn't converge. I just wonder if you have met this
> > unconvergence problem before. What are the reasons for this 
> > problem? 
> 
> Jian:
> Yes I came across that problem many times, and most times it meant that
> I made a mistake in the likelihood function. So if you also give us the
> likelihood function (and tell us the model you think it maximizes) we
> can see if that's correct.
> HTH,
> Maarten
> 
> 
> 
> 
> -----------------------------------------
> Maarten L. Buis
> Department of Social Research Methodology
> Vrije Universiteit Amsterdam
> Boelelaan 1081
> 1081 HV Amsterdam
> The Netherlands
> 
> visiting adress:
> Buitenveldertselaan 3 (Metropolitan), room Z434
> 
> +31 20 5986715
> 
> http://home.fsw.vu.nl/m.buis/
> -----------------------------------------
> 
> Send instant messages to your online friends http://uk.messenger.yahoo.com
> 
> *
> *   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/
> 
*
*   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