rpdatasim: Simulating Data, Shaped into a Matrix

Description Usage Arguments Value Note See Also Examples

View source: R/rpdatasim.R

Description

This is a wrapper function for simulating data that have the correct structure for further processing with rpdataboot.

Usage

1

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.

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

1
2
3
# 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)

bootruin documentation built on May 2, 2019, 10:23 a.m.