[R] Datadist error

Frank Harrell f.harrell at vanderbilt.edu
Tue Apr 12 19:26:28 CEST 2011


Please follow posting guide and provide a simple completely self-contained
example showing the error.  Then I'll take a look.
Frank


Sander wrote:
> 
> Dear all,
> 
> I have performed a simple logistic regression using the lrm function from
> the Design library. Now I want to plot the summary, or make a nomogram. I
> keep getting a datadist error: options(datadist= m.full ) not created with
> datadist.
> I have tried to specify datadist beforhand (although I don't know why it
> should be done):
> 
> ddist<-datadist(d)                ##where d is my dataset
> options(datadist="ddist")
> 
> This doesn't work. It only works when I convert my original dataset to
> datadistL
> 
> d<-datadist(d)
> options(datadist="d")
> 
> After this I can perform all the diagnostics and make a nomogram. However,
> my dataset 'd' is now completely useless, and I have to run the code to
> read
> in my data again and again to perform actions that are not related to
> datadist. Please let me know what I am overlooking.
> 
> This is some more of the code:
> 
> m.full<-lrm(event~pa+pb+pc, x=TRUE, y=TRUE, data=d)
> stats<-m.full$stats
> hshrink<-(stats["Model L.R."]-stats["d.f."])/stats["Model L.R."]
> hshrink
> ddist<-datadist(d)
> options(datadist="ddist")
> 
> par(mfrow=c(2,2))
> plot(m.fulldesign)                         ##Error I described
> f.sum<-summary(m.fulldesign)      ##Error I described
> nomogram(m.full)                        ##Error I described
> 
> 
> Best regards,
> Sander van Kuijk
> 
> 	[[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.
> 


-----
Frank Harrell
Department of Biostatistics, Vanderbilt University
--
View this message in context: http://r.789695.n4.nabble.com/Datadist-error-tp3444780p3445223.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list