SANOVA {SurvivalTests}R Documentation

Generalized Test for Survival ANOVA

Description

SANOVA performs generalized test for survival ANOVA.

Usage

SANOVA(formula, data, nM = 5000, seed = 123, alpha = 0.05, na.rm = TRUE, verbose = TRUE)

Arguments

formula

a formula of the form lhs ~ rhs where lhs gives the survival times and rhs the corresponding groups + the status variable (1: non-censored, 0: censored).

data

a data frame containing the variables in formula.

nM

a number of bootstrap samples.

seed

a seed number for the reproducibility of results. Default is set to 123.

alpha

the level of significance to assess the statistical difference. Default is set to alpha = 0.05.

na.rm

a logical value indicating whether NA values should be stripped before the computation proceeds.

verbose

a logical for printing output to R console.

Details

SANOVA performs parametric survival ANOVA when the underlying data are distributed as Weibull or Gumbel. SANOVA tests are based on generalized p-value approach (cf. Tsui and Weerahandi (1989) and Weerahandi (2004)) extended for situations of affine invariance.

Value

A list with class "survtests" containing the following components:

p.value

the p-value of the test.

alpha

the level of significance to assess the statistical difference.

method

the character string "Generalized Test for Survival ANOVA".

data

a data frame containing the variables in which NA values (if exist) are removed.

formula

a formula of the form lhs ~ rhs where lhs gives the sample values and rhs the corresponding groups + the status variable (1: non-censored, 0: censored).

seed

a seed number for the reproducibility of results.

Author(s)

Sam Weerahandi, Malwane Ananda, Osman Dag

References

Tsui K. and Weerahandi, S. (1989). Generalized P-values in Significance Testing of Hypotheses in the Presence of Nuisance Parameters. Journal of the American Statistical Association, 84, 602-607.

Weerahandi, S. (2004). Generalized Inference in Repeated Measures: Exact Methods in MANOVA and Mixed Models, Wiley.

Examples


library(survival)
lung$status <- ifelse(lung$status == 2, 1, 0)
lung$age <- arules::discretize(lung$age, breaks = 3, labels = c("Low","Medium","High"))

library(SurvivalTests)

SANOVA(time~age+status, lung, alpha = 0.05)


[Package SurvivalTests version 1.0 Index]