| r.compdist | R Documentation |
r is a generic function that generates random deviates of a distribution object.
## S3 method for class 'compdist' r(O, n) ## S3 method for class 'mixdist' r(O, n) r(O, n) ## S3 method for class 'standist' r(O, n) ## S3 method for class 'hyperdist' r(O, n) ## S3 method for class 'wilcoxdist' r(O, n) ## S3 method for class 'trans_univdist' r(O, n)
O |
distribution object. |
n |
number of observations. |
Methods of r function generates random deviates of offered
distribution from the package mistr. The function makes use of the r[sufix] functions
as rnorm or rbeta and thus, if a new distribution is added,
these functions must be reachable through the search path.
For more complicated composite distributions, where one of the components is a mixture distribution, the function performs a rejection sampling of mixture random numbers to improve the speed.
Vector of computed results.
N <- normdist(1, 3) r(N, 5) C <- cauchydist() M <- mixdist(N, C, weights = c(0.5, 0.5)) r(M, 5) CC <- compdist(N, C, weights = c(0.5, 0.5), breakpoints = 1) CCC <- 2*C+5 r(CCC, 5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.