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" <lij53@univmail.cis.mcmaster.ca>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: putting constraint on self-written program using ml d0
Date   Thu, 27 Aug 2009 18:49:05 -0400

Thanks redacted. 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




On Wed, 26 Aug 2009 14:52:19 -0700
 redacted user <redacted@hotmail.com> wrote:
> I think that the constraint definition should be
>  
> constraint 1 [eq2]_cons=1.45
>  
> That is, it should not include the word "define."
>  
> I'm not sure about the [eq2] part.  I'm still working on ml stuff
> myself...
>  
> 
>  > From: lij53@univmail.cis.mcmaster.ca
> > Subject: st: putting constraint on self-written program using ml d0
> > To: statalist@hsphsun2.harvard.edu
> > Date: Wed, 26 Aug 2009 16:54:06 -0400
> > 
> > Hi all,
> > 
> > I wrote a program using ml package with d0 method. The purpose of
> the
> > program is similar with the ordered probit regression command
> oprobit.
> > After I define the program, I would like to impose some constraints
> on
> > the parameter of the cut-off values. E.g. I use ml model as
> > 
> > ml model d0 etai (hlthc=age gender index, nocons) /a1 /a2 /a3 /a4,
> > constraint (1)
> > 
> > where a1 a2 a3 a4 are four seperate equations defined in the
> program to
> > substitute in four cut-off values with "mleval" (we have 5 outcomes
> of
> > y in the data). How can I define the constraint? When I tried 
> > 
> > constraint 1 define [eq2]_cons=1.45
> > 
> > or 
> > 
> > constraint 1 define [eq2]a1=1.45
> > 
> > it gave me some error message. Do you know the reason for this?
> Thanks
> > a lot!
> > 
> > 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/
> _________________________________________________________________
> Windows Live: Keep your friends up to date with what you do online.
>
http://windowslive.com/Campaign/SocialNetworking?ocid=PID23285::T:WLMTAGL:ON:WL:en-US:SI_SB_online:082009
> *
> *   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index