powered by
Density and random generation for the wishart distribution
dwishart(x, nu, Sigma, log = FALSE)rwishart(n, nu, Sigma)
rwishart(n, nu, Sigma)
dwishart gives the density, rwishart generates random deviates (matrix for n = 1, array for n > 1)
dwishart
rwishart
n = 1
n > 1
positive definite p x p matrix of evaluation points
degrees of freedom, needs to be greater than p - 1
p - 1
scale matrix, needs to be positive definite and match the dimension of x.
x
logical; if TRUE, densities \(p\) are returned as \(\log(p)\).
TRUE
number of random deviates to return
x <- rwishart(1, nu = 5, Sigma = diag(3)) d <- dwishart(x, nu = 5, Sigma = diag(3))
Run the code above in your browser using DataLab