[R] Design package lrm summary and factors

From: sj <ssj1364_at_gmail.com>
Date: Thu, 03 Apr 2008 10:49:13 -0600


Hello, I have question regarding the lrm function and estimating the odds ratio between different levels of a factored variable. The following code example illustrates the problem I am having. I have a data set with an outcome variable (0,1) and an input variable (A,B,C). I would like to estimate the effect of C vs B, but when I perform the summary I only get A vs B and A vs C, even though I specify that I want to see C vs B. Am I missing something, any help is appreciated.

outcome<-sample(rep(c(0,1),10000),1000)
input <- sample(rep(c("A","B","C"),10000),1000) dset <-data.frame(cbind(outcome,input))
dd <- datadist(dset)
options(datadist='dd')

mod <- lrm(outcome ~ input,data=dset,x=TRUE,y=TRUE) summary(mod,est.all=FALSE,input=c("C","B"))

        [[alternative HTML version deleted]]



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Thu 03 Apr 2008 - 16:53:03 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 04 Apr 2008 - 12:30:26 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive