uni.logrank: Univariate binary splits by the logrank test

Description Usage Arguments Details Value Examples

View source: R/uni.logrank.R

Description

The output is the summary of significance tests for binary splits, where the cut-off values are optimized for each covariate.

Usage

1
uni.logrank(t.vec, d.vec, X.mat)

Arguments

t.vec

:Vector of survival times (time to either death or censoring)

d.vec

:Vector of censoring indicators (1=death, 0=censoring)

X.mat

:n by p matrix of covariates, where n is the sample size and p is the number of covariates

Details

The output can be used to construct a logrank tree.

Value

A dataframe containing:

Pvalue: the P-value of the two-sample logrank test, where the cut-off value is optimized

cut_off_point: the optimal cutt-off values of the binary splits given a feature

left.sample.size: the sample size of a left child node

right.sample.size: the sample size of a right child node

Examples

1
2
3
4
5
6
data(Lung,package="compound.Cox")
train_Lung=Lung[which(Lung[,"train"]==TRUE),] #select training data
t.vec=train_Lung[,1]
d.vec=train_Lung[,2]
x.mat=train_Lung[,-c(1,2,3)]
uni.logrank(t.vec,d.vec,x.mat)

uni.survival.tree documentation built on March 22, 2021, 9:05 a.m.