Skip to content
Prev 298197 / 398498 Next

Constrained coefficients in lm (correction)

Hi Jorge,

Did you ever figure this out? I want to do the same thing with the
additional constraint of the coef for x1 = 2. 

lm(Y~offset(2*x1)+x2+x3,data=mydata)
where b= coeff for x2, c = coeff for x3, b+c=1 and b and c>0. 

I've loaded the systemfit package, but the suggestion "R*beta0 = q, where R
is R.restr and q is q.restr in the function call" makes no sense to me.

Cheers,
Rosie


--
View this message in context: http://r.789695.n4.nabble.com/Constrained-coefficients-in-lm-correction-tp861989p4634321.html
Sent from the R help mailing list archive at Nabble.com.