operators-methods {distr} | R Documentation |
Arithmetics and unary mathematical transformations for distributions
e1,e2 |
objects of class "UnivariateDistribution" (or subclasses) or "numeric" |
Arithmetics as well as all functions from group Math
, see Math
are provided for distributions; wherever possible exact expressions are used; else
random variables are generated according to this transformation and subsequently the remaining
slots filled by RtoDPQ
, RtoDPQ.d
-
signature(e1 = "UnivariateDistribution", e2 = "missing")
unary operator; result again of class "UnivariateDistribution"
; exact-
signature(e1 = "Norm", e2 = "missing")
unary operator; result again of "Norm"
; exact+
signature(e1 = "UnivariateDistribution", e2 = "numeric")
result again of class "UnivariateDistribution"
; exact+
signature(e1 = "AbscontDistribution", e2 = "numeric")
result again of
class "AbscontDistribution"
; exact+
signature(e1 = "DiscreteDistribution", e2 = "numeric")
result again of
class "DiscreteDistribution"
; exact+
signature(e1 = "Cauchy", e2 = "numeric")
result again of class "Cauchy"
; exact+
signature(e1 = "Dirac", e2 = "numeric")
result again of class "Dirac"
; exact+
signature(e1 = "Norm", e2 = "numeric")
result again of class "Norm"
; exact+
signature(e1 = "Unif", e2 = "numeric")
result again of class "Unif"
; exact+
signature(e1 = "numeric", e2 = "UnivariateDistribution")
is translated to
signature(e1 = "UnivariateDistribution", e2 = "numeric")
; exact-
signature(e1 = "UnivariateDistribution", e2= "ANY")
;exact-
signature(e1 = "UnivariateDistribution", e2 = "numeric")
is translated to
e1 + (-e2)
; exact-
signature(e1 = "numeric", e2 = "UnivariateDistribution")
is translated to (-e1) + e2
; exact*
signature(e1 = "UnivariateDistribution", e2 = "numeric")
result again of class "UnivariateDistribution"
; exact*
signature(e1 = "DiscreteDistribution", e2 = "numeric")
result again of class "DiscreteDistribution"
; exact*
signature(e1 = "AbscontDistribution", e2 = "numeric")
result again of class "AbscontDistribution"
; exact*
signature(e1 = "Exp", e2 = "numeric")
if e2>0
result again of class "Exp"
; exact*
signature(e1 = "ExpOrGammaOrChisq", e2 = "numeric")
if e1
is a Gamma distribution and e2>0
result of class "Gammad"
; exact*
signature(e1 = "Cauchy", e2 = "numeric")
result again of class "Cauchy"
; exact*
signature(e1 = "Dirac", e2 = "numeric")
result again of class "Dirac"
; exact*
signature(e1 = "Norm", e2 = "numeric")
result again of class "Norm"
; exact*
signature(e1 = "Unif", e2 = "numeric")
result again of class "Unif"
; exact*
signature(e1 = "numeric", e2 = "UnivariateDistribution")
is translated to
signature(e1 = "UnivariateDistribution", e2 = "numeric")
; exact/
signature(e1 = "UnivariateDistribution", e2 = "numeric")
is translated to e1 * (1/e2)
; exact+
signature(e1 = "UnivariateDistribution", e2 = "UnivariateDistribution")
result again of class
"UnivariateDistribution"
; is generated by simulations-
signature(e1 = "UnivariateDistribution", e2 = "UnivariateDistribution")
is translated to (-e1) + (-e2)
;
result again of class "UnivariateDistribution"
; is generated by simulations+
signature(e1 = "AbscontDistribution", e2 = "AbscontDistribution")
assumes e1
, e2
independent; result again of class
"AbscontDistribution"
; is generated by FFT+
signature(e1 = "AbscontDistribution", e2 = "DiscreteDistribution")
assumes e1
, e2
independent; result again of class
"AbscontDistribution"
; is generated by FFT+
signature(e1 = "DiscreteDistribution", e2 = "AbscontDistribution")
assumes e1
, e2
independent; result again of class
"AbscontDistribution"
; is generated by FFT+
signature(e1 = "DiscreteDistribution", e2 = "DiscreteDistribution")
assumes e1
, e2
independent; result again of class
"AbscontDistribution"
; is generated by explicite convolution+
signature(e1 = "Binom", e2 = "Binom")
assumes e1
, e2
independent;
if prob(e1)==prob(e2)
, result again of class
"Binom"
; uses the convolution formula for binomial distributions; exact+
signature(e1 = "Chisq", e2 = "Chisq")
assumes e1
, e2
independent; result again of class
"Chisq"
; uses the convolution formula for Chisq distributions; exact+
signature(e1 = "Dirac", e2 = "Dirac")
result again of class "Dirac"
; exact+
signature(e1 = "ExpOrGammaOrChisq", e2 = "ExpOrGammaOrChisq")
assumes e1
, e2
independent; if
e1
, e2
are Gamma distributions, result is of class
"Gammad"
; uses the convolution formula for Gamma distributions; exact+
signature(e1 = "Pois", e2 = "Pois")
assumes e1
, e2
independent; result again of class
"Pois"
; uses the convolution formula for Poisson distributions; exact+
signature(e1 = "Nbinom", e2 = "Nbinom")
assumes e1
, e2
independent; if
prob(e1)==prob(e2)
, result again of class
"Nbinom"
; uses the convolution formula for negative binomial distributions; exact+
signature(e1 = "Norm", e2 = "Norm")
assumes e1
, e2
independent; result again of class
"Norm"
; uses the convolution formula for normal distributions; exact+
signature(e1 = "UnivariateDistribution", e2 = "Dirac")
translated to e1 + location(e2)
;
result again of class "Dirac"
; exact+
signature(e1 = "Dirac", e2 = "UnivariateDistribution")
translated to e2 + location(e1)
;
result again of class "Dirac"
; exact-
signature(e1 = "Dirac", e2 = "Dirac")
result again of class "Dirac"
; exact*
signature(e1 = "Dirac", e2 = "Dirac")
result again of class "Dirac"
; exact*
signature(e1 = "UnivariateDistribution", e2 = "Dirac")
translated to e1 * location(e2)
;
result again of class "Dirac"
; exact*
signature(e1 = "Dirac", e2 = "UnivariateDistribution")
translated to e2 * location(e1)
;
result again of class "Dirac"
; exact/
signature(e1 = "Dirac", e2 = "Dirac")
result again of class "Dirac"
; exact
UnivariateDistribution-class
AbscontDistribution-class
DiscreteDistribution-class
Norm-class
Binom-class
Pois-class
Dirac-class
Cauchy-class
Gammad-class
Exp-class
Nbinom-class
N <- Norm(0,3) P <- Pois(4) a <- 3 N + a N + P N - a a * N a * P N / a + sin( a * P - N)