I have a matrix with column 1 containing several identical numerical values. The corresponding row values, however, are all different.
I have illustrated the situation in the picture below.
The red circles highlight one of the groups that have same column-value. I need the average of the 'MSE' for the groups defined by having same values of 'lambda'. In the above example, one of the averages I am looking for would be (0.9769541 + 0.9902620 + 1.0008839 + 1.0108471 + 0.9981030 + 0.9858211) / 6.