MyNixOS website logo
Description

Multiple Survival Crossing Curves Tests.

Tests of comparison of two or more survival curves. Allows for comparison of more than two survival curves whether the proportional hazards hypothesis is verified or not.

MSCCT

Multiple Survival Crossing Curves Tests

This package contains tests for comparison or two or more survival curves when the proportional hazards hypothesis is not verified, in particular when the survival curves cross each other.

Installation

You can install the development version of MSCCT from GitHub with:

devtools::install_github("https://github.com/HMinP/MSCCT")

Example

library(MSCCT)

This package contains:

  • The weighted log-rank test

The log-rank test compares for each group and for each time of event the expected and the observed number of events. The weighted log-rank adds weights to each time of event. Some (implemented) exemples are the Flemming-Harrington test and the Gehan-Wilcoxon test. It is also possible to chose the weights you want.

multi_lr(data_under_PH)
#> (Multiple) Weighted log-rank test 
#> 
#> Weighting : Classic log-rank test 
#> Degrees of freedom : 2 
#> 
#>        Statistic p
#> Test 1   142.864 0
multi_lr(data_under_PH, test="fh", rho=1, gamma=0)
#> (Multiple) Weighted log-rank test 
#> 
#> Weighting : Flemming-Harrington test 
#> Parameters : rho = 1 , gamma =  0 
#> Degrees of freedom : 2 
#> 
#>        Statistic p
#> Test 1  112.1108 0
  • The Restricted Mean Survival Test

The Restricted Mean Survival Time at time $\tau$ is the area under a survival curve up to time $\tau$. The RMST test compares the areas under the survival curves and tests the equality to zero of the difference of RMST.

multi_rmst(data_under_PH, tau=12, nboot=100, method="bonferroni")
#> (Multiple) test of RMST 
#> Truncation time : 12  
#> Correction : bonferroni 
#> 
#> RMST estimation for each arm 
#>            rmst        sd
#> arm 0 10.232101 0.1777291
#> arm 1  9.380293 0.2147322
#> arm 2  8.179610 0.2163973
#> 
#> Pair-wise comparisons 
#>             dRMST        sd            p   p adjusted
#> 0 VS 1 -0.8518077 0.2787428 2.243925e-03 6.731774e-03
#> 0 VS 2 -2.0524910 0.2800275 2.309264e-13 6.927792e-13
#> 1 VS 2 -1.2006833 0.3048569 8.198752e-05 2.459625e-04
#>  
#> p=6.927792e-13
  • The Two-stage test

The two-stage test is a combination of two tests. The first one is a classic log-rank test. When the log-rank test is not significant, this means that the survival curves are either different or they cross each other and the log-rank is not powerful enough. In order to differentiate these cases, a second test is performed. This second test is a weighted log-rank test with weights that allows to differentiate the two previous cases.

multi_ts(data_under_PH, eps=0.1, nboot=100, method="BH")
#> (Multiple) Two-Staged test 
#> Correction : BH  
#> 
#>                  p1   p2            p        adj_p
#> 0 VS 1 5.486672e-09 0.75 8.357007e-08 8.357007e-08
#> 0 VS 2 0.000000e+00 0.05 3.774758e-15 1.132427e-14
#> 1 VS 2 2.401913e-10 0.86 4.813040e-09 7.219560e-09
#>  
#> p=1.132427e-14
Metadata

Version

1.0.2

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-windows
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows