[R] design package (plot problems)

chr.schulz@email.de chr.schulz at email.de
Sat Sep 14 00:00:06 CEST 2002


....hmmm ok i use R1.5.1/Win2000 and should
really fast as possible migrate ;-)

Error in "oldClass<-"(*tmp*, value = "keep") : 
> >         attempt to set an attribute on NULL
..you understand this error-message ?

Thanks again,
Christian



Frank E Harrell Jr <fharrell at virginia.edu> schrieb am 13.09.02 23:19:28:
> It runs OK for me on Linux under R 1.5.1.  -Frank 
> 
> On Fri, 13 Sep 2002 20:24:52 +0200
> chr.schulz at email.de wrote:
> 
> > Hi,
> > just making some experiments with
> > design library i get an error if 
> > i want plot(fit) - show below from 
> > onlineHelp !?
> > 
> > ..perhaps is here another mask problem?, but
> > label from xtable which was my first problem
> > is now off !
> > 
> > 
> > Thanks for advance & regards,
> > Christian
> > 
> > 
> > 
> > $ n <- 1000    # define sample size
> > $ set.seed(17) # so can reproduce the results
> > $ age            <- rnorm(n, 50, 10)
> > $ blood.pressure <- rnorm(n, 120, 15)
> > $ cholesterol    <- rnorm(n, 200, 25)
> > $ sex            <- factor(sample(c('female','male'), n, T))
> > $ label(age)            <- 'Age' 
> > $ label(cholesterol)    <- 'Total Cholesterol'
> > $ label(blood.pressure) <- 'Systolic Blood Pressure'
> > $ label(sex)            <- 'Sex'
> > $ units(cholesterol)    <- 'mg/dl'   # uses units.default in Hmisc
> > $ units(blood.pressure) <- 'mmHg'
> > $ 
> > $ # Specify population model for log odds that Y=1
> > $ L <- .4*(sex=='male') + .045*(age-50) +
> > +         (log(cholesterol - 10)-5.2)*(-2*(sex=='female') + 2*(sex=='male'))
> > $ # Simulate binary y to have Prob(y=1) = 1/[1+exp(-L)]
> > $ y <- ifelse(runif(n) < plogis(L), 1, 0)
> > $ 
> > $ ddist <- datadist(age, blood.pressure, cholesterol, sex)
> > $ options(datadist='ddist')
> > $ 
> > $ fit <- lrm(y ~ blood.pressure + sex * (age + rcs(cholesterol,4)),x=T, y=T)
> > $ 
> > $ par(mfrow=c(2,2))
> > $ plot(fit)                # Plot effects of all 4 predictors
> > Error in "oldClass<-"(*tmp*, value = "keep") : 
> >         attempt to set an attribute on NULL
> > $ par(mfrow=c(1,2))
> > $ plot(fit, name=c('age','cholesterol'))   # Make 2 plots
> > Error in "oldClass<-"(*tmp*, value = "keep") : 
> >         attempt to set an attribute on NULL
> > $ par(mfrow=c(1,1))
> > $ plot(fit, age=seq(20,80,length=100), sex=NA, conf.int=F)
> > Error in "oldClass<-"(*tmp*, value = "keep") : 
> >         attempt to set an attribute on NULL
> > 
> > 
> > 
> > -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> > r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
> > Send "info", "help", or "[un]subscribe"
> > (in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
> > _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
> 
> 
> -- 
> Frank E Harrell Jr              Prof. of Biostatistics & Statistics
> Div. of Biostatistics & Epidem. Dept. of Health Evaluation Sciences
> U. Virginia School of Medicine  http://hesweb1.med.virginia.edu/biostat



-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list