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

# Re: st: coefficients constraint in nlsur and nl does not work

 From [email protected] (Vince Wiggins, StataCorp) To [email protected] Subject Re: st: coefficients constraint in nlsur and nl does not work Date Thu, 18 Nov 2010 20:10:40 -0600

```Mariko <[email protected]> has written that -nlsur- does not do what
he wants when he specifies the same linear combination twice.  Using a
simple but silly example,

. nlsur (y = {xb: x1 x2} + {xb: x1 x2})

estimates 4 parameters rather than the 2 Mariko wants.  We agree with
Mariko. Estimating 2 parameters is much more useful in this case.  We
will change this behavior in a future update.

In the interim, Mariko can follow Brian Poi's <[email protected]>
final suggestion and explicitly enter the second expression using the
parameter names that the first linear combination creates, e.g.,

. nlsur (y = {xb: x1 x2} + {xb_x1}*x1 + {xb_x2}*x2)

Or, he can dispense with linear combinations altogether and name his
two parameters whatever he wishes.

. nlsur (y = {b1}*x1 + {b2}*x2 + {b1}*x1 + {b2}*x2)

I believe the reason that Mariko is the first to encounter this
misfeature is because it does not occur if the linear combinations
occur strictly in two different equations.  For example,

. nlsur (y1 = {xb: x1 x2})
(y2 = {xb: x1 x2})

estimates just two parameters.

-- Vince
[email protected]

*
*   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/
```

• Follow-Ups: