Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

Re: st: Problems with ML: misclassification-adjusted oprobit


From   Maarten buis <[email protected]>
To   [email protected]
Subject   Re: st: Problems with ML: misclassification-adjusted oprobit
Date   Tue, 23 Nov 2010 11:20:50 +0000 (GMT)

Try:
 ml model lf mc_prob (yvar = $expvar, nocons) /p01 /p10

Hope this helps,
Maarten

--------------------------
Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany

http://www.maartenbuis.nl
--------------------------


--- On Tue, 23/11/10, Ingo Isphording <[email protected]> wrote:

> From: Ingo Isphording <[email protected]>
> Subject: st: Problems with ML: misclassification-adjusted oprobit
> To: [email protected]
> Date: Tuesday, 23 November, 2010, 10:52
> Dear all,
> 
> I am trying to implement the misclassification adjustment
> for binary
> choice models proposed by Hausman et al. 1998 via maximum
> likelihood.
> ml check returns an error 133. I am quite a rookie in ml
> maximization,
> so maybe my problem is just a silly typo. So here is my
> program. Do
> you have any suggestions? Many thanks and best regards,
> 
> capture program drop mc_prob
> program define mc_prob
> args lnf beta1 p01 p10
> quietly replace
> `lnf'=ln(`p01'+(1-`p01'-`p10')*normal(`beta1')) if
> $ML_y1==1
> quietly replace `lnf'=ln(1-`p01'-(1-`p01'-`p10')*`beta1')
> if $ML_y1==0
> end
> 
> . ml model lf mc_prob (yvar = $expvar, nocons)
> 
> . ml check
> 
> Test 1:  Calling mc_prob to check if it computes log
> likelihood and
>          does not alter
> coefficient vector...
>          FAILED; mc_prob
> returned error 133.
> 
> Here is a trace of its execution:
> ------------------------------------------------------------------------------
> -> mc_prob __000004 __000003
>             - `begin'
>             = capture noisily
> version 9: mc_prob __000004 __000003
>              
> ----------------------------------------------------------------------------------------------
> begin mc_prob ---
>               - args lnf
> beta1 p01 p10
>               - quietly
> replace
> `lnf'=ln(`a01'+(1-`a01'-`a10')*normal(`beta1')) if
> $ML_y1==1
>               = quietly
> replace __000004=ln(+(1--)*normal(__000003)) if yvar==1
> unknown function +()
>              
> ------------------------------------------------------------------------------------------------
> end mc_prob ---
>             - `end'
>             = set trace off
> ------------------------------------------------------------------------------
> Fix mc_prob.
> r(133);
> *
> *   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/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index