Learn R Programming

berryFunctions (version 1.22.5)

betaPlotComp: Compare beta distributions

Description

Visually understand the effect of the beta distribution parameters

Usage

betaPlotComp(
  shape1 = c(0.5, 1:4, 10, 20),
  shape2 = shape1,
  cumulative = FALSE,
  cex = 0.8,
  las = 1,
  main = "",
  ylim = lim0(4),
  mar = rep(0, 4),
  oma = c(2, 2, 4.5, 2),
  mgp = c(3, 0.7, 0),
  keeppar = FALSE,
  textargs = NULL,
  ...
)

Value

None. Used for plotting.

Arguments

shape1

Vector of alpha values as in dbeta. DEFAULT: c(0.5, 1:4, 10,20)

shape2

Beta values to be compared. DEFAULT: shape1

cumulative

Should the cumulative density distribution line be added? DEFAULT: FALSE

cex

Character EXpansion size. DEFAULT: 0.8

las

Label Axis Style passed to axis. DEFAULT: 1

main

Main as in plot. DEFAULT: ""

ylim

LIMit for the Y axis. DEFAULT: lim0(4)

mar

MARgins for plot passed to par. DEFAULT: rep(0,4)

oma

Outer MArgins for plot passed to par. DEFAULT: c(2,2,4.5,2)

mgp

MarGin Placement. DEFAULT: c(3,0.7,0)

keeppar

Should margin parameters be kept instead of being restored to previous value? DEFAULT: FALSE

textargs

List of arguments passed to textField. DEFAULT: NULL

...

Further arguments passed to betaPlot like lines, fill, etc.

Author

Berry Boessenkool, berry-b@gmx.de, Dec 2015

See Also

betaPlot

Examples

Run this code

betaPlotComp()
betaPlotComp(oma=c(2,2,2,2), ylim=lim0(5.5), textargs=list(y=NA))
betaPlotComp(shape1=c(3,10,34), shape2=c(7,9,24))

Run the code above in your browser using DataLab