Description Usage Arguments Author(s) References See Also Examples
View source: R/TrioScattorPlot.R
This function will generate the scatter plot of time-to-event and biomarker for three dataset. It helps to visualize the relationship between survival endpoints and biomarkers. It can also help to compare the three datasets
1 2 | TrioScattorPlot(data1, data2, data3, cutoff, xlab, ylab, main, ylim, xlim, col1,
col2, col3, col4, lwd, pch1, pch2, legendloc, legendtxt, ncol)
|
data1 |
Data object 1 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. |
data2 |
Data object 2 with the same structure as data object 1. |
data3 |
Data object 3 with the same structure as data object 1. |
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 in the dataset 1; default is "red". |
col2 |
It defines the color of the dot in the dataset 2; default is "blue". |
col3 |
It defines the color of the dot in the dataset 3; default is "black". |
col4 |
It defines the color of the cutoff line; default is "tomato". |
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-group1","censor-group1","death-group2","censor-group2",,"death-group3","censor-group3")". |
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
SoloScattorPlot
, DuoScattorPlot
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ## Create three data objects for the function:
tmppb = wpcdata[wpcdata$TRTA=="Placebo",]
tmptrt1 = wpcdata[wpcdata$TRTA=="LowDose",]
tmptrt2 = wpcdata[wpcdata$TRTA=="HighDose",]
o.data1 =data.frame(event=tmppb$OSday, censor=tmppb$OScensor, marker=tmppb$Biomarker1)
o.data2 =data.frame(event=tmptrt1$OSday, censor=tmptrt1$OScensor, marker=tmptrt1$Biomarker1)
o.data3 =data.frame(event=tmptrt2$OSday, censor=tmptrt2$OScensor, marker=tmptrt2$Biomarker1)
## Draw the scattor plot for the three data objects:
TrioScattorPlot(o.data1,o.data2,o.data3,180,xlab=c("Marker"),ylab=c("Surovival Rate"),
main=c("Weighted Predictiveness Curve"),ylim=c(0,600),xlim=c(0,100),col1="red",
col2="black",col3="blue",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.