# UnivarLebDecDistribution

##### Generating function for Class "UnivarLebDecDistribution"

Generates an object of class `"UnivarLebDecDistribution"`

.

- Keywords
- distribution, list

##### Usage

```
UnivarLebDecDistribution(acPart, discretePart, acWeight, discreteWeight,
r = NULL, e = NULL, n = NULL, y = NULL)
```

##### Arguments

- acPart
- Object of class
`"AbscontDistribution"`

(or subclasses); a.c. part of the distribution - discretePart
- Object of class
`"AbscontDistribution"`

(or subclasses); discrete part of the distribution - acWeight
- Object of class
`"numeric"`

; weight of the a.c. part of the distribution - discreteWeight
- Object of class
`"numeric"`

; weight of the discrete part of the distribution - r
- optional argument; if given, this is a random number generator as function
`r <- function(n){....}`

to produce r.v.'s distributed according to the distribution; used in a call to - e
- optional argument; if argument
`r`

is given, this is the number of r.v.'s drawn to fill the empty slots of this object; if missing filled with`getdistrOption("RtoDPQ.e")`

. - n
- optional argument; if argument
`r`

is given, this is the number gridpoints used in filling the empty p,d,q slots of this object; if missing filled with`getdistrOption("DefaultNrGridPoints")`

. - y
- a (numeric) vector or
`NULL`

##### 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"`

.

##### concept

- multivariate distribution
- S4 distribution class
- generating function

##### See Also

##### Examples

```
mylist <- UnivarLebDecDistribution(discretePart=Binom(3,.3), acPart=Norm(2,2),
acWeight=11/20)
mylist
```

*Documentation reproduced from package distr, version 2.3.1, License: LGPL-3*