Description Usage Arguments Details Value Examples
View source: R/metapred_recal.R
recalibrate
is used to recalibrate a prediction model of classes metapred, glm
or lm
.
1 | recalibrate(object, newdata, f = ~1, estFUN = NULL, ...)
|
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 |
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.
Recalibrated model fit object, of the same class as object
. Generally, updated coefficients can
be retrieved with coef()
.
1 2 3 4 5 6 7 8 9 | 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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.