[R] (no subject)

Frank E Harrell Jr fharrell at virginia.edu
Sun Dec 8 20:06:02 CET 2002


On Sun, 08 Dec 2002 18:31:01 +0000
Moustafa ElHousinie <drhosini at hotmail.com> wrote:

> 
> 
> Dear listers
> I am a very newbie with graphs in R. I have a pulmonary function prediction 
> equation in the form of PVC = 1.1 - 0.45*age in years + 0.011*height in cm.  
> How can I draw the corresponding nomogram?.  I read the help for the 
> design.nomogram function but it is too difficult for me. Excuse my 
> ignorance. Any direct help will be appreciated.
> Thanks in advance.
> 

library(Design)
dd <- datadist(age,height)
options(datadist='dd')
f <- ols(PVC ~ age + height)       # why assume linear and additive?
nomogram(f)                        # many options available
nomogram(f, age=seq(10,70,by=10))  # control age axis, not use default

If you fit a nonlinear and/or nonadditive model nomogram still works (especially well for nonlinear additive models).
-- 
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




More information about the R-help mailing list