Plots cumulative MSE for a MetaForest object.

# S3 method for MetaForest
plot(x, y, ...)

Arguments

x

MetaForest object.

y

not used for plot.MetaForest

...

Arguments to be passed to methods, not used for plot.MetaForest

Value

A ggplot object, visualizing the number of trees on the x-axis, and the cumulative mean of the MSE of that number of trees on the y-axis. As a visual aid to assess convergence, a dashed gray line is plotted at the median cumulative MSE value.

Examples

# \dontshow{
set.seed(42)
data <- SimulateSMD()
#Conduct unweighted MetaForest analysis
mf.unif <- MetaForest(formula = yi ~ ., data = data$training,
                      whichweights = "unif", method = "DL")
plot(mf.unif)

# }