Description Usage Arguments Value Author(s) References See Also Examples
Calculates cross-validated predictions based on within-sample assessment and calibration using generalized linear models with multiple imputations to account for missing values in predictor data.
1 2 |
formula |
A formula object providing a symbolic description of the prediction model to be fitted. |
family |
Specification of an appropriate error distribution and link function. |
data |
A data.frame containing calibration data on |
nimp |
Number of imputations used in the prediction of each observation. |
folds |
Number of fold-partitions defined within |
method |
Imputation combination method. This defaults to
|
mice.options |
Optional list containing arguments to be supplied to |
A list containing predictions.
pred
Matrix of predictions on the scale of the response
variable of dimension n
by nimp
.
linpred
Matrix of predictions on the scale
of the linear predictor of dimension n
by nimp
.
Bart J A Mertens, b.mertens@lumc.nl
https://arxiv.org/abs/1810.05099
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | # Generate a copy of the cll data and construct binary outcome from survival information
cll_bin<-cll
cll_bin$srv5y_s[cll_bin$srv5y>12] <- 0 # Apply administrative censorship at t=12 months
cll_bin$srv5y[cll_bin$srv5y>12] <- 12
cll_bin$Status[cll_bin$srv5y_s==1]<- 1 # Define the new binary "Status" outcome variable
cll_bin$Status[cll_bin$srv5y_s==0] <- 0 # As numeric -> 1:Dead, 0:Alive
cll_bin$Censor <- NULL # Remove survival outcomes
cll_bin$srv5y <- NULL
cll_bin$srv5y_s <- NULL
# Cross-validate prediction using logistic regression in the first 100 samples
# Apply prediction-averaging using 5 imputations, 5 folds and maxit=5.
# Note these settings are only for illustration and should be set to higher values for
# practical use, particularly for nimp.
output<-mipred.cv(Status ~ age10+cyto, family=binomial, data=cll_bin[1:100,-1],
nimp=5, folds=5, mice.options=list(maxit=5))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.