Description Usage Arguments Value See Also Examples
View source: R/analysis_survival.R
Plot p-values of survival difference between groups based on multiple cutoffs
1 2 3 4 5 6 7 8 9 10 11 | plotSurvivalPvaluesByCutoff(
clinical,
data,
censoring,
event,
timeStart,
timeStop = NULL,
followup = "days_to_last_followup",
significance = 0.05,
cutoffs = seq(0, 0.99, 0.01)
)
|
clinical |
Data frame: clinical data |
data |
Numeric: elements of interest to test against the cutoff |
censoring |
Character: censor using |
event |
Character: name of column containing time of the event of interest |
timeStart |
Character: name of column containing starting time of the interval or follow up time |
timeStop |
Character: name of column containing ending time of the interval (only relevant for interval censoring) |
followup |
Character: name of column containing follow up time |
significance |
Numeric: significance threshold |
cutoffs |
Numeric: cutoffs to test |
p-value plot
Other functions to analyse survival:
assignValuePerSubject()
,
getAttributesTime()
,
labelBasedOnCutoff()
,
optimalSurvivalCutoff()
,
plotSurvivalCurves()
,
processSurvTerms()
,
survdiffTerms()
,
survfit.survTerms()
,
testSurvival()
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | clinical <- read.table(text = "2549 NA ii female
840 NA i female
NA 1204 iv male
NA 383 iv female
1293 NA iii male")
names(clinical) <- c("patient.days_to_last_followup",
"patient.days_to_death",
"patient.stage_event.pathologic_stage",
"patient.gender")
clinical <- do.call(rbind, rep(list(clinical), 5))
rownames(clinical) <- paste("Subject", seq(nrow(clinical)))
# Calculate PSI for skipped exon (SE) and mutually exclusive (MXE) events
annot <- readFile("ex_splicing_annotation.RDS")
junctionQuant <- readFile("ex_junctionQuant.RDS")
psi <- quantifySplicing(annot, junctionQuant, eventType=c("SE", "MXE"))
# Match between subjects and samples
match <- c("Cancer 1"="Subject 3",
"Cancer 2"="Subject 17",
"Cancer 3"="Subject 21")
eventData <- assignValuePerSubject(psi[3, ], match)
event <- "days_to_death"
timeStart <- "days_to_death"
plotSurvivalPvaluesByCutoff(clinical, eventData, censoring="right",
event=event, timeStart=timeStart)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.