Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

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

Re: st: constrained linear least-squares problems without using ML

From   Maarten Buis <>
Subject   Re: st: constrained linear least-squares problems without using ML
Date   Wed, 29 Jun 2011 10:27:33 +0200

On Wed, Jun 29, 2011 at 3:51 AM, ali hashemi wrote:
> I would like to estimate an OLS model (y=b1*x1+b2*x2) with proportionate
> coefficients which means considering the following constraints:
> b1>0
> b2>0
> b1+b2=1
> I tried to estimate this using ML (for more details: findit inequality
> constraints)
> It works for some cases. Unfortunately, for many other cases it keeps giving
> this message: "flat or discontinuous region encountered"
> I'm told that ML is not the best option to estimate constrained linear
> least-squares models. lsqlin in MATLAB and quadratic programming in R are
> solutions that I have found in other packages. However, I'm not aware of any
> alternative method in Stata? Does anyone have any idea how constrained
> linear least-squares models can be estimated without using ML?

If you go to <>
you will see that the first thing it says is:

"Note:   The examples in this tutorial are for illustration purposes
only. If you need to fit a linear regression with interval
constraints, use the Stata command nl."

Now I expect you will still need to think very carefully about
starting values. If -ml- gets into trouble like that than I expect
that there is a good possibility that -nl- will also not converge
without good starting values. Even with good starting values you may
end up on a boundary solution, in which case it will not be easy to
get convergence whichever method you use.

Hope this helps,

Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
*   For searches and help try:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index