powered by
Functions dmxWishart and rmxWishart are for evaluating densities and generating random samples from corresponding Wishart distribution.
dmxWishart
rmxWishart
dmxWishart(X, df, S = diag(nrow(X)))rmxWishart(n, df, S)
rmxWishart(n, df, S)
a (p-by-p) matrix whose density be computed.
(p-by-p)
degrees of freedom
a (p-by-p) scale/covariance matrix.
the number of samples to be generated.
# NOT RUN { ## generate 10 samples with S=diag(3) with df=10 smW = rmxWishart(10, df=10, S=diag(3)) ## evaluate each sample's density t(apply(smW, 3, dmxWishart, df=10, S=diag(3))) # }
Run the code above in your browser using DataLab