survdiffTerms {psichomics} | R Documentation |
Tests if there is a difference between two or more survival curves using the G-rho family of tests, or for a single curve against a known alternative.
survdiffTerms(survTerms, ...)
survTerms |
|
... |
Arguments passed on to
|
survfit
object. See survfit.object
for details. Methods
defined for survfit
objects are print
, plot
,
lines
, and points
.
This function implements the G-rho family of
Harrington and Fleming (1982), with weights on each death of S(t)^rho,
where S is the Kaplan-Meier estimate of survival.
With rho = 0
this is the log-rank or Mantel-Haenszel test,
and with rho = 1
it is equivalent to the Peto & Peto modification
of the Gehan-Wilcoxon test.
If the right hand side of the formula consists only of an offset term,
then a one sample test is done.
To cause missing values in the predictors to be treated as a separate
group, rather than being omitted, use the factor
function with its
exclude
argument.
Harrington, D. P. and Fleming, T. R. (1982). A class of rank test procedures for censored survival data. Biometrika 69, 553-566.
Other functions to analyse survival:
assignValuePerSubject()
,
getAttributesTime()
,
labelBasedOnCutoff()
,
optimalSurvivalCutoff()
,
plotSurvivalCurves()
,
plotSurvivalPvaluesByCutoff()
,
processSurvTerms()
,
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 NA 1355 ii male") names(clinical) <- c("patient.days_to_last_followup", "patient.days_to_death", "patient.stage_event.pathologic_stage", "patient.gender") timeStart <- "days_to_death" event <- "days_to_death" formulaStr <- "patient.stage_event.pathologic_stage + patient.gender" survTerms <- processSurvTerms(clinical, censoring="right", event, timeStart, formulaStr=formulaStr) survdiffTerms(survTerms)