medsanova {GFDsurv} | R Documentation |
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 \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 |
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. |
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 \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 |
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. |
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)