Return to Statistical Graphics Home

Please rate the graphic:

%VOTE{id="Evalgraph" stars1="Graph Rating" global="off" open="off" secret="off" format="| $key | $small
Score: $score, My vote: $mylast, Total votes: $sum |" }%

Please add comments and then click on the "Add comment" button.

%COMMENT%

OriginalStatGraphicsForm edit

Image %LIGHTBOX{ image= "scattertrellis.jpg" thumbnail="tn_scattertrellis.jpg" caption="Scatterplot" }% Click on image to enlarge.
Title Scatterplot Conditioned on Race
Graph_Subgroup General Principles
Code Added Yes
Description Scatterplot of baseline by end of treatment count conditioned on race with smoother regression lines.
Contributor/Email Mat Soukup (email: Mat.Soukup@fda.hhs.gov)
Background The data set is from a randomly generated data set located on the OB network drive.
Special Considerations
Date Original
Original Date 2007
Modified Date
Use/Suitability Exploration
Software Program R
Software
R-Code - Attachment R-script: Scatterplot Conditioned on Race - Attached
R-Code dat <- read.csv('//cdsnas/oebdbdms/Graphics/Datasets/CleanTrial.csv')<br />
base <- subset(dat, visit==2)<br />eot <- subset(dat, visit==6)<br />
#png('C:/Research/Graphics/Graphs4Display/webpages/classes/pages/images/scattertrellis.png',
# width=500, height=500)

new.line <- trellis.par.get('superpose.line')<br />new.line$col <- c('seagreen2','grey60')<br />new.line$lty <- c(1,1,1,1)<br />new.symbol <- trellis.par.get('superpose.symbol')<br />new.symbol$col <- c('seagreen2','grey60')<br />new.symbol$pch <- c(1, 4, 16, 8)<br />trellis.par.set('superpose.line', new.line)
trellis.par.set('superpose.symbol', new.symbol)

xyplot(eot$count ~ base$count | base$racef,
groups=base$trtf,
panel=panel.plsmo,
xlab='Baseline Count',
ylab='End of Treatment Count',
sub='EOT CT ~ BASE CT | RACE, groups=TRT',
cex=1.25,
par.settings=list(superpose.symbol=list(
col=c('seagreen2','grey60')),
superpose.line=list(
col=c('seagreen2','grey60'),
lty=c(1,1))),
key=list(type='p',
points=list(pch=trellis.par.get('superpose.symbol')$pch[1:2],
col=trellis.par.get('superpose.symbol')$col[1:2]),
text=list(levels(base$trtf),
col=trellis.par.get('superpose.symbol')$col[1:2]),
columns=2, cex=1, title='Treatment'))
#dev.off()
SAS-Code - Attachment
SAS-Code
Stata-Code - Attachment
Stata-Code
Other Code - Attachment
Other Code
Keywords scatterplot, baseline, end of treatment, conditioned on race, regression lines
OPTIONAL FIELDS
References
Datasets
Data
Attached Data
CATEGORIZATIONS
Classification-Evaluation Efficacy
Classification-Graph Type Scatterplot
Graph_Type Scatterplot
Variable Relationship Continuous versus Categorical Conditioned
Data Types Categorical and Continuous
Special Cases
Disclaimer The views expressed within CTSpedia are those of the author and must not be taken to represent policy or guidance on the behalf of any organization or institution with which the author is affiliated.
Permission Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT OLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Reference Image scattertrellis_reference_200.jpg
Topic attachments
I Attachment Action Size Date Who Comment
trellisscatter.txttxt trellisscatter.txt manage 1 K 30 Apr 2010 - 19:47 UnknownUser V1 Scatterplot Conditioned R-script
This topic: CTSpedia > WebHome > StatGraphHome > ContributeGraphics > StatGraphTopic012
Topic revision: 30 Mar 2012, MaryBanach
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback