Package 'GFDsurv'

Title: Tests for Survival Data in General Factorial Designs
Description: Implemented are three Wald-type statistic and respective permuted versions for null hypotheses formulated in terms of cumulative hazard rate functions, medians and the concordance measure, respectively, in the general framework of survival factorial designs with possibly heterogeneous survival and/or censoring distributions, for crossed designs with an arbitrary number of factors and nested designs with up to three factors. Ditzhaus, Dobler and Pauly (2020) <doi:10.1177/0962280220980784> Ditzhaus, Janssen, Pauly (2020) <arXiv: 2004.10818v2> Dobler and Pauly (2019) <doi:10.1177/0962280219831316>.
Authors: Marc Ditzhaus [aut], Dennis Dobler [aut], Markus Pauly [aut], Philipp Steinhauer [aut], Merle Munko [aut, cre]
Maintainer: Merle Munko <[email protected]>
License: GPL (>= 3)
Version: 0.1.1
Built: 2024-11-16 03:50:11 UTC
Source: https://github.com/merlemunko/gfdsurv

Help Index


CASANOVA: Cumulative Aalen survival analyis-of-variance

Description

The function casanova calculates the Wald-type statistic based on the combination of differently weighted Nelson-Aalen-type integrals. Respective p-values are obtained by a χ2\chi^2-approximation and a permutation approach, respectively.

Usage

casanova(
  formula,
  event = "event",
  data = NULL,
  nperm = 1999,
  cross = TRUE,
  nested.levels.unique = FALSE,
  rg = list(c(0, 0))
)

Arguments

formula

A model formula object. The left hand side contains the time variable and the right hand side contains the factor variables of interest. An interaction term must be specified.

event

The name of censoring status indicator with values 0=censored and 1=uncensored. The default choice is "event"

data

A data.frame, list or environment containing the variables in formula and the censoring status indicator. Default option is NULL.

nperm

The number of permutations used for calculating the permuted p-value. The default option is 1999.

cross

logical. Should the crossing weight w(x) = 1 - 2x be included? The default is TRUE.

nested.levels.unique

A logical specifying whether the levels of the nested factor(s) are labeled uniquely or not. Default is FALSE, i.e., the levels of the nested factor are the same for each level of the main factor.

rg

A list containing the exponents c(r, g) of the weights w(x)=xr(1x)gw(x) = x^r (1-x)^g. Both exponents need to be natural numbers including 0. Default is list( c(0, 0) ) corresponding to the log-rank weight.

Details

The casanova function calculates the Wald-type statistic of weighted Nelson-Aalen type integrals for general factorial survival designs. Crossed as well as hierachically nested designs are implemented. Moreover, the approach allows the combination of different weights into a joint statistic. The user can choose between weights of the following form: w(x) = 1 - 2x (cross = TRUE) and w(x) = x^r * (1-x)^g for natural numbers r,g (including 0). The function automatically check whether the specified weights fulfill the linear independence assumption and choose a subset of linearly independent weights if the original weights violate the aforemention assumption.

The casanova function returns the test statistic as well as two corresponding p-values: the first is based on a χ2\chi^2 approximation and the second one is based on a permutation procedure.

Value

A casanova object containing the following components:

pvalues_stat

The p-values obtained by χ2\chi^2-approximation

pvalues_per

The p-values of the permutation approach

statistics

The value of the casanova along with degrees of freedom of the central chi-square distribution and p-value, as well as the p-value of the permutation procedure.

rg

A list containing the exponents of the direction considered in the statistical analysis

cross

logical. Was the crossing direction considered in the statistical analysis

indep

logical. Were the directions specified by the user linearly independent?

nperm

The number of permutations used for calculating the permuted p-value.

References

Ditzhaus, M., Janssen, A. and Pauly, M. (2020). Permutation inference in factorial survival designs with the CASANOVA. ArXiv preprint (arXiv:2004.10818v2).

Examples

library("survival")
data(veteran)
out <- casanova(formula ="time ~ trt*celltype",event = "status",
 data = veteran)

## Detailed informations:
summary(out)

copSANOVA: concordance parameter survival analyis-of-variance

Description

The function copanova calculates the ANOVA-rank-type statistic for general factorial survival designs based on the (extended) concordance parameter. The respective p-value is obtained by a multiplier bootstrap approach.

Usage

copsanova(
  formula,
  event = "event",
  data = NULL,
  BSiter = 1999,
  weights = "pois",
  tau = NULL,
  nested.levels.unique = FALSE
)

Arguments

formula

A model formula object. The left hand side contains the time variable and the right hand side contains the factor variables of interest. An interaction term must be specified.

event

The name of censoring status indicator with values 0=censored and 1=uncensored. The default choice is "event"

data

