Statalist The Stata Listserver


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

Re: st: ML estimation, no feasible values-Gauri, 6th July


From   Deepankar Basu <[email protected]>
To   [email protected]
Subject   Re: st: ML estimation, no feasible values-Gauri, 6th July
Date   Thu, 06 Jul 2006 22:09:19 -0400

Gauri,

Please disregard my earlier message; I was mistaken.
Sorry.
Deepankar

On Thu, 2006-07-06 at 17:52 -0400, Rodrigo A. Alfaro wrote:
> Dear Gauri,
> 
> Your program (mylog) solves a probit model. Is this what
> you want? I don't understand what loglinear means for you.
> If the answer is yes, I assume that your dependent variable
> is 0 or 1 and I suggest to use probit instead.
> 
> Otherwise, check -glm- command take a loof of options
> family() and link() maybe gaussian and log is what you need
> Or provide the model that you want to estimate.
> 
> Rodrigo.
> 
> 
> ----- Original Message ----- 
> From: "Deepankar Basu" <[email protected]>
> To: <[email protected]>
> Sent: Thursday, July 06, 2006 4:37 PM
> Subject: Re: st: ML estimation, no feasible values-Gauri, 6th July
> 
> 
> I think the only think that is missing is another empty bracket for
> -theta1- in your -ml model- command. Try the following:
> 
> ml model lf mylog (outputpsp=corareapsp labourpsp manurepsp
> fertiliserpsp tracpsp oxpsp irripsp) ()
> 
> Nothing else needs to be changed.
> HTH,
> Deepankar
> 
> On Thu, 2006-07-06 at 20:18 +0000, Gauri Khanna wrote:
> > Dear Statalist,
> >
> > I am trying to run an ml maximisation to calculate loglikehood values for 
> > my
> > model which has only one equation. It is a loglinear equation. 
> > unfortunately
> > I run into problems as no feasible values are found, error message r(491). 
> > I
> > even tried the ml search, repeat(10) and also with ml maximize,difficult 
> > and
> > also with ml maximize, ltol(1e-4) but I got the same error message r(491)
> > that I have pasted below. I only want to obtain the loglikelihood value
> > estimated, nothing else!
> >
> > MY COMMANDS:
> >
> > capture program drop mylog
> > program mylog
> > version 8
> > args lnf theta1
> > quietly replace `lnf' = ln(norm(`theta1')) if $ML_y1==1
> > quietly replace `lnf' = ln(norm(-`theta1')) if $ML_y1==0
> > end
> >
> > ml model lf mylog (outputpsp=corareapsp labourpsp manurepsp fertiliserpsp
> > tracpsp oxpsp irripsp)
> > ml check
> > ml search
> > ml maximize
> >
> >
> > OUTPUT GENERATED IN STATA
> >
> > . capture program drop mylog
> >
> > . program mylog
> >   1. version 8
> >   2. args lnf theta1
> >   3. quietly replace `lnf' = ln(norm(`theta1')) if $ML_y1==1
> >   4. quietly replace `lnf' = ln(norm(-`theta1')) if $ML_y1==0
> >   5. end
> >
> > .
> > . ml model lf mylog (outputpsp=corareapsp labourpsp manurepsp 
> > fertiliserpsp
> > tracpsp oxpsp
> > >  irripsp)
> >
> > . ml check
> >
> > Test 1:  Calling mylog to check if it computes log likelihood and
> >          does not alter coefficient vector...
> >          Passed.
> >
> > Test 2:  Calling mylog again to check if the same log likelihood value
> >          is returned...
> >          Passed.
> >
> > ------------------------------------------------------------------------------
> > The initial values are not feasible.  This may be because the initial 
> > values
> > have been chosen poorly or because there is an error in mylog and it
> > always returns missing no matter what the parameter values.
> >
> > Stata is going to use ml search to find a feasible set of initial values.
> > If mylog is broken, this will not work and you will have to press Break
> > to make ml search stop.
> >
> > Searching...
> > initial:       log likelihood =     -<inf>  (could not be evaluated)
> > searching for feasible values
> > ...........................................................
> > >
> > ......................................................................
> > >
> > .......................................................................................
> > >
> > .......................................................................................
> > >...........................................................................
> >
> > could not find feasible values
> > r(491);
> >
> >
> > Please HELP, what can I do with my model "mylog" to make it find feasible
> > values?
> >
> > Thanking you in advance.
> >
> > Gauri
> >
> > _________________________________________________________________
> > Don't just search. Find. Check out the new MSN Search!
> > http://search.msn.click-url.com/go/onm00200636ave/direct/01/
> >
> > *
> > *   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/
> *
> *   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index