Notice: On March 31, it was **announced** that Statalist is moving from an email list to a **forum**. The old list will shut down on April 23, and its replacement, **statalist.org** is already up and running.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

From |
Peter Grand <grand@ihs.ac.at> |

To |
"statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu> |

Subject |
st: AW: RE: Calling -ml- program with more than one equation! |

Date |
Fri, 23 Mar 2012 13:37:08 +0000 |

Hi Jean-Francois! First, thank you for the references you sent me a few days ago! I know that. However, I try to understand what happens `within' Stata if I call the ml program with the empty secod parenthesis and why that specific error message shows up. Best, Peter Grand grand(at)ihs.ac.at Institute for Advanced Studies Stumpergasse 56 1060 Vienna ________________________________________ Von: owner-statalist@hsphsun2.harvard.edu [owner-statalist@hsphsun2.harvard.edu]" im Auftrag von "Jean-Francois.Bertrand@fin.gc.ca [Jean-Francois.Bertrand@fin.gc.ca] Gesendet: Freitag, 23. März 2012 14:21 Bis: statalist@hsphsun2.harvard.edu Betreff: st: RE: Calling -ml- program with more than one equation! Hi Peter, You only have one equation to evaluate, the second parenthesis is for a second equation that is not in your code (which is ok for a logit). Jean-François Bertrand -----Original Message----- From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Peter Grand Sent: March 23, 2012 9:11 AM To: statalist@hsphsun2.harvard.edu Subject: st: Calling -ml- program with more than one equation! Dear Statauser! Maybe that is a dumb question. I have written a conditional logit ml program, which works fine when I call it as follows: ml model d0 myclog (Eq1: vote_choice_eu=u_pr_eu pid, nocons) ; However, if I call it with ml model d0 myclog (Eq1: vote_choice_eu=u_pr_eu pid, nocons) (); I get the error message: `could not calculate numerical derivatives -- discontinuous region with missing values encountered' Does anyone know what happens if I call a d0 program with extra parenthesis, but do not add a second equation with mleval? Thank you very much for your help! Best, Peter Grand **************************************************************** program myclog ; args todo b lnf ; tempvar denom p xb ; local by $MY_panel ; mleval `xb' = `b', eq(1) ; qui { ; egen double `denom' = sum(exp(`xb')), by(`by') ; gen double `p' = exp(`xb')/`denom' ; mlsum `lnf' = $ML_y1*ln(`p') if $ML_y1==1 ; if (`todo'==0 | `lnf'>=.) exit ; } ; end ; **************************************************************** Peter Grand grand(at)ihs.ac.at Institute for Advanced Studies Stumpergasse 56 1060 Vienna * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/ * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/ * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/

**Follow-Ups**:**st: RE: AW: RE: Calling -ml- program with more than one equation!***From:*<Jean-Francois.Bertrand@fin.gc.ca>

**References**:**st: Calling -ml- program with more than one equation!***From:*Peter Grand <grand@ihs.ac.at>

**st: RE: Calling -ml- program with more than one equation!***From:*<Jean-Francois.Bertrand@fin.gc.ca>

- Prev by Date:
**Re: st: use of subinstr** - Next by Date:
**Re: st: use of subinstr** - Previous by thread:
**st: RE: Calling -ml- program with more than one equation!** - Next by thread:
**st: RE: AW: RE: Calling -ml- program with more than one equation!** - Index(es):