bootstrap: Bootstrap to Correct for Over-optimism due to Adaptive...

Description Usage Arguments Details Value References Examples

View source: R/bootstrap.R

Description

This function is used to obtain the bias-corrected cost. One may select the final subtree with the lowest bootstrap estimated cost, with or without the additional AIC/BIC as in Xu and Adak (2002).

Usage

1
2
bootstrap(B = 20, nodetree, subtrees, survtime, survstatus, 
          x, D = 4, minfail = 30, alphac = 2)

Arguments

B

Number of bootstrap samples. Default is 20.

nodetree

Full grown tree with original data. Output from output.coxphout

subtrees

Pruned subtrees with original data. Output from prune

survtime

survival time/follow up time of subjects

survstatus

survival status of subjects.

x

a data frame of covariates. In case of single covariate, use [,,drop =FALSE] to keep the data frame structure

D

maximum depth the tree will grow. Default depth is 4.

minfail

minimum number of unique event required in each block. Default is 10

alphac

Predetermined penalty parameter

Details

The implemented cost here is the negative log partial likelihood. Each bootstrap sample is used to grow a full tree and then pruned to obtain the set of subtrees. The bias is estimated by the average of the differences between the cost of a bootstrapped subtree itself and the cost of sending the original data down the bootstrapped subtree. The bias-corrected cost is then obtained by subtracting this bias from the original cost. Predetermined penalty parameter can be used to account for the dimension of covariates, via Akaike information criteria (AIC), Schwarz Bayesian information criteria (BIC), or the 0.95 quantile of the chi-square distribution.

Value

bcoef

coefficient values from each bootstrap sample

btree

Tree related information from each bootstrapped sample. Types of information are the same as the ones from output.coxphout

bomega

Bias at each subtree for each bootstrapped data, the average of which gives the overall bootstrap estimated bias

bootcost

cost based on the bootstrapped data

ori.boot

negative log partial likelihood of the original data fitted to the model given by bootstrapped data

References

Xu, R. and Adak, S. (2002), Survival Analysis with Time-Varying Regression Effects Using a Tree-Based Approach. Biometrics, 58: 305-315.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## Not run: 
data('alcohol')
require(survival)

coxtree <- coxph.tree(alcohol[,'time'], alcohol[,'event'], 
                      x = alcohol[,'alc', drop = FALSE], D = 4)
nodetree <- output.coxphout(coxtree)

subtrees <- prune(nodetree)

#This function requires output from output.coxphout, prune, and the original data set.

store.mult.cont <- bootstrap(B=20, nodetree, subtrees, alcohol[,'time'],
                                alcohol[,'event'], x = alcohol[,'alc', drop = FALSE], 
                                D=4,minfail=20, alphac=2)

## End(Not run)

TimeVTree documentation built on May 2, 2019, 2:17 a.m.