On Jul 29, 2010, at 7:00 AM, ?? wrote:
> dear:
>
> I am a user of R project.And now ,I have a problem.
>
> I want to know what is the name of the datasets in the web
> page--"Draw a Nomogram Representing a Regression Fit" which come
> from the R-home(http://www.r-project.org/ Package rms version
> 3.0-0).
I suspect you are referring to the documentation for the nomogram
function which has that title:
http://finzi.psych.upenn.edu/R/library/rms/html/nomogram.html
>
> And can you supply the dataset to me?
If you are talking about the example for the nomogram function, then
there is no name for a "dataset". In that example, Harrell constructs
a group of vectors at the beginning and then refers to them separately
without ever bundling them into a dataframe. You get the "dataset" by
running the code at the beginning of the example.
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,TRUE))
# 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')
There are some additional variables defined (also as vectors) in the
second example on that page.
-- David.
>
> wish for your help,thank you!
>
>
truly
> yours
>
>
2010
> -07-29______________________________________________
> 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.