
Last chance! 50% off unlimited learning
Sale ends in
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.
plot_large_metrics(
x,
colors = NULL,
title = NULL,
save = FALSE,
path = getwd(),
name = "myplot.pdf",
width = 15,
height = 8
)
The plot is returned invisibly in the form of a ggplot
object.
A data.frame. The result of small_metrics()
.
character. The colors to be used in the plot.
character. The plot title.
logical. Should the plot be saved?
A path to the directory in which the plot will be saved.
character. The name of the output pdf file.
numeric. The plot width in inches.
numeric. The plot height in inches.
small_metrics, large_metrics, plot_small_metrics
# \donttest{
D <- distr::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)
# }
Run the code above in your browser using DataLab