I have a double sort portfolio results based on two variables (X and Y). I would like to calculate the T-statistics for High minus Low. Could someone advise about the STATA code for the same.

Example outcome:


Y
X 1 2 3 4 5

1 -.0069496 .0022427 .0040744 .0006564 .0034743
-1.693177 .8017391 1.76241 .363766 2.444734

2 -.0171231 .0027472 .0059278 .0006854 .0053287
-5.057954 1.016869 2.73813 .3713817 5.611485

3 -.0123718 .0058199 .0030675 .0046636 .0056471
-3.770385 2.184333 1.406873 2.537606 6.325758

4 -.0068574 .0064053 .011341 .0113131 .0082394
-2.374479 2.499869 3.92472 6.594771 9.409631

5 .0062524 .023058 .0211118 .0165841 .0120064
2.384699 9.67393 12.38694 12.61789 12.69396