forest.metapred: Forest plot of a metapred fit

Description Usage Arguments Author(s) Examples

View source: R/metapred_measures.R

Description

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

Usage

1
2
## 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

1
2
3
4
5
6
7
8
9
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 Oct. 13, 2021, 3 p.m.