Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: repeated time unbalanced panel data


From   "Paulo Loureiro" <[email protected]>
To   [email protected]
Subject   st: repeated time unbalanced panel data
Date   Fri, 08 Oct 2004 19:49:13 +0000

Dear list members


This pseudo- panel database was constructed from successive cross-sections data. Cohorts of individuals over time are defined by date of birth [Angus Deaton (2000) The Analysis of Household Surveys: A Microeconometric Approach to Development Policy].

For example: for year 1981:
Three cuts were made to break down the sample into the following classes:
The Cohorts of individuals over time are defined by date of birth:
id=1 corresponding to individuals in the 22 to 32 age group;
id=2 corresponding to the 33 to 43 age group;
id=3 corresponding to the 44 to 54 age group;
Cohorts were constructed so as to include all individuals of the same sex (either male
or female) in a specific age group. The year is the year of the survey, and members are the members of individuals (id) in each cohort sample in each survey year.

For example: for year 1982:
Three cuts were made to break down the sample into the following classes:
The Cohorts of individuals over time are defined by date of birth:
id=1 corresponding to individuals in the 22 to 32 age group;
id=2 corresponding to the 33 to 43 age group;
id=3 corresponding to the 44 to 54 age group;
Cohorts were constructed so as to include all individuals of the same sex (either male
or female) in a specific age group. The year is the year of the survey, and the members are the members of individuals (id) in each cohort sampled in each survey year.

I constructed Cohorts for each year following 1981 until the year 2001. I then gathered all the Cohorts into one database, one on top of another (in stacked form). So the database is read like this: For the same year (repeated years), I have different individuals. In each line id=1 there is one individual who is different from the individual in the following line (in terms of years of education, son, wage, etc.), but they belong to the same group.

I would like to build the database like this:
I have to follow each individual over a long time. In other words, I would like to put my data in time series: for different years, the same individual. The first individual of the first line of the year 1981 is the same individual in the first line of 1982. He would be the same individual of the first line of the year 2001. The first line (individual) of id=2 of 1981 is the same individual in the first line of id=2 in 1982. The following years would be displayed in the same manner. This is valid for id=3.

I am familiar with the literature on panel-data. I have all the principle books concerning the subject. My lack of knowledge regards the programming of Stata. What I intend to do with Stata is transform repeated data into non-repeated data.

Exemple:
year id age2 age female educ hrs lnwage son06
1981 1 784 28 1 11 132 12.09014 0
1981 1 900 30 1 11 180 11.57524 0
1981 1 841 29 1 11 200 11.08461 0
1981 1 784 28 1 11 160 11.87004 0
1982 1 841 29 1 11 160 11.23696 1
1982 1 961 31 1 11 160 12.2034 0
1982 1 0
1982 1 1024 32 1 11 160 11.93011 1
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
2001 1 729 27 1 16 120 10.36695 0
2001 1 576 24 1 16 160 11.33454 1
2001 1 900 30 1 14 96 10.69966 0
2001 1 2841 29 1 12 144 9.948242 903
1981 2 1369 37 1 11 144 11.87307 0
1981 2 1296 36 1 11 120 11.49008 0
1981 2
1981 2 1849 43 1 11 80 11.8423 1765
1981 2 1600 40 1 11 160 12.07451 0
1982 2 1764 42 1 11 120 11.87882 0
1982 2 1444 38 1 10 176 11.08281 0
1982 2
1982 2
1982 2 1225 35 1 11 160 12.10646 0
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
2001 2 1296 36 1 16 160 12.36416 0
2001 2 1681 41 1 16 80 11.33454 1
2001 2 1681 41 1 16 120 11.33454 0
2001 2 1225 35 1 12 144 10.97786 0
2001 2 1089 33 1 16 96 12.25083 0
1981 3 1936 44 1 11 160 11.01562 0
1981 3 2209 47 1 11 144 11.8578 0
1981 3
1981 3 2500 50 1 11 160 11.93191 0
1981 3 2209 47 1 11 120 12.04012 0
1981 3 1936 44 1 11 144 11.69075 1
1982 3 2500 50 1 11 160 11.64243 1
1982 3 2401 49 1 11 56 10.90049 0
1982 3 0
1982 3 2704 52 1 11 160 11.77596 0
1982 3 2116 46 1 11 144 11.37049 1
1982 3 2209 47 1 11 160 12.21245 1
1982 3 2025 45 1 11 160 11.59364 0
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
2001 3 2401 49 1 16 96 11.74 0
2001 3 2116 46 1 12 224 10.93406 0
2001 3 2401 49 1 13 144 12.02768 0
2001 3 2601 51 1 12 144 10.34298 1

Exemple:
year id son06 age2 age male female educ hrs lnwage
1981 1 0 961 31 0 1 11 72 10.23286
1982 1 1 576 24 1 0 11 160 12.28679
1983 1 0 676 26 0 1 11 192 10.87241
. . . . . . . . . . . .
. . . . . . . . . . . .
. . . . . . . . . . . .
2001 1 0 23 23 0 1 16 160 11.11139
1981 2 1 1225 35 1 0 11 120 11.74386
1982 2 0 1225 35 0 1 11 120 10.62605
1983 2 0 1089 33 0 1 11 160 11.27025
. . . . . . . . . . . .
. . . . . . . . . . . .
. . . . . . . . . . . .
2001 2 0 40 40 0 1 16 160 11.5969
1981 3 0 2704 52 0 1 11 160 10.39147
1982 3 1 2209 47 0 1 11 160 12.21245
1983 3 0 1936 44 0 1 11 160 10.98276
. . . . . . . . . . . .
. . . . . . . . . . . .
. . . . . . . . . . . .

2001 3 1 51 51 0 1 12 144 10.34298

Thanks a lot.

Paulo Loureiro

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE! hthttp://messenger.msn.click-url.com/go/onm00200471ave/direct/01/

*
* 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/




© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index