Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Constrained MLE


From   rgutierrez@stata.com (Roberto G. Gutierrez, StataCorp)
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Constrained MLE
Date   Mon, 01 Mar 2004 11:58:15 -0600

Theodore Papageorgiou <t2aix@hotmail.com> asks:

> I need to constraint 3 variables in my MLE:
> ml model lf theo (theta: r = r2 r3 r4, noconst) /sigma /sigmae /p0 /p1 /p2

> such that p0+p1+p2=1, and that p0,p1 and p2 are all probabilities between 0
> and 1.

Reparametrize your likelihood evaluator so that instead of evaluating in 
terms of p0, p1, and p2, it evaluates in terms of 

    q0 = logit(p0)
    q1 = logit(p1)

and plug-in the expression 1-invlogit(q0)-invlogit(q1) in place of p2.  This
reduces the dimensionality of the problem, getting rid of the "sum up to one"
constraint, and by using logit's you remap [0,1] variables to the whole real
line.

After estimating, you can remap q0 and q1 back to p0, p1, and p2 either within
in your program using -_diparm- (see Gould, Pitblado, and Sribney (2003) or
post-estimation using -nlcom- (see [R] nlcom).

--Bobby
rgutierrez@stata.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/



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index