[R] Setting contrasts

2013-12-02 Thread David C. Howell
I have been having trouble understanding the difference between contrasts(Group) - contr.sum and options(contrasts = c(contr.sum,contr.poly). They both seem to say that they have done what I want, but only the latter works. The reason why the question arises is tha,t using Fox's Anova, it is

Re: [R] Setting contrasts

2013-12-02 Thread Joshua Wiley
Hi David, You attach the dataset, which creates a copy of it. You set the contrasts on the copy, but in your models, you reference the dataset explicitly. You should set the contrasts directly in the data (and for your sake and your students, would encourage not using attach() ).

[R] setting contrasts for a logistic regression

2009-11-14 Thread w_poet
Hi everyone, I'm doing a logistic regression with an ordinal variable. I'd like to set the contrasts on the ordinal variable. However, when I set the contrasts, they work for ordinary linear regression (lm), but not logistic regression (lrm): ddist = datadist(bin.time, exp.loc)

Re: [R] setting contrasts for a logistic regression

2009-11-14 Thread Frank E Harrell Jr
w_poet wrote: Hi everyone, I'm doing a logistic regression with an ordinal variable. I'd like to set the contrasts on the ordinal variable. However, when I set the contrasts, they work for ordinary linear regression (lm), but not logistic regression (lrm): ddist = datadist(bin.time, exp.loc)