Learn R Programming

bootruin (version 1.2-4)

rpdatasim: 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 rdist

Value

A numeric matrix with n rows and replications columns.

See Also

See rpdataconv for converting an existing dataset to a matrix, and rpdataboot for creating boostrap replications of such a data matrix.

Examples

Run this code
# 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)

Run the code above in your browser using DataLab