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

From |
"J. Li" <lij53@univmail.cis.mcmaster.ca> |

To |
statalist@hsphsun2.harvard.edu |

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 <glenn.goldsmith@gmail.com> 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" <lij53@univmail.cis.mcmaster.ca> 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/

**References**:**Re: st: putting constraint on self-written program using ml d0***From:*Glenn Goldsmith <glenn.goldsmith@gmail.com>

- Prev by Date:
**Re: st: Has anyone used STATA 11 on Windows 7 (32bit)?** - Next by Date:
**st: Strange behavior or bug? - svy : total returns different results in Stata versons 9, 10 and 11** - Previous by thread:
**Re: st: putting constraint on self-written program using ml d0** - Next by thread:
**st: xi help** - Index(es):

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