The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.

Title: Discrete Distribution Approximations
Version: 1.0.3
Description: Creates discretised versions of continuous distribution functions by mapping continuous values to an underlying discrete grid, based on a (uniform) frequency of discretisation, a valid discretisation point, and an integration range. For a review of discretisation methods, see Chakraborty (2015) <doi:10.1186/s40488-015-0028-6>.
License: MIT + file LICENSE
LazyData: true
URL: https://github.com/reconhub/distcrete
BugReports: https://github.com/reconhub/distcrete/issues
Suggests: knitr, rmarkdown, testthat
RoxygenNote: 6.0.1
VignetteBuilder: knitr
NeedsCompilation: no
Packaged: 2017-11-23 12:44:36 UTC; steph
Author: Steph Locke [cre], Rich FitzJohn [aut], Anne Cori [aut], Thibaut Jombart [aut]
Maintainer: Steph Locke <steph@itsalocke.com>
Repository: CRAN
Date/Publication: 2017-11-23 13:50:05 UTC

Discretise a distribution

Description

Discretise a distribution.

Usage

distcrete(name, interval, ..., w = 0.5, anchor = 0)

Arguments

name

The name of a distribution function (e.g., norm, gamma). The distribution must have a cdf function (e.g., pnorm) and a quantile function (e.g., qnorm) defined.

interval

The interval to discretise the interval onto.

...

Parameters to cdf. Can be matched positionally or by name.

w

How to weight the endpoints; must be between 0 and 1. If 0.5 then integration happens centred around the interval, if 0 floor, if 1 then ceiling.

anchor

Any location that is a valid x

Author(s)

Rich FitzJohn

Examples

library(distcrete)
set.seed(415)
d0 <- distcrete("gamma", 1, shape = 3, w = 0)
d0$d(1:10)
d0$p(c(.1,.5))
d0$q(c(.1,.5))
d0$r(10)

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.