DiscreteDistribution

0th

Percentile

Generating function "DiscreteDistribution"

Generates an object of class "DiscreteDistribution"

Keywords
distribution
Usage
DiscreteDistribution(supp, prob, .withArith=FALSE, .withSim=FALSE)
  DiscreteDistribution(supp)
Arguments
supp
numeric vector which forms the support of the discrete distribution.
prob
vector of probability weights for the elements of supp.
.withArith
normally not set by the user, but if determining the entries supp, prob distributional arithmetics was involved, you may set this to TRUE.
.withSim
normally not set by the user, but if determining the entries supp, prob simulations were involved, you may set this to TRUE.
Details

If prob is missing, all elements in supp are equally weighted.

Value

  • Object of class "DiscreteDistribution"

Note

Working with a computer, we use a finite interval as support which carries at least mass 1-getdistrOption("TruncQuantile").

synopsis

DiscreteDistribution(supp, prob, .withArith = FALSE, .withSim = FALSE)

concept

  • discrete distribution
  • generating function

See Also

DiscreteDistribution-class AbscontDistribution-class RtoDPQ.d

Aliases
  • DiscreteDistribution
Examples
# Dirac-measure at 0
D1 <- DiscreteDistribution(supp = 0)
D1
# simple discrete distribution
D2 <- DiscreteDistribution(supp = c(1:5), prob = c(0.1, 0.2, 0.3, 0.2, 0.2))
D2

plot(D2)
Documentation reproduced from package distr, version 2.0.2, License: LGPL-3

Community examples

Looks like there are no examples yet.