Statalist


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

Re: st: putting constraint on self-written program using ml d0


From   "J. Li" <[email protected]>
To   [email protected]
Subject   Re: st: putting constraint on self-written program using ml d0
Date   Fri, 28 Aug 2009 12:46:34 -0400

Glenn thank you very much. I will follow your suggestion and try that
out soon.

Jinhu



On Fri, 28 Aug 2009 11:43:35 +0100
 Glenn Goldsmith <[email protected]> wrote:
> <>
> 
> >From your first post, the equation name is a1, so yes, you should
> use that:
> 
>   constraint 1 [a1]_cons=1.45
> 
> Note that:
> 
>   constraint define 1 [a1]_cons=1.45
> 
> should also work. The problem with your earlier code was that you had
> "1 define", rather than "define 1". This would have defined your
> constraint 1 as "define [eq2]_cons=1.45", which doesn't make sense.
> 
> See also: http://www.stata.com/support/faqs/stat/constraints.html
> 
> HTH
> 
> Glenn.
> 
> "J. Li" <[email protected]> wrote:
> 
> Thanks Michael. I will try that out. I don't know if that could
> change
> the result though. I am not sure about the [eq2] part neither. But
> given that in the ml program, I use mleval to obtain the intermediate
> variables from the parameters as following:
> 
> mleval `mu' = `b', eq (1)
> mleval `a1' = `b', eq (2) scalar
> mleval `a2' = `b', eq (3) scalar
> mleval `a3' = `b', eq (4) scalar
> mleval `a4' = `b', eq (5) scalar
> 
> So I suppose when I want to contrain the parameter of the first
> cut-off
> value as 1.45, I should specify the equation name as eq2 so it is
> consistent with the name used in "mleval". Is this right? Or should I
> use
> 
> constraint 1 [a1]_cons=1.45
> 
> instead? Thanks!!
> 
> 
> Jinhu
> *
> *   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index