plotBb {dbd}R Documentation

Plot a beta binomial distribution.

Description

Plots the probabilities of a specified beta binomial distributon.

Usage

plotBb(m, s, size, ..., plot = TRUE, tikx = NULL, xlim = NULL,
        ylim = NULL, xlab = NULL, ylab = NULL, main = "")

Arguments

m

Numeric scalar between 0 and 1. May be interpreted as the “success probability”.

s

Numeric scalar, greater than 0. The overdispersion parameter of the distribution.

size

Integer scalar specifying the upper limit of the “support” of the beta binomial distribution under consideration. The support is the set of integers {0, 1, ..., size}.

...

Extra arguments that are passed to the plot() function.

plot

Logical scalar; should a plot be produced (or should the function simply return a data frame consisting of the relevant values)?

tikx

(Optional) vector of locations of the tick marks on the x-axis.

xlim

The x-limits of the plot. (See plot.default().)

ylim

The y-limits of the plot. (See plot.default().)

xlab

A label for the x-axis. (See plot.default().)

ylab

A label for the y-axis. (See plot.default().)

main

An overall title for the plot. (See plot.default(); see also title().)

Value

A data frame with numeric columns x and p. The x column consists of the integers from 0 to size. The p column consists of the appropriate probabilities of the x values, calculated by dbetabinom() from the rmutil package. The value is returned invisibly. A plot is produced as a side-effect if plot is TRUE.

Author(s)

Rolf Turner r.turner@auckland.ac.nz

See Also

plot.mleBb() plotDb() plot.mleDb()

Examples

plotBb(0.7,3,14,main="An exempular plot")
plotBb(0.3,3,14,col="red",xlab="count",main="A communist plot")
plotBb(0.1,10,14,col="blue",main="A royal plot")
plotBb(0.5,20,14,col="green",main="An ecological plot")
plotBb(0.5,20,14,xlim=c(0,15))
plotBb(0.5,20,14,xlim=c(0,15),tikx=3*(0:5))

[Package dbd version 0.0-22 Index]