DistributionPlotBinomial {polySegratioMM}R Documentation

Distribution Plot

Description

Plots probability density function given the parameters. May be useful when investigating parameter choice for prior distributions.

Usage

DistributionPlotBinomial(size = 200, prob = 0.5,
xlab = "Number of Successes", ylab = "Probability Mass", signif.digits = 3,
main = paste("Binomial Distribution: n =", size, "p =",
signif(prob, digits = signif.digits)))

DistributionPlotGamma(shape = 1, rate = 1, length = 100, xlab = "x",
ylab = "Density", main = bquote(paste("Gamma Distribution: ", alpha,
"=", .(signif(shape, digits = signif.digits)), ",", beta, "=",
.(signif(rate, digits = signif.digits)))), signif.digits = 3)

DistributionPlotNorm(mean = 0, sd = 1, length = 100, xlab = "x", ylab =
"Density", main = bquote(paste("Normal Distribution: ", mu, "=",
.(signif(mean, digits = signif.digits)), ",", sigma, "=", .(signif(sd,
digits = signif.digits)))), signif.digits = 3)

Arguments

size

number of trials (Binomial)

prob

probability of success (Binomial)

shape

shape parameter. Must be strictly positive. (Gamma)

rate

an alternative way to specify the scale (Gamma)

mean

mean (Normal)

sd

standard deviation (Normal)

xlab

x-axis label

ylab

y-axis label

signif.digits

number of significant digits for default main title

main

title for plot

length

Number of points to use for obtaining a smooth curve

Details

Based on functions in package Rcmdr

Value

None.

Author(s)

Peter Baker p.baker1@uq.edu.au

See Also

Rcmdr Binomial Normal GammaDist

Examples

## Binomial distribution
DistributionPlotBinomial()
DistributionPlotBinomial(size=20, prob=0.2)

## Gamma distribution
DistributionPlotGamma()

## Normal distribution
DistributionPlotNorm()

[Package polySegratioMM version 0.6-4 Index]