rvfactor: Categorical Random Variables (Random Factors)
Description
Creates or tests for objects of type ``rvfactor".
Usage
rvfactor(x, ...)
## S3 method for class 'rv':
rvfactor(x, levels=NULL, \dots)
is.rvfactor(x)
## S3 method for class 'rvfactor':
as.rv(x)
as.rvfactor(x, ...)
Arguments
x
object to be coerced or tested.
levels
factor levels (labels for the levels)
...
other arguments
Value
rvfactor: an rvfactor object.
is.rvfactor: TRUE or FALSE.
as.rv.rvfactor: an rv object.
as.rvfactor.rv: an rvfactor object.
Details
Internally random factors are integer-valued just like regular factors in R.
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