wishartTest: Test if Matrix is a Wishart Matrix

Description Usage Arguments Value Examples

View source: R/wishartTest.R

Description

Given a random Wishart matrix, B, from W_p(Sigma, df) and independent random vector a, then (a' B a) / (a' Sigma a) is chi-squared with df degrees of freedom.

Usage

1
wishartTest(WishMat, Sigma, vec = NULL)

Arguments

WishMat

random Wishart Matrix from W_p(Sigma, df)

Sigma

Covariance matrix for W_p(Sigma, df)

vec

independent random vector

Value

A chi-squared random variable with df degrees of freedom.

Examples

1
wishartTest(rWishart(1, 5, diag(1, 20), simplify = FALSE)[[1]], diag(1, 20))

rWishart documentation built on Nov. 20, 2019, 1:07 a.m.