Keywords - Function groups - @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Library: metrics
See also: panstats panlag

Quantlet: pansort
Description: Sorts dataset according to individuals

Reference(s):

Usage: (y)=pansort(z,N)
Input:
z NT x {2+} k data matrix
N Number of cross-section units. Optional for balanced panels
Output:
y Dataset ordered by cross-section units and time periods

Note:

Example:

library("metrics")

z0=read("income")

z=pansort(z0)

z

Result:

[ 1,]        1        1   2.1927    2.485   1.9285 

[ 2,]        1        2   1.1851  0.23503  0.38909 

[ 3,]        1        3   3.3532   2.8651   3.1266 

[ 4,]        2        1     1.76   1.7367   3.6907 

[ 5,]        2        2   1.6222   3.0219   3.4067 

[ 6,]        2        3   3.3541  0.57097   2.7581 

[ 7,]        3        1   1.7996  0.77715  0.02416 

[ 8,]        3        2   1.4206  0.22466   0.3749 


Library: metrics
See also: panstats panlag

Keywords - Function groups - @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Author: Joerg Breitung 990316
(C) MD*TECH Method and Data Technologies, 21.9.2000