plotSurvivalPvaluesByCutoff {psichomics} | R Documentation

## Plot p-values of survival difference between groups based on multiple cutoffs

### Description

Plot p-values of survival difference between groups based on multiple cutoffs

### Usage

    plotSurvivalPvaluesByCutoff(
      clinical,
      data,
      censoring,
      event,
      timeStart,
      timeStop = NULL,
      followup = "days_to_last_followup",
      significance = 0.05,
      cutoffs = seq(0, 0.99, 0.01)
    )

### Arguments

`clinical` | Data frame: clinical data
`data` | Numeric: elements of interest to test against the cutoff
`censoring` | Character: censor using `left`, `right`, `interval` or `interval2`
`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

### Value

p-value plot

### See Also

Other functions to analyse survival: `assignValuePerSubject()`, `getAttributesTime()`, `labelBasedOnCutoff()`, `optimalSurvivalCutoff()`, `plotSurvivalCurves()`, `processSurvTerms()`, `survdiffTerms()`, `survfit.survTerms()`, `testSurvival()`

### Examples

    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))

    psi <- data.frame(t(c(rep(0.1, 9), rep(0.2, 13), rep(0.3, 3))))
    colnames(psi) <- paste0("sample", seq(psi))

    # Match between subjects and samples
    match <- paste0("subject", seq(psi))
    names(match) <- colnames(psi)
    rownames(clinical) <- match

    eventData <- assignValuePerSubject(psi[1, ], match)

    event      <- "days_to_death"
    timeStart  <- "days_to_death"
    plotSurvivalPvaluesByCutoff(clinical, eventData, censoring="right",
                                event=event, timeStart=timeStart)

[Package psichomics version 1.14.1 Index]