Learn R Programming

Boom (version 0.9.15)

compare.vector.distribution: Boxplots to compare distributions of vectors

Description

Uses boxplots to compare distributions of vectors.

Usage

CompareVectorBoxplots(draws, main = NULL, colors = NULL, burn = 0, ...)

Arguments

draws

A list of MCMC draws. Each list element is a matrix with rows corresponding to MCMC iterations and columns to variables. The matrices can have different numbers of rows, but should have the same numbers of columns.

main

Main title of the plot.

colors

Colors to use for the boxplots. The length must match the number entries in draws.

burn

The number of initial MCMC iterations to discard before making the plot.

...

Extra arguments passed to boxplot.

Details

Creates side-by-side boxplots with the dimensions of each vector gropued together.

Examples

Run this code

x <- matrix(rnorm(300, mean = 1:3, sd = .4), ncol = 3, byrow = TRUE)
y <- matrix(rnorm(600, mean = 3:1, sd = .2), ncol = 3, byrow = TRUE)
CompareVectorBoxplots(list(x = x, y = y), colors = c("red", "blue"))

Run the code above in your browser using DataLab