rvboot {rv}R Documentation

Generate a Random Vector from an Empirical Distribution

Description

rvboot generates a random vector of the same length as data from the empirical distribution of the data.

Usage

  rvboot(data)

Arguments

data A vector of constants

Details

rvboot

Author(s)

Jouni Kerman jouni@kerman.com

References

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").

Examples

  y <- rnorm(30) # Some data: 30 draws from standard normal.
  x <- rvboot(y) # A random vector of length 30 (each component has the same distribution)
  print(mean(x)) # Bootstrap estimate of the mean.
  print(sd(x))   # Bootstrap estimate of the sd.

[Package rv version 1.0 Index]