recalibrate {metamisc} | R Documentation |
Recalibrate a Prediction Model
Description
recalibrate
is used to recalibrate a prediction model of classes metapred, glm
or lm
.
Usage
recalibrate(object, newdata, f = ~1, estFUN = NULL, ...)
Arguments
object |
A model fit object to be recalibrated, of class |
newdata |
data.frame containing new data set for updating. |
f |
formula. Which coefficients of the model should be updated? Default: intercept only. Left-hand side may be left out. See formula for details. |
estFUN |
Function for model estimation. If left |
... |
Optional arguments to pass to |
Details
Currently only the coefficients are updated and the variances and other aspects are left untouched. For updating the entire model and all its statistics, see update.
Value
Recalibrated model fit object, of the same class as object
. Generally, updated coefficients can
be retrieved with coef()
.
Examples
data(DVTipd)
DVTipd$cluster <- 1:4 # Add a fictional clustering to the data set.
# Suppose we estimated the model in three studies:
DVTipd123 <- DVTipd[DVTipd$cluster <= 3, ]
mp <- metamisc:::metapred(DVTipd123, strata = "cluster", f = dvt ~ vein + malign,
family = binomial)
# and now want to recalibrate it for the fourth:
DVTipd4 <- DVTipd[DVTipd$cluster == 4, ]
metamisc:::recalibrate(mp, newdata = DVTipd4)