Description Usage Arguments Author(s) References See Also Examples
View source: R/SoloScattorPlot.R
This function will generate the scatter plot of time-to-event and biomarker for one dataset. It helps to visualize the relationship between survival endpoints and biomarkers.
1 2 | SoloScattorPlot(data, cutoff, xlab, ylab, main, ylim, xlim, col1, col2, lwd, pch1, pch2,
legendloc, legendtxt, ncol)
|
data |
It is a data object with three variables included: event: the survival time, a positive numerical vector with no missing values; censor: the censor information, a vector with 1 indicating an event and 0 indicating right censored; marker: the biomarker information, or other interesting variables. |
cutoff |
This is to define the interesting data cutoff time point to see the relationship between time-to-events and markers. |
xlab |
It is the title for x axis; default is "Marker". |
ylab |
It is the title for y axis; default is "Time to Event". |
main |
It is the title for the plot; default is "Scattor Plot". |
ylim |
It creates the continuous scale of y axis of the plot; default is "c(0,3600)". |
xlim |
It creates the continuous scale of y axis of the plot; default is "c(0,100)". |
col1 |
It defines the color of the dot; default is "red". |
col2 |
It defines the color of the cutoff line; default is "red". |
lwd |
It defines the width of the cutoff line; default is "2". |
pch1 |
It defines the type of the dot for event; default is "20". |
pch2 |
It defines the type of the dot for censor; default is "21". |
legendloc |
It specifies the location of the legend; default is "bottomright". |
legendtxt |
It provides the text of the legend; default is "c("death","censor")". |
ncol |
It specifies the number of columns displayed in legend; default=1 |
Hui Yang huiy@amgen.com, Rui Tang rui_tang@vrtx.com and Jing Huang jinghuang0@gmail.com
Yang H., Tang R., Hale M. and Huang J. (2016) A visualization method measuring the performance of biomarkers for guiding treatment decisions Pharmaceutical Statistics, 15(2), 1539-1612
DuoScattorPlot
, TrioScattorPlot
1 2 3 4 5 6 7 8 9 | ## Create the data object for the function
o.data = data.frame(event=wpcdata$OSday, censor=wpcdata$OScensor, marker=wpcdata$Biomarker1)
## Print out the figure:
SoloScattorPlot(o.data,180,xlab=c("Marker"),ylab=c("Survival Rate"),
main=c("Weighted Predictiveness Curve"),ylim=c(0,600),xlim=c(0,100),
col1="red",col2="red",lwd=2,pch1=20,pch2=21,legendloc="bottomright",ncol=1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.