Hi Everyone,

I am working with a datset that has following variables:

1) mrn: unique identifier
2) l1 : treatment line
3) cc_name: category of treatment

I am interested in generating a two way frequency table of cc_name*cc_name having l1==3 as x axis and l1==4 as y axis.

Any help would be great. Thanks.

Code:
* Example generated by -dataex-. To install: ssc install dataex
clear
input long mrn byte l1 float cc_name
 513168 3  1
 513168 4  1
1094887 3  7
1248087 3  7
1978535 3  1
1978535 4  1
1978535 5 14
1978535 6 13
2167534 3 13
2167534 4 13
2167534 5  1
2414191 3  7
2547115 3 13
2547115 4 13
2547115 5 13
2547115 6 16
3190469 3  1
3756996 3 15
3756996 4  1
3756996 5  1
3877198 3  3
3877198 4  1
3877198 5  7
3877198 6  1
3936622 3  3
4160321 3  1
4231270 3  3
4272878 3  1
4272878 4  1
4272878 5  1
4272878 6 13
4272878 7 13
4299731 3  3
4733234 3 13
4733234 4  1
4733234 5  1
4983425 3 15
4983425 4  7
4983425 5  1
4983425 6 13
4983425 7 13
4983425 8 13
5041702 3  1
5041702 4  1
5041702 5  1
5041702 6 18
5157409 3 13
5746698 1 20
5783717 3 16
6321418 3 13
6321418 4 13
6565014 3  8
6565014 4  7
6565014 5  7
6662902 3  7
6662902 4 18
6670822 3  3
6699946 3  1
6699946 4  1
6733562 3  1
6733562 4  1
6733562 5  1
6733562 6  3
6733562 7 13
7383193 3  7
7388762 3 13
7388762 4 13
7388762 5 13
7388762 6 13
7536212 1 20
7857667 3 14
7898976 3  7
7898976 4 16
7970247 3 13
8015810 3  5
8015810 4  7
8088858 3 13
8162430 3 13
8162430 4  1
8495798 3  3
8598344 3  7
8598344 4 13
8845307 3 13
8845307 4  8
8849788 3  5
9179607 3  3
9179607 4 13
9281544 3 12
9281544 4 10
9281544 5 10
9281544 6  9
9342528 1 20
9441395 3 15
9441395 4  4
9555525 3 13
9555525 4 13
9569427 3 15
9653205 3  1
9653205 4 13
9653205 5 13
end