Vladimir Vakhitov wrote:
I run a nl estimation on the function a part of which is
(gX1+(1-g)X2). Naturally I would like to constraint g to the interval
(0,1), not including the boundaries. It looks like there is no
"constraint" function for nl procedure. Any ideas?
--------------------------------------------------------------------------------
You can use Stata's inverse-logit transformation to map real numbers into
(0, 1). Use the -invlogit()- function in your -nl- model specification.
Somewhere I saw a list of handy nonlinear transformations, ln for strictly
positive, hyperbolic arc tangent for -1 to +1, etc.
Also, if you're interested in linear constraints, you can use -ml- for
nonlinear model fitting in lieu of -nl-. To see how, take a look at the FAQ
www.stata.com/support/faqs/stat/nl_ml8.html .
Joseph Coveney
*
* 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/