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 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

  y <- rnorm(30) # Some data.
  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.rv(x))   # Bootstrap estimate of the sd.
  rvinci(mean(x), 0) # Hypothesis test: mean of x is zero (at 5

[Package rv version 0.925 Index]