Bookmark and Share

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


[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" <brian@poiholdings.com>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: coefficients constraint in nlsur and nl does not work
Date   Wed, 17 Nov 2010 21:07:05 -0500

From: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] 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
problem.

Thanks!

Mariko

--------------

Mariko,

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
   -- brian@poiholdings.com


*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index