Dear Stata listers,
I'm interested in reshaping the symmetric matrix from Figure 1 (copied from Leydesdorff and Vaughan, 2006) to the asymmetrical matrix like Figure 2. I guess this involves reshaping the data to long form, but didn't find the accurate way.
All suggestions are welcome.
mat input A=(.,10,20,25\10,.,30,15\20,30,.,12\25,15,12,.) //symmetrical matrix-Figure 1
mat colnames A=Paper1 Paper2 Paper3 Paper4
mat rownames A=Paper1 Paper2 Paper3 Paper4
matlist A
svmat A
*L. Leydesdorff, L. Vaughan. Co-occurrence matrices and their applications in information science: Extending ACA to the Web environment. Journal of the American Society for Information Science and Technology, 57 (12) (2006), pp. 1616–1628.
I'm interested in reshaping the symmetric matrix from Figure 1 (copied from Leydesdorff and Vaughan, 2006) to the asymmetrical matrix like Figure 2. I guess this involves reshaping the data to long form, but didn't find the accurate way.
All suggestions are welcome.
mat input A=(.,10,20,25\10,.,30,15\20,30,.,12\25,15,12,.) //symmetrical matrix-Figure 1
mat colnames A=Paper1 Paper2 Paper3 Paper4
mat rownames A=Paper1 Paper2 Paper3 Paper4
matlist A
svmat A
Figure 1: Co-citation matrix (symmetrical matrix) | ||||
P1 | Paper1 | Paper2 | Paper3 | Paper4 |
Paper1 | . | 10 | 20 | 25 |
Paper2 | 10 | . | 30 | 15 |
Paper3 | 20 | 30 | . | 12 |
Paper4 | 25 | 15 | 12 | . |
Figure 2: Citation Matrix (asymmetrical matrix) | ||||
Cited Paper A | Cited Paper B | Cited Paper C | Cited Paper D | |
Citing Paper 1 | 1 | 1 | 0 | 0 |
Citing Paper 2 | 0 | 0 | 1 | 1 |
Citing Paper 3 | 0 | 0 | 1 | 1 |
Citing Paper 4 | 1 | 1 | 0 | 0 |
Citing Paper 5 | 0 | 1 | 0 | 1 |
Comment