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 regression... is not linear?

From   Maarten buis <>
Subject   Re: st: Constrained linear regression... is not linear?
Date   Tue, 7 Dec 2010 08:06:40 +0000 (GMT)

--- On Tue, 7/12/10, kokootchke wrote:
> I am trying to run the following constrained linear
> regression:
> y = ax + (1-a)z, with a in [0,1]
> What I'm doing is the following:
> constraint define 1 x+z = 1
> constraint define 2 x >= 0
> constraint define 3 x <= 1
> cnsreg y x z, c(1-3)

Constraints 2 and 3 are not allowed with -cnsreg-. The 
problem is the fact that you want to constrain the parameter
within a certain range, and this is not considered to be
linear constraint. If you want to estimate this model you'll
have to use either -nl- or -ml- as is discussed here:

Hope this helps,

Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen


*   For searches and help try:

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