64_random_number_generation: Random Numbers

Description Usage Arguments Details Value References See Also Examples

Description

Generate random numbers (or synthetic data), univariate or multivariate.

Usage

1
rng (xf, n=1, ...)

Arguments

xf

A numeric vector, suitable function object, or an object that can be coerced to a numeric vector.
Here, a suitable function object is quantile function, or a chained quantile function.

Refer to the references and see also sections.

n

Integer, number of random numbers.

...

Other arguments.

Refer to the details section.

Details

If xf is a numeric vector, a qfuv.el object is created using xf as the main argument.
Any arguments contained within ..., are passed to the qfuv.el constructor.

If xf is not a quantile function, these functions try to coerce it to a numeric vector, and apply the above.

Note that the method used for multivariate random number generation is not efficient.

Value

A numeric vector, or numeric matrix.

References

Refer to the vignette for an overview, references and better examples.

See Also

Succinct Constructors
Discrete Kernel Smoothing, Continuous Kernel Smoothing
Categorical Distributions, Empirical-Like Distributions

Examples

1
2
3
4
5
6
7
8
9
prep.ph.data ()

cFht <- qfuv.cks (height)
rng (cFht, 30)

chFht <- chqf.cks (trees2)
rng (chFht, 30)

rng (height, 30)

probhat documentation built on May 12, 2021, 5:08 p.m.