Short.test {ComparisonSurv} | R Documentation |
Statistical Inference Methods for Testing Before a Specified Time Point
Description
A function used to produce the results of statistical inference methods for testing the difference before a specified time point.
Usage
Short.test(time,status,group,t0)
Arguments
time |
The follow up time for right censored data. |
status |
The status indicator, normally 1=event, 0=alive or right censored. |
group |
The group indicator for comparison, and the elements of this vector must take either 0 or 1. Normally, 0= control group, 1= treatment group. |
t0 |
The cut-point time, which should larger than the minimum of non-censored time and also less than the maximum of all survival time. |
Value
A list containing the following components:
method |
Containing 2 types of statistical inference methods: partial Weighted Kaplan-Meier and partial log-rank. |
t0 |
The prespecified cut-point time. |
statistic |
The statistics of corresponding methods. |
pvalue |
The test P value of corresponding methods. |
Note
The partial Weighted Kaplan-Meier method and partial log-rank method are different from the Weighted Kaplan-Meier method and the log-rank method in overall.test. Here, the "partial" means let all observations right censored at the cut-point time t0.
See Also
Examples
#get 'Crossdata' from package
data(Crossdata)
data1<-Crossdata
#
#get cross point
crosspoint(data1$time,data1$status,data1$group)
#two survival curves crossing at 1.69 years
#
#get the result before cross point (t0=1.69)
Short.test(data1$time,data1$status,data1$group,t0=1.69)