View source: R/ComparisonSurv.R
Short.test | R Documentation |
A function used to produce the results of statistical inference methods for testing the difference before a specified time point.
Short.test(time,status,group,t0)
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. |
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. |
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.
crosspoint
,Long.test
#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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.