VarImpPlot: Plots variable importance for a MetaForest object.

Description Usage Arguments Value Examples

View source: R/VarImpPlot.R

Description

Plots variable importance for a MetaForest object.

Usage

1
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?

Value

A ggplot object.

Examples

1
2
3
4
5
6
7
8
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)

Example output

Loading required package: edarf
Loading required package: ggplot2
Loading required package: metafor
Loading required package: Matrix
Loading 'metafor' package (version 2.0-0). For an overview 
and introduction to the package please type: help(metafor).
Loading required package: ranger
Loading required package: reshape2

metaforest documentation built on May 31, 2018, 9:03 a.m.