Returns a p-by-p symmetric distribution drawn from an inverse-Wishart distribution
Options:
:p (default 2) -- number of dimensions of resulting matrix
:df (default p) -- degree of freedoms (aka n), df <= p
:scale (default (identity-matrix p)) -- positive definite matrix (aka V)
Examples:
(use 'incanter.stats)
(sample-inv-wishart :df 10 :p 4)
;; calculate the mean of 1000 wishart matrices, should equal (mult df scale)
(div (reduce plus (for [_ (range 1000)] (sample-wishart :p 4))) 1000)
References:
http://en.wikipedia.org/wiki/Inverse-Wishart_distribution
Comments top
No comments for sample-inv-wishart. Log in to add a comment.