ffrandom: Generate ff vector with draws from distribution
Description
A convenience function to generate ff vectors with draws from random
distributions using functions such as runif,
rnorm and rlnorm.
Usage
ffrandom(n, rfun = runif, ..., vmode = NULL)
Arguments
n
number of observations
rfun
a function generating the draws from the random distribution.
This function should expect the number of draws as its first argument.
Valid examples are the routines runif, rnorm,
and rlnorm.
...
additional arguments are passed on to rfun.
vmode
the vmode of the resulting vector. See ff. If
none given the vmode is determined from a single draw from rfun.
Value
An ff vector with draws from the distribution.
Details
Before generating the vector a single draw is taken from the
distribution. This might be important if one tries to reproduce draws
directly from rfun.