plotDb {dbd}R Documentation

Plot a db distribution.

Description

Plots the probabilities of a specified db distributon.

Usage

plotDb(alpha, beta, ntop, zeta, ..., plot = TRUE, tikx = NULL, xlim = NULL,
        ylim = NULL, xlab = NULL, ylab = NULL, main = "")

Arguments

alpha

See ddb().

beta

See ddb().

ntop

See ddb().

zeta

See ddb().

...

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 ntop or from 1 to ntop depending on whether zeta is TRUE. The p column consists of the appropriate probabilities of the x values, calculated by ddb(). 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.mleDb()

Examples

plotDb(2,3,14,FALSE,main="An exempular plot")
plotDb(2,3,14,TRUE,col="red",xlab="count",main="A communist plot")
plotDb(0.1,3,14,TRUE,col="blue",main="A royal plot")
plotDb(0.1,0.3,14,TRUE,col="green",main="An ecological plot")
plotDb(2,3,14,FALSE,xlim=c(0,15))
plotDb(2,3,14,FALSE,xlim=c(0,15),tikx=3*(0:5))
par(mfrow=c(2,1))
plotDb(2,2,5,FALSE,main=bquote(paste(alpha == 2,", ",beta == 2)),col="red")
plotDb(-2,-2,5,FALSE,main=bquote(paste(alpha == -2,", ",beta == -2)),col="blue")

[Package dbd version 0.0-22 Index]