uni.logrank: Univariate selection under log-rank test

Description Usage Arguments Details Value Examples

View source: R/uni.logrank.R

Description

List out all the possible variables. The cut-off-point has been optimal.

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 of the covariates has been ordered by the P-value from the smallest to the largest

Value

A table contains an information of binary splitting, including P-value of the test, cut-off-point, sample sizes of two nodes, for each covariate

Pvalue: P-value of two sample logrank test

cut_off_point: to transfer x into binary case

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

right.sample.size: sample size of 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)

lichkeam/uni.survival.tree documentation built on Dec. 21, 2021, 10:46 a.m.