bootstrap | R Documentation |
Boostrap validation for survival data as described in Harrell et al. 1996.
bootstrap(
x,
y,
fun = rcv.glmnet,
nboot = 200L,
m = 50,
times = 90,
...,
s = "lambda.1se",
verbose = interactive()
)
## S3 method for class 'boot.glmnet'
print(x, digits = max(3L, getOption("digits") - 3L), ...)
x |
|
y |
|
fun |
model function, e.g. |
nboot |
|
m |
|
times |
|
s |
|
verbose |
|
digits |
|
... |
further params passed to |
A list
, with the fitted model fit
and the over-optimistic error.
Harrell Jr, Frank E., Kerry L. Lee, and Daniel B. Mark. "Multivariable prognostic models: issues in developing models, evaluating assumptions and adequacy, and measuring and reducing errors." Statistics in medicine 15.4 (1996): 361-387. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1002/(SICI)1097-0258(19960229)15:4<361::AID-SIM168>3.0.CO;2-4")}
# nboot should usually be higher but to keep the runtime of the example low
# we choose 2 here
data(eldd)
x <- na.omit(eldd)
y <- Surv(x$DaysAtRisk, x$Deceased)
x <- as.matrix(x[,c("Age", "ALB_S", "BILI_S", "CRE_S", "INR_C")])
boot <- bootstrap(
x, y, rcv.glmnet, family = "cox",
nboot = 2, nrepcv = 2, nfolds = 3
)
boot
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.