plotGamma: Plot a gamma density

Description Usage Arguments Details Value Author(s) Examples

Description

Plot a gamma density

Usage

1
plotGamma(alpha, beta, n = 251, q = 0.999, ...)

Arguments

alpha

the gamma's alpha parameter

beta

the gamma's beta parameter

n

number of points to plot

q

quantile used for xmax

...

...

Details

plotGamma creates a basic ggplot which can be styled.

Value

a ggplot object

Author(s)

David Kahle david.kahle@gmail.com

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
## Not run: 

plotGamma(1, 1)
plotGamma(.5, .5)
plotGamma(2, 2)
plotGamma(1:5, 1)
plotGamma(1, 1:5)

plotGamma(.5, .5, q = .999)
plotGamma(.5, .5, q = .99)
plotGamma(.5, .5, q = .9)


plotGamma(2, 2) + theme_bw()
plotGamma(2, 2) + theme_classic()
plotGamma(2, c(2, 4)) + theme_classic()

theme_set(theme_bw())
plotGamma(2, 2) + labs(x = "theta", y = "")
plotGamma(2, 2) + ggtitle("my plot")
plotGamma(2, 2) + labs(x = expression(lambda[1]), y = "belief")


## End(Not run)

dkahle/bayesRates documentation built on May 15, 2019, 9:07 a.m.