bols: Linear Base-Learner for CoxFlexBoost

Description Usage Arguments Details Value References See Also Examples

View source: R/bols.R

Description

Defines a linear base-learner for boosting flexible, structured survival models. Both, time-constant base-learners and time-varying effects (and thus the baseline hazard) can be specified.

Usage

1
2
3
bols(x, z = NULL, xname = NULL, zname = NULL,  center = FALSE,
     timedep = FALSE, contrasts.arg = "contr.treatment")
bolsTime(...)

Arguments

x

factor or numeric. A vector containing data.

z

factor or numeric. A vector containing data.

xname

optional. Name of the variable given in x.

zname

optional. Name of the variable given in z.

center

logical. If center=TRUE the intercept in the linear model is omitted.

timedep

logic. If timedep = TRUE the base-learner is taken to be time-dependent, i.e., x must be the time. For more details see below.

contrasts.arg

a character string suitable for input to the contrasts replacement function.

...

further arguments passed to bols.

Details

The function bolsTime(...) is a wrapper to bols(..., timedep=TRUE).

Time-dependent base-learners can be utilzed to specify the (log-) baseline hazard rate or time-varying effects. In the first case, the base-learner is specified as bolsTime(time, z = NULL, ...) and in the later case, the covariate with a (potential) time-dependent effect is specified as z.

Value

An object of class baselearner (and class bols) is returned. It consits of design matrix of the base-learner. Further elements are returned as attributes (see attr) of the object. The attributes are mainly for internal use and are, e.g., the current coefficient estimates (coefs) and a logical (timedep) indicating whether the base-learner specifies a time-varying effect or not.

References

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/

Thomas Kneib, Torsten Hothorn and Gerhard Tutz (2008), Variable selection and model choice in geoadditive regression models. Biometrics. To appear. http://epub.ub.uni-muenchen.de/2063/

See Also

bbs for P-spline base-learners and cfboost for the boosting algorithm.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
x1 <- rnorm(100)
time <- rexp(100,1)

## example for time-constant linear base-learner
str(bols(x1))

## example for linear time-varying effect for x1
str(bolsTime(time, z = x1))

## for more examples and effect decompositions see ?bbs

CoxFlexBoost documentation built on May 2, 2019, 6:53 p.m.