# rv v2.3.4

0

0th

Percentile

## Simulation-Based Random Variable Objects

Implements a simulation-based random variable class and a suite of methods for extracting parts of random vectors, calculating extremes of random vectors, and generating random vectors under a variety of distributions following Kerman and Gelman (2007) <doi:10.1007/s11222-007-9020-4>.

# rv    The rv package provides tools for working with simulation-based random variables.

## Installation

### Stable version from CRAN

install.packages("rv")


### or development version from GitHub

install.packages('devtools')  # package devtools needed
devtools::install_github("jsta/rv")


See website

## Functions in rv

 Name Description as.list.rv Coerce a random vector object to a list aperm.rv Random Array Transposition Extract-rv Extract or Replace Parts of a Random Vector apply.rv Apply Functions over Margins of Random Arrays Math.rv Mathematical functions and Operators for rv Objects as.double.rv Coercing Random Vectors to Real-valued as.logical.rv Logical Random vectors %*in*% Test if in set as.integer.rv Integer Random vectors outer.rv Outer Product of Random Arrays numeric_rv Numeric Random Vectors as.rv.bugs Coerce a bugs object into Random Variable Objects as.rv.stanfit Convert simulations generated by Stan to a list of rv objects abline.rv Add (Random) Straight Lines to a Plot Extremes-rv Maxima and Minima of Random Variables cor.rv Calculate the covariance of an rv object rep.rv Replicate Elements of Random Vectors range.rv Distribution of the Range of a Random Vector as.vector.rv Coerce an rv object hist.rv Histogram of a random vector matmult Random Matrix Multiplication rvattr Attributes of Random Variables cc Combine values in an rv object is.constant Constant Vectors median.rv Distribution of the Sample Median mean.rv Distribution of the Arithmetic Mean of a Random Vector mlplot Horizontal interval plot of components of a random vector points.rv Add Points and Intervals to a Plot rvboot Generate a Random Vector from an Empirical Distribution rvbinom Generate Random Variables from a Binomial Sampling Model plot.rv Plotting Scatterplots of Random Variable Objects detachrv Detach the rv package rv-package Simulation-based Random Variable Objects ivplot Interval plot rvmax Get the max values of an rv object lines.rv Add Connected (Random) Line Segments to a Plot rv Random Vectors rvcat Generate Categorical Random Variables print.rvfactor Categorical Random Variables (Random Factors) rvmapply Apply a function to multiple random vector arguments rvbeta Generate Random Vectors from a Beta Sampling Model rvexp Generate Random Vectors from an Exponential Sampling Model rvcov Covariance Between Components of Random Vectors postsim Generate Posterior Simulations for lm or glm Objects (defunct) rvcut Convert Numeric to Random Factor rvbern Generate a Random Vector from a Bernoulli Sampling Model rvrange Get the value range of an rv object cbind.rv Combine random vectors by columns or rows rvmean Expectation of a Random Variable unlistrv Flatten Lists Containing rv Objects posterior Generate Posterior Simulations rvdiscrete Generate Random Vectors from a Discrete Sampling Model rvmatch Generate a Random Vector from a Bernoulli Sampling Model rvneff Number of Effective Draws in Each Component of a Random Variable rvt Generate Random Variables from a Student-t Sampling Model rvempirical Generate a Random Vector from an Empirical Distribution rvcauchy Generate Random Variables from a Cauchy Sampling Model rvsample Draw a Sample from the Simulation Matrix of a Random Variable rvchisq Generate Random Variables from a Chi-Square Sampling Model rvnorm Generate Random Variables from a Gaussian (Normal) Sampling Model rvnchains Number of Markov Chains Used to Generate Simulations of a Random Vector rvmultinom Generate Random Variables from a Multinomial Sampling Model rvifelse Conditional Random Element Selection rvdens Sample from an arbitrary density function using grid approximation rvinvchisq Generate Random Variables from a Inverse-Chi-Square Sampling Model rvpermut Random Vectors with a Permutation Distribution rvpois Generate Random Vectors from a Poisson Sampling Model summaries Random Vector Summaries print.rv Print Distribution Summary of a Random Variable is.fuzzy Fuzziness sort.rv Distribution of Order Statistics of a Random Vector rvsims Create Random Vectors from Simulation Draws summary.rv Numerical Summary of a Random Variable rvsimapply Apply a Function to Columns of the Matrix of Simulation of a Random Vector is.na.rv Missing Data Indicators rvunif Generate Random Vectors from a Uniform Sampling Model rvmeanunif The distribution of the mean of uniform random variables rvmin Get the min values of an rv object rvnsims Number of simulations stored in each component of an rv object rvmatrix Matrices and Arrays of Random Vectors rvci Credible (Uncertainty) Intervals for Random Scalars rvdirichlet Generate Random Variables from a Dirichlet Sampling Model splitbyname Split a vector based on the names of the components quantile.rv Distribution of a Quantile of a Random Vector rvRhat R-hat Convergence Diagnostic rvconst Random Vector with a Point-Mass Distribution rvhist Histogram of Distributions of Components of a Random Vector sims Retrieve the Simulations of Random Vectors rvgamma Generate Random Variables from a Gamma Sampling Model rvpar Set or Query Parameters of the 'rv' Package rvpredict Generate predictions from models simapply Apply a Function to Rows of Simulations of Random Vectors rvvar Variances of Components of Random Vectors solve.rv Random Vectors rvquantile Componentwise Quantiles of Random Variables No Results!