[R] glm with linear restrictions

Bill.Venables at csiro.au Bill.Venables at csiro.au
Wed Oct 20 06:35:12 CEST 2010

If b1+b2+b3 = 0 can't you put b3 = -b1-b2 and re-write the model in terms of b1 and b2 alone?  The model is stil (g)linear. 

If the parameters to which you refer corresponds to the levels of a factor, then you can use the contr.sum contrast matrices.  It essentailly does the above.

-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On Behalf Of mege at students.unibe.ch
Sent: Wednesday, 20 October 2010 10:35 AM
To: r-help at r-project.org
Subject: [R] glm with linear restrictions

I'm looking for a function or package to estimate a glm with linear  
restrictions (e.g. the sum of some parameters needs to be zero). I  
found the function orlm in the package ic.infer which works for lm  
models, but I need it for glm.


R-help at r-project.org mailing list
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

More information about the R-help mailing list