I want to generate a covariance matrix, with the constraint that all the diagonal elements are equal to 1:
Cov[i,i] = 1 for i = 1...dim
The ways I've seen so far to generate a covariance matrix is either use a Wishart distribution, or generate a random matrix and multiply it by itself:
X = rand(dim,dim) Cov = X.T*X
I can't think of a way to force either of these solutions to have 1s in their diagonal
If I want my covariance matrix to be (d x d), then I only have d*(d-1)/2 parameters to generate. Because the diagonal is 1 and the matrix is symmetric. What I'm 'really' trying to do is to generate a
d*(d-1)/2 vector so that when I fill the covariance matrix with these values, the resulting matrix is positive-definite.