rvsample {rv} | R Documentation |
Draws a sample of desired size from each component of a given random variable x
.
rvsample (x, size = 1, jointly = TRUE, reject.na = FALSE)
x |
an object |
size |
size of the sample |
jointly |
return joint simulations and not simulations from each component separately |
reject.na |
reject each draw that contains an NA |
Samples (with replacement) from the distribution of the random variable object.
In effect it samples from the rows of the simulation matrix sims(x)
.
A numeric array of dimensions size
times length(x)
.
Jouni Kerman kerman@stat.columbia.edu http://www.stat.columbia.edu/~kerman
Kerman, Jouni and Gelman, Andrew. Manipulating and Summarizing Posterior Simulations Using Random Variable Objects. Technical report, Columbia University, New York.
#