Draw a forest plot of the performance of an internally-externally cross-validated model. By default the final model is shown.
## S3 method for class 'metapred'forest(object, perfFUN =1, step =NULL, method ="REML", model =NULL,...)
Arguments
object: A metapred fit object.
perfFUN: Numeric or character. Which performance statistic should be plotted? Defaults to the first.
step: Which step should be plotted? Defaults to the best step. numeric is converted to name of the step: 0 for an unchanged model, 1 for the first change...
method: character string specifying whether a fixed- or a random-effects model should be used to summarize the prediction model performance. A fixed-effects model is fitted when using method="FE". Random-effects models are fitted by setting method equal to one of the following: "DL", "HE", "SJ", "ML", "REML", "EB", "HS", or "GENQ". Default is "REML".
model: Which model change should be plotted? NULL (default, best change) or character name of variable or (integer) index of model change.
...: Other arguments passed to plotting internals. E.g. title. See forest.default for details.
Examples
data(DVTipd)# Internal-external cross-validation of a pre-specified model 'f'f <- dvt ~ histdvt + ddimdich + sex + notraum
fit <- metapred(DVTipd, strata ="study", formula = f, scope = f, family = binomial)# Display the model's external performance (expressed as mean squared error by default) # for each studyforest(fit)