plot_large_metrics {estimators}R Documentation

Plot Large Sample Metrics

Description

This function provides an easy way to illustrate the output of large_metrics(), using the ggplot2 package. A grid of line charts is created for each element of the asymptotic variance - covariance matrix. Each estimator is plotted with a different color and linetype. The plot can be saved in pdf format.

Usage

plot_large_metrics(
  x,
  colors = NULL,
  title = NULL,
  save = FALSE,
  path = NULL,
  name = "myplot.pdf",
  width = 15,
  height = 8
)

Arguments

x

A data.frame. The result of small_metrics().

colors

character. The colors to be used in the plot.

title

character. The plot title.

save

logical. Should the plot be saved?

path

A path to the directory in which the plot will be saved.

name

character. The name of the output pdf file.

width

numeric. The plot width in inches.

height

numeric. The plot height in inches.

Value

The plot is returned invisibly in the form of a ggplot object.

See Also

small_metrics, large_metrics, plot_small_metrics

Examples


D <- Beta(shape1 = 1, shape2 = 2)

prm <- list(name = "shape1",
            pos = NULL,
            val = seq(0.5, 2, by = 0.5))

x <- small_metrics(D, prm,
                   est = c("mle", "me", "same"),
                   obs = c(20, 50),
                   sam = 1e2,
                   seed = 1)

plot_small_metrics(x)


[Package estimators version 0.8.5 Index]