Library: | panel |
See also: | panstats panlag sort |
Quantlet: | pansort | |
Description: | sorts data set according to individuals |
Usage: | y = pansort(z,N) | |
Input: | ||
z | NT x {2+}k matrix of panel data | |
N | scalar, number of cross-section units. Optional for balanced panels. | |
Output: | ||
y | NT x {2+}k matrix, data set ordered by cross-section units and time periods |
library("panel") z0=read("earnings") z=pansort(z0) z
Remark: to save space, only first 10 rows are shown here Contents of z [ 1,] 1 1 2600 20 9 2 [ 2,] 1 2 2500 21 9 2 [ 3,] 1 3 2700 22 9 2 [ 4,] 1 4 3400 23 9 2 [ 5,] 1 5 3354 24 9 2 [ 6,] 2 1 2850 19 13 1 [ 7,] 2 2 4000 20 13 1 [ 8,] 2 3 4000 21 13 1 [ 9,] 2 4 4200 22 13 1 [ 10,] 2 5 5720 23 13 1 ...