[R] linear model with coefficient constraints

2009-10-06 Thread Rnewb
I would like to perform a regression like the one below: lm(x ~ 0 + a1 + a2 + a3 + b1 + b2 + b3 + c1 + c2 + c3, data=data) However, the data has the property that a1+a2+a3 = A, b1+b2+b3 = B, and c1+c2+c3 = C, where A, B, and C are positive constants. So there are two extra degrees of freedom, a

Re: [R] linear model with coefficient constraints

2009-10-06 Thread Dieter Menne
Rnewb wrote: > > I would like to perform a regression like the one below: > > lm(x ~ 0 + a1 + a2 + a3 + b1 + b2 + b3 + c1 + c2 + c3, data=data) > > However, the data has the property that a1+a2+a3 = A, b1+b2+b3 = B, and > c1+c2+c3 = C, where A, B, > Ravi Varadhan has an example how this co