| Type: | Package | 
| Title: | Two-Sample Tests Based on Differences of Kaplan-Meier Curves | 
| Version: | 1.0.1 | 
| Date: | 2022-06-11 | 
| Author: | Miki Horiguchi, Hajime Uno | 
| Maintainer: | Miki Horiguchi <horiguchimiki@gmail.com> | 
| Description: | Tests for equality of two survival functions based on integrated weighted differences of two Kaplan-Meier curves. | 
| Imports: | survival | 
| License: | GPL-2 | 
| NeedsCompilation: | no | 
| Packaged: | 2022-06-11 19:55:23 UTC; miki | 
| Repository: | CRAN | 
| Date/Publication: | 2022-06-11 20:20:03 UTC | 
Two-Sample Tests Based on Weighted Differences of Kaplan-Meier Curves
Description
Tests for equality of two survival functions based on integrated weighted differences of two Kaplan-Meier curves.
Author(s)
Miki Horiguchi, Hajime Uno
References
Uno H, Tian L, Claggett B, Wei LJ. A versatile test for equality of two survival functions based on weighted differences of Kaplan-Meier curves. Statistics in Medicine 2015, 34, 3680-3695.
See Also
survival
Examples
D        = survival::pbc[1:312, c(2,3,4)] #The pbc data from 'survival' package
D$status = as.numeric(D$status==2)
D$trt    = as.numeric(D$trt==2)
names(D) = c("time", "status", "arm")
tau      = max(D[D[,2]==1,1])
nmethod  = 10 #Recommended to specify at least 10000 (default) or larger.
a = AWKMT2(indata=D, tau=tau, c_first=0, c_last=4, c_by=0.1, method="permutation",
           nmethod=nmethod, seed=1, v1=TRUE, v2=TRUE, test="1_side")
print(a)
Adaptively Weighted Kaplan-Meier Tests
Description
Performs the two-sample tests based on adaptively weighted differences between two Kaplan-Meier curves proposed by Uno, Tian, Claggett and Wei (2015).
Usage
AWKMT2(indata, tau, c_first=0, c_last=4, c_by=0.1, method="permutation",
       nmethod=10000, seed=1, v1=TRUE, v2=TRUE, test="1_side")
Arguments
indata | 
 A data matrix (data frame). The 1st column is time-to-event variable, the 2nd column is event indicator (1=event, 0=censor), and the 3rd column is the treatment indicator (1=treat, 0=control). No missing values are allowed in this data matrix.  | 
tau | 
 A numeric value to specify the time interval of interest. The end of study time will be a general choice.  | 
c_first | 
 A first number in range to specify the search area of "c" for the versatile tests by Uno et al. (2015). Default is   | 
c_last | 
 A last number in range to specify the search area of "c" for the versatile tests by Uno et al. (2015). Default is   | 
c_by | 
 A number to specify the search area of "c" for the versatile tests by Uno et al. (2015). Default is   | 
method | 
 A name of the resampling method. It supports   | 
nmethod | 
 A number of iterations for the resampling. Recommended to specify at least   | 
seed | 
 An integer value, used for the random number generation in the resampling procedures. Default is   | 
v1 | 
 Choice of the test statistic. When   | 
v2 | 
 Choice of the test statistic. When   | 
test | 
 Specify   | 
Value
A list with components:
resampling_method | 
 The resampling method.  | 
crude_pvalue_T1_1_side | 
 The one-sided crude p-value of the test based on v1 in Uno et al. (2015).  | 
crude_pvalue_T2_1_side | 
 The one-sided crude p-value of the test based on v2 in Uno et al. (2015).  | 
crude_pvalue_T1_2_side | 
 The two-sided crude p-value of the test based on v1 in Uno et al. (2015).  | 
crude_pvalue_T2_2_side | 
 The two-sided crude p-value of the test based on v2 in Uno et al. (2015).  | 
bona_fide_pvalue_T1_1_side | 
 The one-sided bona-fide p-value of the test based on v1 in Uno et al. (2015).  | 
bona_fide_pvalue_T2_1_side | 
 The one-sided bona-fide p-value of the test based on v2 in Uno et al. (2015).  | 
bona_fide_pvalue_T1_2_side | 
 The two-sided bona-fide p-value of the test based on v1 in Uno et al. (2015).  | 
bona_fide_pvalue_T2_2_side | 
 The two-sided bona-fide p-value of the test based on v2 in Uno et al. (2015).  | 
References
Uno H, Tian L, Claggett B, Wei LJ. A versatile test for equality of two survival functions based on weighted differences of Kaplan-Meier curves. Statistics in Medicine 2015, 34, 3680-3695.
See Also
survival
Examples
 D        = survival::pbc[1:312, c(2,3,4)] #The pbc data from 'survival' package
 D$status = as.numeric(D$status==2)
 D$trt    = as.numeric(D$trt==2)
 names(D) = c("time", "status", "arm")
 tau      = max(D[D[,2]==1,1])
 nmethod  = 10 #Recommended to specify at least 10000 (default) or larger.
 a = AWKMT2(indata=D, tau=tau, c_first=0, c_last=4, c_by=0.1, method="permutation",
            nmethod=nmethod, seed=1, v1=TRUE, v2=TRUE, test="1_side")
 print(a)