R: Performs Log Rank test on the long and short patient sets
logrnk
R Documentation
Performs Log Rank test on the long and short patient sets
Description
This function performs a Chi-square test on the long and short subject sets to determine if their is a significant difference between the survival
times in both sets. It returns the p-value.
Usage
logrnk(dataL, dataS)
Arguments
dataL
The set of subjects predicted to fall into the long-survivor set.
A data frame containing at least the following columns: “PatientOrderValidation” (the number/order of the subject); “group” (the group into which
the patient falls L (for long) or S(for short)); “censored” (the censorship status of the patient $1$ for uncensored and $0$ for censored).
dataS
Same as “dataL” but for the set of short survivors.
Details
Note that the typical arguments to be passed are the results of the “STpredict” functions “long_survivors” and “long_survivors”
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(RCASPAR)
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/RCASPAR/logrnk.Rd_%03d_medium.png", width=480, height=480)
> ### Name: logrnk
> ### Title: Performs Log Rank test on the long and short patient sets
> ### Aliases: logrnk
> ### Keywords: log rank test
>
> ### ** Examples
>
> PatientOrderValidation_L <- c(1, 2, 3, 5, 7)
> PatientOrderValidation_S <- c(4, 6, 8)
> group_L <- rep("L", 5)
> group_S <- rep("S", 3)
> censored_L <- c(0, 0, 1, 1, 0)
> censored_S <- c(0, 0, 1)
> True_STs_L <- c(5, 6, 6 ,7, 8)
> True_STs_S <- c(2, 3, 2)
> short <- as.data.frame(cbind(PatientOrderValidation_S, group_S, censored_S, True_STs_S))
> long <- as.data.frame(cbind(PatientOrderValidation_L, group_L, censored_L, True_STs_L))
> names(short) <- c("PatientOrderValidation", "group", "censored", "True_STs")
> names(long) <- c("PatientOrderValidation", "group", "censored", "True_STs")
> logrnk(dataL=long, dataS=short)
$Xsq
[1] 1.5
$pValue
[1] 0.2206714
>
>
>
>
>
> dev.off()
null device
1
>