rv {rv}R Documentation

Random Vectors

Description

Creates or tests for objects of type ``rv".

Usage

rv(length = 0)
as.rv(x)
is.rv(x)
is.random(x)

Arguments

length desired length.
x object to be coerced or tested.

Details

rv creates a random vector vector of the specified length. The elements of the vector are all equal to NA.

is.rv returns TRUE if its argument is a rv object, FALSE otherwise.

as.rv attempts to coerce its argument to the random vector (rv) type.

is.random returns TRUE or FALSE for each component of the argument vector, depending on whether the component is a random variable object.

Value

An rv object of desired length, with the value NA in the simulations.
An rv of length zero is NULL, but still of class 'rv'.

Note

rv objects are internally lists with the class attribute set to ``rv". The number of simulations in rv objects is set by rvnsims. This is by default set to 1000.

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. http://www.stat.columbia.edu/~kerman/Research/postsim.pdf

See Also

For a short version of the paper, type doc("rv").

Examples

  x <- rv(1)

[Package rv version 0.925 Index]