Hi,
This is a sample of my data:
My data is divided into 5 portfolios depending on the leverage change (change5) and into terciles depending on the interest rate (interest3). I have computed the average excess return for each change5 for each interest3 as following:
What I want is to perform a t-test between the lowest and highest group. Because I get a matrix, there are 8 t-tests (see picture). For example, for interest3 == 1, calculate the t-test between change5 == 1 and change5 == 5. Or for change5 == 1, calculate the t-test between interest3 == 1 and interest3 == 3.
Here is the matrix to make it a little bit more clear:

Thanks
This is a sample of my data:
Code:
* Example generated by -dataex-. For more info, type help dataex clear input float(time change5 interest3 excess_ri_port) 578 1 3 -.6925126 579 1 3 3.500199 580 1 3 2.992766 581 1 3 -7.831552 582 1 3 -5.636639 583 1 3 1.427559 584 1 3 -14.535248 585 1 3 -26.12037 586 1 3 -6.152879 587 1 3 7.726166 657 2 1 -.8846533 658 2 1 3.60806 660 2 1 1.938433 661 2 1 6.38167 662 2 1 -2.021422 663 2 1 5.012726 664 2 1 .4726349 665 2 1 -1.480696 666 2 1 3.192597 667 2 1 -5.435805 668 2 1 -2.5471926 669 2 1 7.368956 670 2 1 .8326083 671 2 1 -1.6570904 672 2 1 -5.966536 673 2 1 .4660656 674 2 1 8.600153 675 2 1 1.5384797 676 2 1 .4725932 677 2 1 -6.599574 678 2 1 6.505339 679 2 1 .5697324 680 2 1 2.1315773 681 2 1 -4.011961 682 2 1 -1.068154 683 2 1 4.434777 684 2 1 4.2806845 685 2 1 2.0386615 686 2 1 4.1449623 687 2 1 6.499111 688 2 1 5.262307 689 2 1 -1.0671136 690 2 1 4.645394 691 2 1 1.3541282 692 2 1 4.2406955 693 2 1 1.0949044 694 2 1 .43575725 695 2 1 1.9311043 696 2 1 7.963739 697 2 1 -4.701449 698 2 1 -1.0655196 end format %tm time
Code:
bysort change5 interest3 (time): tabstat excess_ri_port, stats(count mean p50 sd min max)
Here is the matrix to make it a little bit more clear:
Thanks
Comment