Dirac-class

0th

Percentile

Class "Dirac"

The Dirac distribution with location $l$, by default $=0$, has density $d(x) = 1$ for $x = l$, $0$ else.

Keywords
distribution
Objects from the Class

Objects can be created by calls of the form Dirac(location). This object is a Dirac distribution.

Extends

Class "DiscreteDistribution", directly. Class "UnivariateDistribution", by class "DiscreteDistribution". Class "Distribution", by class "DiscreteDistribution".

concept

• location family
• lattice distribution
• discrete distribution
• Dirac distribution
• S4 parameter class

DiracParameter-class DiscreteDistribution-class Naturals-class

Aliases
• Dirac-class
• Dirac
• initialize,Dirac-method
• log,Dirac-method
• Math,Dirac-method
Examples
D <- Dirac(location = 0) # D is a Dirac distribution with location=0.
r(D)(1)
# r(D)(1) generates a pseudo-random-number according to a Dirac
# distribution with location = 0,
# which of course will take 0 as value almost surely.
d(D)(0) # Density of this distribution is 1 for x = 0.
p(D)(1) # Probability that x < 1 is 1.
q(D)(.1) # q(D)(x) is always 0 (= location).
location(D) # location of this distribution is 0.
location(D) <- 2 # location of this distribution is now 2.
Documentation reproduced from package distr, version 2.0.2, License: LGPL-3

Community examples

Looks like there are no examples yet.