Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

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

st: RE: coefficients constraint in nlsur and nl does not work

From   "Brian P. Poi" <>
To   <>
Subject   st: RE: coefficients constraint in nlsur and nl does not work
Date   Wed, 17 Nov 2010 21:07:05 -0500

[] On Behalf Of ?????
Sent: Wednesday, November 17, 2010 8:11 PM

Dear all,

May I ask a question about non linear least square estimations.

I am trying to estimate following NLS with coefficient constraint:
nlsur( y1  =(A)*({bg: $sita_pc}+{mc})/({mc}-{ef: $s_pc2}+{bg:
$sita_pc})) (y2 = {ef: $s_pc2}/({bg: $sita_pc}+{mc}))

I impose constraints on two coefficients bg and ef that are respectively
same across variables and equations, but Stata get back different
coefficients for bg  (bg and bg00000: See results below) , ef is constraint
as I wrote.  I do not know why Stata get back bg00000, though I can suspect
spefication might have some problem.

I do really appreciate if you give me any suggestion to control this





When you specify a linear combination with -nlsur-, you should only specify
the variables once.  To refer to the linear combination again in your
function, you specify just the name and colon, not the variables that go
along with it.  I think your syntax should be

. nlsur (y1  =(A)*({bg: $sita_pc}+{mc})/({mc}-{ef: $s_pc2} + {bg:})) ///
        (y2 = {ef:}/({bg:}+{mc}))

(Arguably -nlsur- should probably exit with an error if you try and define a
linear combination twice, but it didn't in your case.)

   -- Brian Poi

*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index