Discretise a distribution.
distcrete(name, interval, ..., w = 0.5, anchor = 0)
name | The name of a distribution function (e.g.,
|
---|---|
interval | The interval to discretise the interval onto. |
... | Parameters to |
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 |
#> [1] 0.243022187 0.253486335 0.185086776 0.113451286 0.062683215 0.032332641 #> [7] 0.015882196 0.007521773 0.003462799 0.001558522d0$p(c(.1,.5))#> [1] 0.09958372 0.19115317d0$q(c(.1,.5))#> [1] 0 1d0$r(10)#> [1] 2 3 1 2 12 2 2 4 5 3