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

re: st: panel data


From   David Kantor <[email protected]>
To   [email protected]
Subject   re: st: panel data
Date   Fri, 20 Feb 2004 10:10:47 -0500

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.
-- David

At 09:24 AM 2/20/2004 -0500, Devendra Amre wrote:

Hi,
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
[email protected]
[...]
David Kantor
Institute for Policy Studies
Johns Hopkins University
[email protected]
410-516-5404

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