[R] help with nomogram function
Frank E Harrell Jr
feh3k at spamcop.net
Wed Nov 5 03:03:56 CET 2003
On Wed, 05 Nov 2003 09:22:34 +1000
Ross Darnell <r.darnell at uq.edu.au> wrote:
> I have fitted a logistic regression model
>
> > failed.lr2$call
> lrm(formula = failed ~ Age + task2 + Age:task2, data = time.long,
> na.action = na.omit)
Use Age*task2 and omit na.action as na.omit is the default
>
> using the Design package functions and would like to generate a
> nomogram from this model.
>
> the datadist information is generated and stored in
>
> > ddist
> time.long$Age time.long$task2
> Low:effect 45 <NA>
> Adjust to 56 both.foam
> High:effect 68 <NA>
> Low:prediction 21 both.foam
> High:prediction 80 right
> Low 20 both.foam
> High 80 right
This looks most strange. You did not include the original code but I
suspect you had $ in a term. $ should not appear in column headings
above. Design wants you to use data= or attach, and avoid $ in terms.
Frank Harrell
>
> Values:
>
> time.long$task2 : both.foam left right
> >
>
> The model fitted and then when I try the nomgram function
>
> > nomogram(failed.lr2)
> Error in value.chk(at, i, NA, -nint, Limval, type.range = "full") :
> variable Age does not have limits defined by datadist
> >
>
> I get an error. The NA values in ddist seem to be the problem but I
> don't understand the datadist information.
>
> Can anyone help explain why this is failing.
>
> Thanks
>
> Ross Darnell
>
> --
>
> University of Queensland, Brisbane QLD 4067 AUSTRALIA
> Email: <r.darnell at uq.edu.au>
> Phone +61 7 3365 6087
> http://www.shrs.uq.edu/shrs/school_staff/ross_darnell.html
---
Frank E Harrell Jr Professor and Chair School of Medicine
Department of Biostatistics Vanderbilt University
More information about the R-help
mailing list