*** Find distribution of largest and smallest eigenvalues of sample covariance matrix ***; PROC IML; V = {10 5, 5 12}; R = root(V); print R V; E = normal(123)//normal(123); print E; Do rep = 1 to 10; ESTV={0 0, 0 0}; Do i = 1 to 100; ** sample size 100; E = normal(123)//normal(123); W = R*E; ESTV=ESTV + W*W`; end; ESTV=ESTV/100; EVAL = (eigval(ESTV))`; print EVAL; end; ** Challenge: Change reps to 1000, output to dataset then plot largest vs. smallest and make histograms of both;