Learn R Programming

randcorr (version 1.0)

Generate a Random p x p Correlation Matrix

Description

Implements the algorithm by Pourahmadi and Wang (2015) for generating a random p x p correlation matrix. Briefly, the idea is to represent the correlation matrix using Cholesky factorization and p(p-1)/2 hyperspherical coordinates (i.e., angles), sample the angles from a particular distribution and then convert to the standard correlation matrix form. The angles are sampled from a distribution with pdf proportional to sin^k(theta) (0 < theta < pi, k >= 1) using the efficient sampling algorithm described in Enes Makalic and Daniel F. Schmidt (2018) .

Copy Link

Version

Install

install.packages('randcorr')

Monthly Downloads

187

Version

1.0

License

GPL (>= 3)

Maintainer

Daniel F. Schmidt

Last Published

November 16th, 2018

Functions in randcorr (1.0)

randcorr-package

The randcorr package
randcorr

Generate a random p x p correlation matrix
randcorr.sample.sink

Sample from the (unnormalized) distribution sin(x)^k, 0 < x < pi, k >= 1