Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | Nick Cox <njcoxstata@gmail.com> |
To | statalist@hsphsun2.harvard.edu |
Subject | Re: st: Constrained Regression in Stata |
Date | Fri, 3 Jun 2011 07:03:31 +0100 |
This is an FAQ. See How do I fit a regression with interval constraints in Stata? Isabel Cañette, StataCorp October 2006; updated July 2008; minor revisions April 2011 http://www.stata.com/support/faqs/stat/intconst.html Nick On Fri, Jun 3, 2011 at 12:24 AM, Meg22 <meadhbh2@gmail.com> wrote: > I need to do a constrained regression in stata-I need all the beta > coefficents to be positive and sum to 1. > > I have 11 independent variables so my regression is: > reg Rrf bills it lt cor lcvalue lcgrowth medcap smallcap noncanbonds us jap > if fundno ==`i' > > I need all the betas to be positive, sum to 1 and there to be a constant. > > I got the summing to 1 bit I think: > constraint define 1 bills + it + lt + cor + lcvalue + lcgrowth + medcap + > smallcap + noncanbonds + us + jap = 1 > cnsreg Rrf bills it lt cor lcvalue lcgrowth medcap smallcap noncanbonds us > jap, constraint(1) > > But I cant add the positive coefficents but * * 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/