Re: [R] Setting constraints in the glm package

2010-10-26 Thread David Winsemius
On Oct 26, 2010, at 9:27 AM, David Smith wrote: Many thanks for the help. You could express your thanks by including context the next time you present a follow-up (as requested in the Posting Guide). Only a minority of readers view this list on Nabble, so we don't see the web delivered

Re: [R] Setting constraints in the glm package

2010-10-26 Thread Ravi Varadhan
radhan, Ph.D. Assistant Professor, Division of Geriatric Medicine and Gerontology School of Medicine Johns Hopkins University Ph. (410) 502-2619 email: rvarad...@jhmi.edu - Original Message - From: David Winsemius Date: Tuesday, October 26, 2010 11:21 am Subject: Re: [R] Setting constraint

Re: [R] Setting constraints in the glm package

2010-10-26 Thread David Smith
Many thanks for the help. I assumed that I would need to account for the variables in the model, even though I wish to assign a zero coefficient to them. I've looked at the offset function, but does this not just assign the value 1 to the variables? How would I specify a zero coefficient to more

Re: [R] Setting constraints in the glm package

2010-10-26 Thread David Winsemius
On Oct 26, 2010, at 7:50 AM, Viechtbauer Wolfgang (STAT) wrote: The constraint b1=b2 in a model such as b0 + b1 x1 + b2 x2 + b3 x3 implies that b0 + b1 (x1 + x2) + b3 x3, so just add x1 and x2 (call this x12) and fit the model b0 + b1 x12 + b3 x3 and you have imposed the constraint that b1

Re: [R] Setting constraints in the glm package

2010-10-26 Thread Viechtbauer Wolfgang (STAT)
The constraint b1=b2 in a model such as b0 + b1 x1 + b2 x2 + b3 x3 implies that b0 + b1 (x1 + x2) + b3 x3, so just add x1 and x2 (call this x12) and fit the model b0 + b1 x12 + b3 x3 and you have imposed the constraint that b1=b2. To impose the constraint that b3=0, just fit the model without va