Generate data with the inverse Wishart distribution
Function generates data in the form of symmetric matrices from the inverse Wishart distribution given a covariance matrix and degrees of freedom.
rinvWishart(n = 1, df, sigma)
n |
number of matrix observations to generate. By default |
df |
degrees of freedom |
sigma |
positive definite covariance matrix |
a numeric matrix with columns equal to ncol(sigma)
when n = 1
, or a list
of n
matrices with the same properties
Phil Chalmers rphilip.chalmers@gmail.com
Chalmers, R. P., & Adkins, M. C. (2020). Writing Effective and Reliable Monte Carlo Simulations
with the SimDesign Package. The Quantitative Methods for Psychology, 16
(4), 248-280.
doi: 10.20982/tqmp.16.4.p248
Sigal, M. J., & Chalmers, R. P. (2016). Play it again: Teaching statistics with Monte
Carlo simulation. Journal of Statistics Education, 24
(3), 136-156.
doi: 10.1080/10691898.2016.1246953
# random inverse Wishart matrix given variances [3,6], covariance 2, and df=15 sigma <- matrix(c(3,2,2,6), 2, 2) x <- rinvWishart(sigma = sigma, df = 15) x # list of matrices x <- rinvWishart(20, sigma = sigma, df = 15) x
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.