Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: Nonlinear regression and constraints


From   Richard Williams <Richard.A.Williams.5@ND.edu>
To   statalist@hsphsun2.harvard.edu
Subject   RE: st: Nonlinear regression and constraints
Date   Wed, 29 Jun 2005 01:22:36 -0500

At 10:43 PM 6/28/2005 -0700, Daniel Schneider wrote:
That might be possible. Let me clarify what I want to do: I want to find
the best (i.e. with the lowest SS) parameter values which are between 0
and 1 (including both), because by definition they can only be between
those two values.
I wonder what happens to your theory/definitions if both estimated values are significantly greater than 1! (Has a miracle occurred?) But suppose they are - can you then just impose the constraint that both parameters equal 1? Maybe there is some cheating here, but if a parameter is out of range you could constrain it to be in range.


>
> Also, my impression is that -nl- doesn't need the constraints option
> because constraints can be specified using the -nl- command itself.

Can you tell me how that can be done?
The Stata 9 Reference Manual entry for -nl- has an example on pp. 297-298. Simplifying it a bit, the following will cause the effects of the 3 RHS vars to be equal:

. sysuse auto
. nl (mpg = {b0} + {b1}*price + {b1}*weight + {b1}*displacement)

The reference manual basically says that this can save you some typing over doing the same thing in cnsreg. But, I also notice that -nl- gives you an R^2 stat, which was the request made in another thread today.

-------------------------------------------
Richard Williams, Notre Dame Dept of Sociology
OFFICE: (574)631-6668, (574)631-6463
FAX: (574)288-4373
HOME: (574)289-5227
EMAIL: Richard.A.Williams.5@ND.Edu
WWW (personal): http://www.nd.edu/~rwilliam
WWW (department): http://www.nd.edu/~soc

*
* 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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index