[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
re: st: panel data
There are a few ways to handle this. Here's one that I've used.
You don't say what the data type of Gender is, but it looks like numeric
(with a value label). I will assume byte.
by ID: egen byte max_gender = max(Gender)
by ID: egen byte min_gender = min(Gender)
assert max_gender == min_gender // shows consistency
replace Gender = max_gender // optionally .. if mi(Gender)
drop max_gender min_gender
I hope that helps.
At 09:24 AM 2/20/2004 -0500, Devendra Amre wrote:
I have a longitudinal (panel) data set with variables that are constant over
time (e.g. gender). Some of the entries for an individual are missing
(actually not entered) and I wish to fill in these missing entries.
ID Gender Year
1 M 1991
1 . 1992
1 . 1993
1 M 1994
2 . 1988
2 F 1989
2 . 1990
2 . 1991
Can you suggest a way to fill in these missing entries?
Many thanks in advance.
Devendra Amre MBBS., Ph.D.
Assistant Research Professor/Chercheur Adjoint
Epidemiology/Dept of Pediatrics
Sainte Justine Hospital
3175, Cote Sainte Catherine
Montreal-Canada H3T 1C5
Voice: 514 345 4931 extn 3599
Fax: 514 345 4801
Institute for Policy Studies
Johns Hopkins University
* For searches and help try: