draw.wishart {MultiRNG} | R Documentation |
Pseudo-Random Number Generation under Wishart Distribution
Description
This function implements pseudo-random number generation for a Wishart distribution with pdf
is positive definite,
, and
is symmetric and positive definite, where
and
are positive definite and the scale matrix, respectively.
Usage
draw.wishart(no.row,d,nu,sigma)
Arguments
no.row |
Number of rows to generate. |
d |
Number of variables to generate. |
nu |
Degrees of freedom. |
sigma |
Scale matrix. |
Value
A matrix of Wishart deviates in the form of rows.To obtain the Wishart matrix, convert each row to a matrix where rows are filled first.
See Also
Examples
mymat<-matrix(c(1,0.2,0.3,0.2,1,0.2,0.3,0.2,1), nrow=3, ncol=3)
draw.wishart(no.row=1e5,d=3,nu=5,sigma=mymat)
[Package MultiRNG version 1.2.4 Index]