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

RE: st: panel data


From   <[email protected]>
To   <[email protected]>
Subject   RE: st: panel data
Date   Fri, 20 Feb 2004 10:03:34 -0500

Hi Devendra,
One way to go about it (maybe not the most efficient) would be the following:

destring gender, generate(genderno)
egen gendernew = min(genderno), by(id)
replace genderno = gendernew if genderno==.
drop gendernew


 -----Original Message-----
From: 	Devendra Amre [mailto:[email protected]] 
Sent:	February 20, 2004 9:25 AM
To:	[email protected]
Subject:	re: st: panel data

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]


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



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