Discussion:  Research Area 
Topic:  need help in generating feasible correlation matrices 
Post a new topic to the Research Area Discussion discussion 

Subject:  RE: feasible correlation matrices 
Author:  rabeldin 
Date:  Jan 7 2005 
1) Start with a diagonal matrix S(0), that is positive semidefinite (or
definite if you desire). This will have your eigenvalues on the diagonal and
zeroes elsewhere.
2) Choose 2 coordinates at random. Call them i and j.
3) Generate a random angle A, between 0 and 2pi radians.
4) Construct the orthogonal matrix Q from an identity by replacing Q[i,j] with
sin(A), Q[j,i] with sin(A), Q[i,i] with cos(A), and Q[j,j] with
cos(A).
5) Construct S(k+1) from Q'S(k)Q.
6) Repeat steps 2 thru 5 as desired.
7) Reduce the resulting covariance matrix to a correlation matrix in the
ordinary way.
 
Post a new topic to the Research Area Discussion discussion  
Visit related
discussions: Probability & Statistics  