Learn R Programming

metaforest (version 0.1.4)

VarImpPlot: Plots variable importance for a MetaForest object.

Description

Plots variable importance for a MetaForest object.

Usage

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

Value

A ggplot object.

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.

Examples

Run this code
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)

Run the code above in your browser using DataLab