Statalist The Stata Listserver


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

st: Non-linear MLE programming + inequality constraints


From   aslihan arslan <[email protected]>
To   [email protected]
Subject   st: Non-linear MLE programming + inequality constraints
Date   Wed, 31 Jan 2007 17:36:42 -0800 (PST)

Thanks for those who responded to my previous
question. 
I have an updated question about the non-linear ML
programming and constraints: 

Is there way of introducing inequality constraints for
the *parameters* defined by "args" at the beginning of
an ml program? 

Thanks,
aslihan arslan

--- n j cox <[email protected]> wrote:

> I don't think anyone needs to look at your code,
> as at least one major problem is evident in
> your footnote.
> 
> You say you are using a constraint like
> 
> constraint 1 `alpha'>0
> 
> Here I take your "like" literally. It so happens
> that -constraint- doesn't complain if you specify
> a constraint in this way -- even if you have not
> specified a local macro called alpha -- but that
> absence of bad news is not good news.
> 
> First, your constraint is an inequality and as such
> not linear and thus outwith the reach of
> -constraint-.
> Perhaps -constraint- is a bad name and it really
> should be
> -linearconstraint- but that would get no votes in
> the
> Statavision Name Contest. No matter: it is plainly
> laid out in the help that -constraint- deals with
> linear
> constraints (and none other).
> 
> Second, although your constraint won't do, it is
> also
> wrong for another reason. Constraints take their
> identities
> from variable names and possibly equations, and
> -constraint-
> can't work with names that happen to be your private
> names
> for parameters, even if those names are used inside
> your
> program. (You certainly can't expect -constraint- to
> look
> inside your program!)
> 
> So far, all negative.
> 
> I would forget about the constraint. If your
> specification
> is sensible a positive value for alpha will emerge
> from the
> estimation. If it doesn't you have a signal that the
> apecification
> is suspect in that regard.
> 
> Alternatively, just try log(x + 1). The extra degree
> of freedom
> might come in handy. I used to think log(x + 1) was
> a fudge but
> I now regard it more fondly. It's a function that
> goes to 0 as x goes
> to 0 from above and it behaves like log x as x gets
> very large,
> so it is fairly well motivated.
> 
> Nick
> [email protected]
> 
> aslihan arslan
> 
> I am trying to program an ML model to estimate Log
> Cobb Douglas production function where some rhs
> variables have zero values. To make logs defined I
> am
> adding a constant to variables with zeros that needs
> to be estimated too (hence nonlinear MLE).  The
> function looks like:
> 
> lnY=B0+B1*lnX1+B2*ln (X2+alpha)+epsilon
> 
> where X2 is the variable with some zero values, and
> B0, B1, B2 and alpha need to be estimated. I am also
> using a constraint like:
> constraint 1 `alpha'>0.
> 
> My program does not work and I am wondering whether
> anybody can help me with this program. I did not
> paste
> the whole program here since it is a little long,
> but
> can send it to those who could help.
> *
> *   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/
> 




 
____________________________________________________________________________________
Now that's room service!  Choose from over 150,000 hotels
in 45,000 destinations on Yahoo! Travel to find your fit.
http://farechase.yahoo.com/promo-generic-14795097
*
*   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