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, **statalist.org** is already up and running.

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

From |
kokootchke <kokootchke@hotmail.com> |

To |
statalist <statalist@hsphsun2.harvard.edu> |

Subject |
st: Constrained linear regression... is not linear? |

Date |
Mon, 6 Dec 2010 20:17:11 -0500 |

Hello! I am trying to run the following constrained linear regression: y = ax + (1-a)z, with a in [0,1] I am using the cnsreg command, which I've used before but now it's giving me error r(131) (not possible with test), which I never saw before. I did a search for this error and it says it happens when the regression is non-linear... but I don't understand what is non-linear about my constraints or my regression. What I'm doing is the following: constraint define 1 x+z = 1constraint define 2 x>=0constraint define 3 x<=1 cnsreg y x z, c(1-3) But this doesn't work. If I run the regression only using constraint 1, the regression does run but it gives me a coefficient for x which is outside of [0,1]... but I don't want this. Does it mean that there's no solution with the three restrictions in place? I'm using Stata v10. I appreciate any suggestions. Thanks in advance.Adrian * * 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**:**Re: st: Constrained linear regression... is not linear?***From:*Maarten buis <maartenbuis@yahoo.co.uk>

**RE: st: Constrained linear regression... is not linear?***From:*kokootchke <kokootchke@hotmail.com>

**References**:**Re: st: too many base levels specified?***From:*jpitblado@stata.com (Jeff Pitblado, StataCorp LP)

**Re: st: too many base levels specified?***From:*Traci Schlesinger <traci.schlesinger@gmail.com>

- Prev by Date:
**Re: st: too many base levels specified?** - Next by Date:
**RE: st: Constrained linear regression... is not linear?** - Previous by thread:
**Re: st: too many base levels specified?** - Next by thread:
**RE: st: Constrained linear regression... is not linear?** - Index(es):