aminzoll at ece.tamu.edu
2007-Oct-09 17:39 UTC
[R] Multivariate chi-square distribution function
Dear All, Is there any function in R for computing "multivariate chi-square distribution"? How about "multivariate gamma distribution"? I appreciate any comment on this subject. Thank you, Amin Zollanvari PhD student Department of Electrical and Computer Engineering, Texas A&M University, College Station, TX
Hello If you want the multivariate t-distribution, use rmvt() of the mvtnorm package. If you want the Wishart distribution, one can write a little nonce function: library(mvtnorm) rwis <- function(n,sigma){ crossprod(rmvnorm(n,sigma=sigma)) } I'm not sure what you mean by the multivariate gamma distribution, but a good candidate might be the Dirichlet. This is implemented in several packages; see ?rdiric of the VGAM package for one example. HTH rksh On 9 Oct 2007, at 18:39, aminzoll at ece.tamu.edu wrote:> Dear All, > > Is there any function in R for computing "multivariate chi-square > distribution"? > How about "multivariate gamma distribution"? > I appreciate any comment on this subject. > > Thank you, > > Amin Zollanvari > PhD student > Department of Electrical and Computer Engineering, > Texas A&M University, > College Station, TX > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting- > guide.html > and provide commented, minimal, self-contained, reproducible code.-- Robin Hankin Uncertainty Analyst National Oceanography Centre, Southampton European Way, Southampton SO14 3ZH, UK tel 023-8059-7743