VarImpPlot: Plots variable importance for a MetaForest object.

View source: R/VarImpPlot.R

VarImpPlotR Documentation

Plots variable importance for a MetaForest object.

Description

Plots variable importance for a MetaForest object.

Usage

VarImpPlot(mf, n.var = 30, sort = TRUE, ...)

Arguments

mf

MetaForest object.

n.var

Number of moderators to plot.

sort

Should the moderators be sorted from most to least important?

...

Parameters passed to and from other functions.

Value

A ggplot object.

Examples

set.seed(42)
data <- SimulateSMD()
mf.random <- MetaForest(formula = yi ~ ., data = data$training,
                        whichweights = "random", method = "DL",
                        tau2 = 0.0116)
VarImpPlot(mf.random)
VarImpPlot(mf.random, n.var = 2)
VarImpPlot(mf.random, sort = FALSE)

cjvanlissa/metaforest documentation built on Jan. 28, 2024, 12:19 p.m.