You are here:
Vanderbilt Biostatistics Wiki
>
Main Web
>
Seminars
>
RClinic
>
RGraphicsplsmo
(26 Oct 2008,
FrankHarrell
)
(raw view)
E
dit
A
ttach
---+ Using the =Hmisc= =plsmo= Function for Plotting Nonparametric loess Trend lines R Clinic 23Oct08 The following examples use a new Titanic passenger and group survival dataset soon to be put on our Datasets page. <highlight> load('/home/harrelfe/data/teaching/titanic2008.rda') xless(contents(titanic2008)) attach(titanic2008) plsmo(age, survived) plsmo(age, survived, datadensity=TRUE) plsmo(age, survived, group=sex, datadensity=TRUE) table(class.dept) class.dept 1st Class 2nd Class 3rd Class A la Carte Deck Engine 324 285 708 69 66 325 Victualling 431 plsmo(age, survived, group=class.dept, datadensity=TRUE) s <- class.dept %in% levels(class.dept)[1:3] with(subset(titanic2008,s),plsmo(age, survived, group=interaction(sex,factor(class.dept)), datadensity=TRUE)) plsmo(age, survived, group=class.dept, datadensity=TRUE) plsmo(age, survived, group=class.dept, datadensity=TRUE,trim=0) with(subset(titanic2008,s),plsmo(age, survived, group=interaction(sex,factor(class.dept)), datadensity=TRUE, trim=0)) w <- summary(survived ~ age + sex + class.dept) plot(w) plot(w, cex=2) plot(w, cex=2, cex.labels=1) with(subset(titanic2008,s),plsmo(age, survived, group=interaction(sex,factor(class.dept)), datadensity=TRUE, trim=0)) Ecdf(age) Ecdf(age, q=c(1:3)/4) with(subset(titanic2008,s),plsmo(age, survived, group=interaction(sex,factor(class.dept)), datadensity=TRUE, trim=0)) </highlight>
E
dit
|
A
ttach
|
P
rint version
|
H
istory
: r1
|
B
acklinks
|
V
iew topic
|
Edit
w
iki text
|
M
ore topic actions
Topic revision: r1 - 26 Oct 2008,
FrankHarrell
Main
Department Home Page
Biostatistics Graduate Program
Vanderbilt University Medical Center
Main Web
Main Web Home
Search
Recent Changes
Changes
Topic list
Biostatistics Webs
Archive
Main
Sandbox
System
Register
|
Log In
Copyright © 2013-2022 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Vanderbilt Biostatistics Wiki?
Send feedback