Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Problmes with the ID in Panel dataset

From   Cinzia Rienzo <>
Subject   st: Problmes with the ID in Panel dataset
Date   Thu, 2 Dec 2010 11:05:39 +0000 (GMT)

Dear  all,

I am struggling to solve a problem with the id in the panel dataset I 
am using and I would appreciate any advices:

First of all the panel data has a problem of duplicated id for the 
worker identifiers; I can solve this (and  I did) just using the 
duplicates commands.
However after merging the data for different years I realised that the 
same id  in different  years sometimes  identifies  different workers, 
here is an example:

ID    year   sex   yearbirth     wage 
12   1986    1           1965              2
12   1987    2           1958              3.2
12   1988    1           1965              2.3
12   1989    2           1958              4.1
13   1986    2           1960               2
13   1987    2           1960               2.2
13   1988    1           1954               3.4

Now I have been searching through the FAQ but I could not find a 
solution appropriate to my query; 
I have tried the tag id sex, but it did not help and also I have tried 
something similar to:

The second problem is that when using the merge or joinby commands 
(with STATA 10) to merge different years combining by  “id sex 
yearbirth”  the dataset is not merged properly since the above problem 
Maybe I should drop the duplicates after the merging, if I would be 
able to make that work properly!

Many thanks,



*   For searches and help try:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index