DistributionPlotBinomial: Distribution Plot

Description Usage Arguments Details Value Author(s) See Also Examples

Description

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

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
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 [email protected]

See Also

Rcmdr Binomial Normal GammaDist

Examples

1
2
3
4
5
6
7
8
9
## Binomial distribution
DistributionPlotBinomial()
DistributionPlotBinomial(size=20, prob=0.2)

## Gamma distribution
DistributionPlotGamma()

## Normal distribution
DistributionPlotNorm()

polySegratioMM documentation built on May 2, 2019, 4:41 p.m.