VarImpPlot {metaforest}R 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)

[Package metaforest version 0.1.4 Index]