A data.frame, list or environment containing the variables in formula and the censoring status indicator. Default option is NULL.

BSiter

The number of bootstrap iterations; the default is 1999.

weights

Character to specify the multiplier bootstrap approach. Either a wild bootstrap with centred Poisson ("pois", default) or standard normal ("norm") weights, or the weird bootstrap ("weird") can be chosen. Moreover, both wild bootstrap strategies can be selected with a correcting factor for liberality by "corrLibPois" and "corrLibNorm".

tau

The truncation time specifying the end of the relevant time window for the analysis. By default (NULL), the smallest 95%-quantile of the times per group is chosen.

nested.levels.unique

A logical specifying whether the levels of the nested factor(s) are labeled uniquely or not. Default is FALSE, i.e., the levels of the nested factor are the same for each level of the main factor.

Details

The copsanova function calculates the ANOVA-rank-type statistic for general factorial survival designs based on the (extended) concordance parameter. Crossed as well as hierachically nested designs are implemented. The p-value is determined by a multiplier bootstrap approach. Here, a wild bootstrap with/without correcting factors for liberal tests or the weird bootstrap of Andersen et al. (1993) can be chosen. The concrete analysis is done on the time window [0,tau], where tau need to be chosen equal to (default) or smaller than the smallest out of the largest possible censoring times per group.

The copsanova function returns the test statistic as well as a corresponding p-value based on a the specified multiplier procedure.

Value

An copsanova object containing the following components:

statistics

The value of the copsanova along with the p-value of the specified multiplier bootstrap.

Bsiter

The number of bootstrap iterations.

weights

The chosen multiplier bootstrap method.

tau

The chosen truncation time specifying the end of the relevant time window for the analysis.

References

Dobler, D. and Pauly, M. (2020). Factorial analyses of treatment effects under independent right-censoring. Statistical Methods in Medical Research 29(2), 325-343. doi:10.1177/0962280219831316.

Examples

library(condSURV)
data(colonCS)
out <- copsanova(formula ="Stime ~ rx*sex",event = "event",
                 data = colonCS, BSiter = 99)

##Detailed informations:
summary(out)

A shiny app for the package GFDsurv

Description

This function provides a shiny app for calculating CASANOVA, medSANOVA and copSANOVA test statistics and respective p-values.

Usage

GFDsurvGUI()

medSANOVA: Median survival analyis-of-variance

Description

The function medsanova calculates the Wald-type test statistic for inferring median survival differences in general factorial designs. Respective p-values are obtain by a χ2\chi^2-approximation and a permutation approach.

Usage

medsanova(
  formula,
  event = "event",
  data = NULL,
  nperm = 1999,
  var_method = "twosided",
  var_level = 0.9,
  nested.levels.unique = FALSE
)

Arguments

formula

A model formula object. The left hand side contains the time variable and the right hand side contains the factor variables of interest. An interaction term must be specified.

event

The name of the censoring status indicator with values 0=censored and 1=uncensored. The default choice is "event"

data

A data.frame, list or environment containing the variables in formula and the censoring status indicator. Default option is NULL.

nperm

The number of permutations used for calculating the permuted p-value. The default option is 1999.

var_method

Method for the variance estimation of the sample medians. The default is the "one-sided" confidence interval approach. Additionally, the "two-sided" confidence interval approach can be used.

var_level

A number between 0 and 1 specifying the confidence level for the variance estimation method; the default value is 0.9.

nested.levels.unique

A logical specifying whether the levels of the nested factor(s) are labeled uniquely or not. Default is FALSE, i.e., the levels of the nested factor are the same for each level of the main factor.

Details

The medsanova function calculates the Wald-type statistic for median differences in general factorial survival designs. Crossed as well as hierachically nested designs are implemented. To estimate the sample medians' variances, a one-sided (resp. two-sided) confidence interval approach is used and the level of this confidence interval can be specified by var_level.

The medsanova function returns the test statistic as well as two corresponding p-values: the first is based on a χ2\chi^2 approximation and the second one is based on a permutation procedure.

Value

An medsanova object containing the following components:

pvalues_stat

The p-values obtained by χ2\chi^2-approximation

pvalues_per

The p-values of the permutation approach

statistics

The value of the Wald-type test statistic along with the degrees of freedom of the χ2\chi^2-distribution and the respective p-value, as well as the p-value of the permutation procedure.

nperm

The number of permutations used for calculating the permuted p-value.

References

Ditzhaus, M., Dobler, D. and Pauly, M.(2020). Inferring median survival differences in general factorial designs via permutation tests. Statistical Methods in Medical Research. doi:10.1177/0962280220980784.

Examples

library("survival")
data(veteran)
out <- medsanova(formula ="time ~ trt*celltype",event = "status",
 data = veteran)

## Detailed informations:
summary(out)