rvsample {rv}R Documentation

Sample from the Simulation Matrix of a Random Variable

Description

Draws a sample of desired size from each component of a given random variable x.

Usage

  rvsample(x, size=1, replace=TRUE, prob=NULL)

Arguments

x an object
size size of the sample
replace sample with replacement?
prob optional probability vector, usually not needed

Details

Value

A numeric array of dimensions size times length(x).

Author(s)

Jouni Kerman kerman@stat.columbia.edu http://www.stat.columbia.edu/~kerman

References

Kerman, Jouni and Gelman, Andrew. Manipulating and Summarizing Posterior Simulations Using Random Variable Objects. Technical report, Columbia University, New York.

Examples

  #

[Package rv version 0.911 Index]