Generate two variance-covariance matrices S1 and S2.
Both of them should be 500x500 matrices. S1 should be generated from normal distribution with mean 0 and st. dev = s1, and S2 should be generated from normal distribution with mean 0 and st.dev=s2.
The question is, to find the suitable proportion s1/s2 for which the matrix S=S1-S2 is positive semidefinite( so it has non negative eigenvalues) and the approximate point for which there is change from positive semidefinite to negative semidefinite matrix. This can be done by simulating some data in R (for example running a loop 1000 times).
In the end I would like to create histograms to illustrate the probabilities of being the matrix S positive semidefinite or negative semidefinite for different values of s1,s2 based on the previous results.