Re: [R] forcing a zero level in contr.sum

2010-07-08 Thread Bond, Stephen
o:pda...@gmail.com] Sent: Thursday, July 08, 2010 4:09 AM To: Bond, Stephen Cc: r-help@r-project.org Subject: Re: [R] forcing a zero level in contr.sum Bond, Stephen wrote: > I need to use contr.sum and observe that some levels are not > statistically different from the overall mean of zero.

Re: [R] forcing a zero level in contr.sum

2010-07-08 Thread Peter Dalgaard
Bond, Stephen wrote: > I need to use contr.sum and observe that some levels are not > statistically different from the overall mean of zero. What is the > proper way of forcing the zero estimate? It seems the column > corresponding to that level should become a column of zeros. Is there > a way to

Re: [R] forcing a zero level in contr.sum

2010-07-07 Thread Gabor Grothendieck
On Wed, Jul 7, 2010 at 10:55 PM, Charles C. Berry wrote: > > > contr.mysum <- function (n, contrasts = TRUE, sparse = FALSE, > base=length(levels)) > { The memisc package has a contr.sum function with a base= argument. __ R-help@r-project.org mailing l

Re: [R] forcing a zero level in contr.sum

2010-07-07 Thread Berwin A Turlach
G'day Stephen, On Wed, 7 Jul 2010 16:41:18 -0400 "Bond, Stephen" wrote: > Please, do not post if you do not know the answer. People will see > this has answers and skip. > > I tried with > mat1=contrasts(fixw$snconv) > mat1=mat1[,-2] > summary(frm2sum <- glm(resp.frm ~ > C(snconv,contr=mat1)+m

Re: [R] forcing a zero level in contr.sum

2010-07-07 Thread Charles C. Berry
this will only work if a) the GM=0 and b) there is only one term on the RHS of the model, and c) probably a bunch of other restrictions.) -- David. > > Thank you. > > Stephen Bond > -Original Message- > From: David Winsemius [mailto:dwinsem...@comcast.net] > Sent:

Re: [R] forcing a zero level in contr.sum

2010-07-07 Thread David Winsemius
et] Sent: Wednesday, July 07, 2010 4:15 PM To: Bond, Stephen Cc: r-help@r-project.org Subject: Re: [R] forcing a zero level in contr.sum On Jul 7, 2010, at 4:04 PM, Bond, Stephen wrote: Clarifying my question: options(contrasts = c("contr.sum", "contr.poly")) contrasts()

Re: [R] forcing a zero level in contr.sum

2010-07-07 Thread Bond, Stephen
s still there. Unbelievable. Stephen Bond -Original Message- From: David Winsemius [mailto:dwinsem...@comcast.net] Sent: Wednesday, July 07, 2010 4:15 PM To: Bond, Stephen Cc: r-help@r-project.org Subject: Re: [R] forcing a zero level in contr.sum On Jul 7, 2010, at 4:04 PM, Bond,

Re: [R] forcing a zero level in contr.sum

2010-07-07 Thread David Winsemius
ilto:dwinsem...@comcast.net] Sent: Wednesday, July 07, 2010 3:44 PM To: Bond, Stephen Cc: r-help@r-project.org Subject: Re: [R] forcing a zero level in contr.sum On Jul 7, 2010, at 3:13 PM, Bond, Stephen wrote: I need to use contr.sum and observe that some levels are not statistically different from the

Re: [R] forcing a zero level in contr.sum

2010-07-07 Thread Bond, Stephen
-1 -1 -1 -1 I need to force the coefficient on level 03 to be zero. Thank you. Stephen Bond -Original Message- From: David Winsemius [mailto:dwinsem...@comcast.net] Sent: Wednesday, July 07, 2010 3:44 PM To: Bond, Stephen Cc: r-help@r-project.org Subject: Re: [R] forcing a

Re: [R] forcing a zero level in contr.sum

2010-07-07 Thread David Winsemius
On Jul 7, 2010, at 3:13 PM, Bond, Stephen wrote: I need to use contr.sum and observe that some levels are not statistically different from the overall mean of zero. What is the proper way of forcing the zero estimate? It seems the column corresponding to that level should become a column of