Description Usage Arguments Details Value References See Also Examples
Likelihood-based boosting algorithm to fit flexible, structured survival models with component-wise linear or P-spline base-learners. Variable selection and model choice are built in features.
1 2 3 4 |
x |
an object to be pased to |
formula |
|
data |
data frame. Contains the data of the model that is to be fitted. |
weights |
integer vector. Optional weights of the observations in
|
na.action |
a function that defines how to handle |
control |
an object of class |
... |
further arguments to be passed to subfunctions. |
A structured, flexible Cox-type survival model is fitted to the data
by likelihood-based boosting. The (component-wise) base-learners are
specified via the formula
. Examples for the specification of
base-learners can be found either in bols
or in
bbs
.
The weights
(a.t.m.) can only be used to specify a learning
sample which consists of observations with weights == 1
and
and an out-of-bag sample with weights == 0
. The latter can for
example be used to determine the appropriate stopping iteration of the
algorithm.
An object of class cfboost
is returned:
data |
data object after data pre-processing (a list of class |
ensemble |
vector of selected base-learners. |
ensembless |
list of coefficient estimates for each iteration.
Only the coefficient of the selected base-learner is stored; i.e.,
|
fit |
vector of fitted values (in the last iteration). |
offset |
offset value. |
control |
control parameters as specified. |
response |
the specified response variable (an object of class |
risk |
vector of the risk (negative log likelihood) computed on
the training or validation sample (see |
weights |
weights used for model fitting. |
df |
matrix of estimated degrees of freedom for smooth base-learners. |
coefs |
(list of) estimated coefficients (in the final boosting iteration). |
predict |
function for prediction (to be accessed via
|
call |
the model call. |
Benjamin Hofner, Torsten Hothorn and Thomas Kneib (2008), Variable Selection and Model Choice in Structured Survival Models. Department of Statistics, Technical Report No. 43. http://epub.ub.uni-muenchen.de/7901/
boost_control
for the control arguments for
cfboost
and bols
or bbs
for the
available base-learners.
Methods to process the output can be found in
methods
. A complete example can be found in
CoxFlexBoost-package
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | ## a simple example (without time-varying effects)
set.seed(1234)
## sample covariates first
X <- matrix(NA, nrow=400, ncol=3)
X[,1] <- runif(400, -1, 1)
X[,2] <- runif(400, -1, 1)
X[,3] <- runif(400, -1, 1)
## time-dependent hazard rate
lambda <- function(time, x){
exp(0 * time + 0.7 * x[1] + x[2]^2)
}
## specify censoring function
cens_fct <- function(time, mean_cens){
censor_time <- rexp(n = length(time), rate = 1/mean_cens)
event <- (time <= censor_time)
t_obs <- apply(cbind(time, censor_time), 1, min)
return(cbind(t_obs, event))
}
data <- rSurvTime(lambda, X, cens_fct, mean_cens = 5)
ctrl <- boost_control( mstop = 100, risk="oobag")
weights <- sample(c(0,1), 400, replace=TRUE, prob=c(0.25, 0.75))
## fit (a simple) model
model <- cfboost(Surv(time, event) ~ bbs(x.1) + bbs(x.2) + bbs(x.3),
control = ctrl, data = data, weights = weights)
model <- model[mstop(model)]
summary(model)
## fit (a simple) model with model choice
## i.e., with decomposition of base-learners
model_2 <- cfboost(Surv(time, event) ~ bols(x.1) + bbs(x.1, df=1, center=TRUE)
+ bols(x.2) + bbs(x.2, df=1, center=TRUE)
+ bols(x.3) + bbs(x.3, df=1, center=TRUE),
control = ctrl, data = data, weights = weights)
model_2 <- model_2[mstop(model_2)]
## only bols(x.1) and bbs(x.2, ...) are selected (as desired)
summary(model_2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.