rvempirical | R Documentation |
rvempirical
generates a random vector of the same length as data from
the empirical distribution of the data.
rvempirical(n, data)
n |
Number of i.i.d. rv components to generate |
data |
Data (constants) |
rvempirical
Jouni Kerman jouni@kerman.com
Kerman, J. and Gelman, A. (2007). Manipulating and Summarizing Posterior Simulations Using Random Variable Objects. Statistics and Computing 17:3, 235-244.
See also vignette("rv")
.
y <- c(1.0, 1.2, 3, 1.1, 0.8, 0.9) ## Some data x <- rvempirical(4, data=y)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.