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


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

re: st: set constraints for coefficients of independents in regression


From   Christopher Baum <kit.baum@bc.edu>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   re: st: set constraints for coefficients of independents in regression
Date   Thu, 2 Jun 2011 11:52:36 -0400

When I run a regression, I need to constrain the coefficients of four
independents to be four different values I calculate from previous
regressions.
The constrained coefficient for each independent variable is a
constant value. When I calculate each of these values from previous
regression should I save them as a new variable with a single value
for all the observations or as a vector?
How to use "constraint define" to set the constraints for the
coefficient of each independent?

sysuse auto,clear
reg price mpg weight turn displacement length gear_ratio
constraint def 1 weight = 4
constraint def 2 turn = 250
constraint def 3 displacement = 11
constraint def 4 length = -75
cnsreg price mpg weight turn displacement length gear_ratio, c(1/4)


Kit Baum   |   Boston College Economics & DIW Berlin   |   http://ideas.repec.org/e/pba1.html
                              An Introduction to Stata Programming  |   http://www.stata-press.com/books/isp.html
   An Introduction to Modern Econometrics Using Stata  |   http://www.stata-press.com/books/imeus.html




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


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