rpdatasim {bootruin} | R Documentation |
Simulating Data, Shaped into a Matrix
Description
This is a wrapper function for simulating data that have the correct structure for further
processing with rpdataboot
.
Usage
rpdatasim(n, replications, rdist, ...)
Arguments
n |
The number of observations per sample |
replications |
the number of samples/replications |
rdist |
A function for simulating random variables |
... |
Further arguments for |
Value
A numeric matrix with n
rows and replications
columns.
Note
Typical choices for rdist
are rexp
or rlnorm
.
See Also
See rpdataconv
for converting an existing dataset to a matrix, and
rpdataboot
for creating boostrap replications of such a data matrix.
Examples
# Generate 5 independent samples of size 10 from
# an exponential distribution with mean 10
x <- bootruin:::rpdatasim(n = 10, replications = 5, rexp, rate = 1/10)
[Package bootruin version 1.2-4 Index]