Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: constrained regression but one constraint not being implemented
From
"Steve Martin" <[email protected]>
To
<[email protected]>
Subject
st: constrained regression but one constraint not being implemented
Date
Wed, 23 Mar 2011 15:26:49 -0000
I'm using Stata 11. Why does the following piece of code only impose the
second of the two constraints when estimating the constrained regression
(that is, the coefficient on lIMD2007 is unconstrained)?
Thanks.
Steve
global xvar "lneedCARAN lneedCARAN2 lg2_67netpoppheadOHP llonepenhx
lIMD2007"
forvalues i=1(1)10 {
constraint `i' lIMD2007=1-`i'/10
constraint `i+1' llonepenhx=1-`i'/10
cnsreg lallcancerssyllr68 $xvar [w=raw0607], constraints(`i'-`i+1')
}
*
* 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/