forest.metapred: Forest plot of a metapred fit

View source: R/metapred_measures.R

forest.metapredR Documentation

Forest plot of a metapred fit

Description

Draw a forest plot of the performance of an internally-externally cross-validated model. By default the final model is shown.

Usage

## 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.

Author(s)

Valentijn de Jong <Valentijn.M.T.de.Jong@gmail.com>

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 study
forest(fit)


metamisc documentation built on Sept. 25, 2022, 5:05 p.m.