rvvar: Variances of Components of Random Vectors

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/rvsd_rvvar.R

Description

Computes variances of the simulations of components of a random vector of array.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
  rvvar(x)
  ## S3 method for class 'rv'
rvvar(x)
  ## S3 method for class 'rvsummary'
rvvar(x)
  rvsd(x)
  ## S3 method for class 'rv'
rvsd(x)
  ## S3 method for class 'rvsummary'
rvsd(x)

Arguments

x

an object

Details

rvvar computes the means of the simulations of all individual components of a random vector (rv) object.

That is, rvvar applies the function var to the vector of simulations of each component of x, thus computing "columnwise" variances of the matrix of simulations of x.

rvsd applies the function sd to the vector of simulations of each component of x, thus computing "columnwise" standard deviations of the matrix of simulations of x.

Value

A numeric vector or array (of the same dimension as that of x)

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

See Also

rvmin, rvmax, rvmedian, rvsd.

Examples

1
2
3
  x <- rvnorm(mean=0, var=1:10)
  rvvar(x)
  rvsd(x)

rv documentation built on May 29, 2017, 8:53 p.m.

Search within the rv package
Search all R packages, documentation and source code