# discrete.gamma

##### Discrete Gamma function

`discrete.gamma`

internally used for the likelihood computations in
`pml`

or `optim.pml`

. It is useful to understand how it works
for simulation studies or in cases where .

- Keywords
- cluster

##### Usage

`discrete.gamma(alpha, k)`plot_gamma_plus_inv(shape = 1, inv = 0, k = 4, discrete = TRUE,
cdf = TRUE, append = FALSE, xlab = "x", ylab = ifelse(cdf,
"F(x)", "f(x)"), xlim = NULL, verticals = FALSE, ...)

##### Arguments

- alpha
Shape parameter of the gamma distribution.

- k
Number of intervals of the discrete gamma distribution.

- shape
Shape parameter of the gamma distribution.

- inv
Proportion of invariable sites.

- discrete
logical wether to plot discrete (default) or continous pdf or cdf.

- cdf
logical wether to plot the cummulative distribution function or density / probability function.

- append
logical; if TRUE only add to an existing plot.

- xlab
a label for the x axis, defaults to a description of x.

- ylab
a label for the y axis, defaults to a description of y.

- xlim
the x limits of the plot.

- verticals
ogical; if TRUE, draw vertical lines at steps.

- …
Further arguments passed to or from other methods.

##### Details

These functions are exported to be used in different packages so far only in
the package coalescentMCMC, but are not intended for end user. Most of the
functions call C code and are far less forgiving if the import is not what
they expect than `pml`

.

##### Value

`discrete.gamma`

returns a matrix.

##### See Also

##### Examples

```
# NOT RUN {
discrete.gamma(1, 4)
par(mfrow = c(2,1))
plot_gamma_plus_inv(shape=2, discrete = FALSE, cdf=FALSE)
plot_gamma_plus_inv(shape=2, append = TRUE, cdf=FALSE)
plot_gamma_plus_inv(shape=2, discrete = FALSE)
plot_gamma_plus_inv(shape=2, append = TRUE)
par(mfrow = c(1,1))
# }
```

*Documentation reproduced from package phangorn, version 2.5.5, License: GPL (>= 2)*