[R] Binary logistic model using lrm function

Liaw, Andy andy_liaw at merck.com
Tue Feb 17 01:08:18 CET 2004


You need to (re-)read the help page for predict.lrm, especially the `type'
argument.

Andy

> From: Nisa Bakkalbasi
> 
> Hello all,
> 
> Could someone tell me what I am doing wrong here?
> 
> I am trying to fit a binary logistic model using the lrm 
> function in Design. 
> The dataset I am using has a dichotomous response variable, 'covered' 
> (1-yes, 0-no) with explanatory variables, 'nepall', 'title', 
> 'abstract', 
> 'series', and 'author1.'
> 
> I am running the following script and all seems to be working.
> 
> library(Hmisc, T)
> library(Design, T)
> Mydata <- read.table("author1.df", header=T)
> attach(Mydata)
> dd <- datadist(nepall, title, abstract, series, author1)
> fit <- lrm(covered ~ nepall + title + abstract + series +
>     author1, data = Mydata, x = TRUE, y = TRUE)
> anova(fit)
> detach()
> 
> However, when I look at the output for predict(fit), I am 
> getting values 
> below 0 and above 1, which does not make much sense. Can 
> someone lead me in 
> the right direction?
> 
> Thank you for your help in advance.
> 
> Nisa Bakkalbasi
> 
> _________________________________________________________________
> Get some great ideas here for your sweetheart on Valentine's 
> Day - and 
> beyond. http://special.msn.com/network/celebrateromance.armx
> 


------------------------------------------------------------------------------
Notice:  This e-mail message, together with any attachments,...{{dropped}}




More information about the R-help mailing list