| cv.CoxBoost | R Documentation |
Performs a K-fold cross-validation for CoxBoost in search for
the optimal number of boosting steps.
cv.CoxBoost(
time,
status,
x,
subset = 1:length(time),
weights = NULL,
stratum = NULL,
maxstepno = 100,
K = 10,
type = c("verweij", "naive"),
cmprsk = c("sh", "csh", "ccsh"),
parallel = FALSE,
upload.x = TRUE,
multicore = FALSE,
folds = NULL,
trace = FALSE,
...
)
time |
vector of length |
status |
censoring indicator, i.e., vector of length |
x |
|
subset |
a vector specifying a subset of observations to be used in the fitting process. |
weights |
weights to be passed to |
stratum |
vector specifying different groups of individuals for a
stratified Cox regression. In |
maxstepno |
maximum number of boosting steps to evaluate, i.e, the
returned “optimal” number of boosting steps will be in the range
|
K |
number of folds to be used for cross-validation. If |
type |
way of calculating the partial likelihood contribution of the
observation in the hold-out folds: |
cmprsk |
type of competing risk, specific hazards or cause-specific |
parallel |
logical value indicating whether computations in the
cross-validation folds should be performed in parallel on a compute cluster,
using package |
upload.x |
logical value indicating whether |
multicore |
indicates whether computations in the cross-validation
folds should be performed in parallel, using package |
folds |
if not |
trace |
logical value indicating whether progress in estimation should be indicated by printing the number of the cross-validation fold and the index of the covariate updated. |
... |
miscellaneous parameters for the calls to
|
List with the following components:
mean.logplik |
vector of
length |
se.logplik |
vector with standard error estimates for the mean partial log-likelihood criterion for each boosting step. |
optimal.step |
optimal boosting step number, i.e., with minimum mean partial log-likelihood. |
folds |
list of length |
Harald Binder binderh@uni-mainz.de
Verweij, P. J. M. and van Houwelingen, H. C. (1993). Cross-validation in survival analysis. Statistics in Medicine, 12(24):2305-2314.
CoxBoost, optimCoxBoostPenalty
# Generate some survival data with 10 informative covariates
n <- 200; p <- 100
beta <- c(rep(1,10),rep(0,p-10))
x <- matrix(rnorm(n*p),n,p)
real.time <- -(log(runif(n)))/(10*exp(drop(x %*% beta)))
cens.time <- rexp(n,rate=1/10)
status <- ifelse(real.time <= cens.time,1,0)
obs.time <- ifelse(real.time <= cens.time,real.time,cens.time)
# 5-fold cross-validation
# increase `maxstepno` for more boosting steps
cv.res <- cv.CoxBoost(time=obs.time,status=status,x=x,maxstepno=50,
K=5,type="verweij",penalty=100)
# examine mean partial log-likelihood in the course of the boosting steps
plot(cv.res$mean.logplik)
# Fit with optimal number of boosting steps
cbfit <- CoxBoost(time=obs.time,status=status,x=x,stepno=cv.res$optimal.step,
penalty=100)
summary(cbfit)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.