risk.classification: Risk of rank generated by tree-based method

Description Usage Arguments Details Value Examples

View source: R/risk.classification.R

Description

list out all the possible variables, the order is according to P-value from small to large, and the cut-off-point has been optimal.

Usage

1
risk.classification(tree, X.mat)

Arguments

tree

:Tree structure made by uni.tree() function

X.mat

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

Details

If the tree exists k terminal nodes, then the response 1 respresents the lowest risk and k represents the highest

Value

a sequence of risk of rank correspond to each sample

Examples

1
2
3
4
5
6
7
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)]
res=uni.tree(t.vec,d.vec,x.mat,P.value=0.01,d0=0.01,S.plot=FALSE,score=TRUE)
risk.classification(res,x.mat)

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