[R] setting contrasts for a logistic regression

w_poet stephen.le at ucla.edu
Sat Nov 14 08:25:56 CET 2009


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)
options(datadist='ddist')
contrasts(exp.loc) = contr.treatment(3, base = 3, contrasts = TRUE)
lrm.loc = lrm(bin.time ~ exp.loc, data = Dataset)

In this case, lrm still uses exp.loc = 1 as the base, at least in terms of
notation, even though I set exp.loc = 3 as the base.

Is there a way to set contrasts for lrm?

Thanks for any advice,
Stephen


-- 
View this message in context: http://old.nabble.com/setting-contrasts-for-a-logistic-regression-tp26347831p26347831.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list