| plotSurvivalPvaluesByCutoff {psichomics} | R Documentation |
Plot p-values of survival difference between groups based on multiple cutoffs
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()
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)