draw.inv.wishart: Pseudo-Random Number Generation under Inverted Wishart...

Description Usage Arguments Value See Also Examples

View source: R/draw.inv.wishart.R

Description

This function implements pseudo-random number generation for an inverted Wishart distribution with pdf

f(x|ν,Σ)=(2^{ν d/2}π^{d(d-1)/4}∏_{i=1}^{d}Γ((ν+1-i)/2))^{-1}|Σ|^{ν/2}|x|^{-(ν+d+1)/2}\exp(-\frac{1}{2}tr(Σ x^{-1}))

x is positive definite, ν ≥q d, and Σ^{-1} is symmetric and positive definite, where ν and Σ^{-1} are the degrees of freedom and the inverse scale matrix, respectively.

Usage

1
draw.inv.wishart(no.row,d,nu,inv.sigma)

Arguments

no.row

Number of rows to generate.

d

Number of variables to generate.

nu

Degrees of freedom.

inv.sigma

Inverse scale matrix.

Value

A no.row \times d^2 matrix ofcontaining Wishart deviates in the form of rows. To obtain the Inverted-Wishart matrix, convert each row to a matrix where rows are filled first.

See Also

draw.wishart

Examples

1
2
mymat<-matrix(c(1,0.2,0.3,0.2,1,0.2,0.3,0.2,1), nrow=3, ncol=3)
draw.inv.wishart(no.row=1e5,d=3,nu=5,inv.sigma=mymat)

MultiRNG documentation built on March 6, 2021, 1:06 a.m.