TeamA GA TeamB GB
N 1 G 3
Z 2 V 2
Xa 1 K 1
Xe 2 N 0
G 2 Z 0
V 0 Xa 2
K 1 Xe 2
N 2 V 2
G 2 Xa 0
Z 1 K 3
V 1 Xe 3
K 1 G 1
Xa 2 N 1
Xe 1 Z 2
G 2 V 0
K 2 N 0
Z 5 Xa 3
Hence , in the last observation : " Z 5 Xa 3 " , Z scored 5 goals and
Xa scored 3 , thus Z gets 3 points and Xa gets 0 points .In the case where
the
two teams score the same number of goals,they gain 1 point each .The
following
classification ( let's call it dataset B) , contains the name of the Team,
the number of Games it played,
the number of Wins it won, the number of Ties it tied, the number of
Losses
it lost , the number of goals it has scored (in its Favour) , the number
of
goals it submitted (Against
itself), and the number of Points it gained.
Team Games W T L F A Points
G 5 4 1 0 10 2 13
Xe 4 3 0 1 8 4 9
K 5 2 2 1 8 5 8
Z 5 2 1 2 10 11 7
Xa 5 2 1 2 8 9 7
V 5 0 2 3 5 11 2
N 5 0 1 4 4 11 1
What I am wondering whether it is possible to produce some routine such
that from dataset such as B one could determine (not chronologically of
course ), a dataset such as A .
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/