rvcov
rvcov(x, y = NULL, ...)
a random vector
(optional) a random vector
further arguments passed to or from other methods
A covariance matrix.
rvcov
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")
.
x <- rvnorm(mean=1:3)
y <- rvnorm(mean=2:4)
rvcov(x,y)
#> [,1] [,2] [,3]
#> [1,] -0.21577388 -0.059718586 0.049101680
#> [2,] 0.03142875 0.002771382 -0.076454776
#> [3,] -0.08218373 0.077943907 0.009687816
rvcov(x,x)
#> [,1] [,2] [,3]
#> [1,] 1.04015965 0.02690043 0.02149899
#> [2,] 0.02690043 0.84384211 -0.15999162
#> [3,] 0.02149899 -0.15999162 1.04720032