UnivarLebDecDistribution {distr} | R Documentation |
Generating function for Class "UnivarLebDecDistribution"
Description
Generates an object of class "UnivarLebDecDistribution"
.
Usage
UnivarLebDecDistribution(acPart, discretePart, acWeight, discreteWeight,
r = NULL, e = NULL, n = NULL, y = NULL)
Arguments
acPart |
Object of class |
discretePart |
Object of class |
acWeight |
Object of class |
discreteWeight |
Object of class |
r |
optional argument; if given, this is a random number generator as function
|
e |
optional argument; if argument |
n |
optional argument; if argument |
y |
a (numeric) vector or |
Details
At least one of arguments discretePart
, acPart
, or r
must be given; if the first two are missing, slots are filled by a call
to RtoDPQ.LC
. For this purpose argument r
is used together
with arguments e
and n
. If the latter are missing they are
filled with getdistrOption("RtoDPQ.e")
and
getdistrOption("DefaultNrGridPoints")
, respectively.
For the a.c. part, similarly to RtoDPQ
we have an optional
parameter y
for using N. Horbenko's quantile trick: i.e.; on an
equally spaced grid x.grid
on [0,1], apply
f(q(x)(x.grid))
, write the result to y
and use these
values instead of simulated ones.
If argument discretePart
is missing but acPart
is not,
discreteWeight
is set to 0 and discretePart
is set to Dirac(0)
.
If argument acPart
is missing but discretePart
is not,
acWeight
is set to 0 and discretePart
is set to Norm()
.
If both arguments acPart
and discretePart
are given,
at least one of arguments discreteWeight
and acWeight
must
be given and lie in [0,1], else an error is thrown.
If only one argument acWeight
or discreteWeight
is given
the other one is gotten as 1-[ac/discrete]Weight.
Else if both are given, they must sum up to 1.
If a weight is smaller than getdistrOption("TruncQuantile")
, it
is set to 0.
Value
Object of class "UnivarLebDecDistribution"
.
Author(s)
Peter Ruckdeschel peter.ruckdeschel@uni-oldenburg.de
See Also
UnivarLebDecDistribution-class
,
simplifyD
Examples
mylist <- UnivarLebDecDistribution(discretePart=Binom(3,.3), acPart=Norm(2,2),
acWeight=11/20)
mylist