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 |
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 -approximation and a permutation approach, respectively.
casanova( formula, event = "event", data = NULL, nperm = 1999, cross = TRUE, nested.levels.unique = FALSE, rg = list(c(0, 0)) )
casanova( formula, event = "event", data = NULL, nperm = 1999, cross = TRUE, nested.levels.unique = FALSE, rg = list(c(0, 0)) )
formula |
A model |
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 |
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 |
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 |
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 approximation and
the second one is based on a permutation procedure.
A casanova
object containing the following components:
pvalues_stat |
The p-values obtained by |
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. |
Ditzhaus, M., Janssen, A. and Pauly, M. (2020). Permutation inference in factorial survival designs with the CASANOVA. ArXiv preprint (arXiv:2004.10818v2).
library("survival") data(veteran) out <- casanova(formula ="time ~ trt*celltype",event = "status", data = veteran) ## Detailed informations: summary(out)
library("survival") data(veteran) out <- casanova(formula ="time ~ trt*celltype",event = "status", data = veteran) ## Detailed informations: summary(out)
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.
copsanova( formula, event = "event", data = NULL, BSiter = 1999, weights = "pois", tau = NULL, nested.levels.unique = FALSE )
copsanova( formula, event = "event", data = NULL, BSiter = 1999, weights = "pois", tau = NULL, nested.levels.unique = FALSE )
formula |
A model |
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 |
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 ( |
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. |
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.
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. |
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.
library(condSURV) data(colonCS) out <- copsanova(formula ="Stime ~ rx*sex",event = "event", data = colonCS, BSiter = 99) ##Detailed informations: summary(out)
library(condSURV) data(colonCS) out <- copsanova(formula ="Stime ~ rx*sex",event = "event", data = colonCS, BSiter = 99) ##Detailed informations: summary(out)
This function provides a shiny app for calculating CASANOVA, medSANOVA and copSANOVA test statistics and respective p-values.
GFDsurvGUI()
GFDsurvGUI()
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 -approximation and a permutation approach.
medsanova( formula, event = "event", data = NULL, nperm = 1999, var_method = "twosided", var_level = 0.9, nested.levels.unique = FALSE )
medsanova( formula, event = "event", data = NULL, nperm = 1999, var_method = "twosided", var_level = 0.9, nested.levels.unique = FALSE )
formula |
A model |
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 |
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. |
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 approximation and
the second one is based on a permutation procedure.
An medsanova
object containing the following components:
pvalues_stat |
The p-values obtained by |
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 |
nperm |
The number of permutations used for calculating the permuted p-value. |
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.
library("survival") data(veteran) out <- medsanova(formula ="time ~ trt*celltype",event = "status", data = veteran) ## Detailed informations: summary(out)
library("survival") data(veteran) out <- medsanova(formula ="time ~ trt*celltype",event = "status", data = veteran) ## Detailed informations: summary(out)