Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

st: RE: rephrase of the question on backfilling missing data


From   Nick Cox <[email protected]>
To   "'[email protected]'" <[email protected]>
Subject   st: RE: rephrase of the question on backfilling missing data
Date   Tue, 24 Aug 2010 20:17:21 +0100

This is in -long-er form, but not in truly -long- form. The panel idea, or perhaps ideal, is that each distinct date for every panel member defines a distinct observation. 

Nick 
[email protected] 

David Torres

So that I'm not admonished yet again on posing my question with regard  
to data in wide format, let me put it forward with an example of data  
in long format.  My apologies to you stata experts who desire,  
perhaps, after reading my muddle-headed questions, to give me a good  
thrashing.

Again, the data are in long format:

pubid  year interviewed?	intdate	  stfin1_	           stfin2_
1      1997	1	13650	13546 13650	. .
1      1998       1	14200	13546 14200	. .
1      1999       0	.	. .	. .
1      2000       1	14840	13546 14840	. .
1      2001	1	15199	13546 15199	. .
2      1997	1	13611	13500 13611	13605 13611
2      1998	0	.	. .	. .
2      1999	0	.	. .	. .
2      2000	1	14869	14244 14500	14510 14869
2      2001	1	15300	14510 15222	. .
3      1997	1	13676	13482 13676	13599 13676
3      1998	1	14100	13599 14100	. .
3      1999	0	.	. .	. .
3      2000	0	.	. .	. .
3      2001	1	15300	14667 15300	. .


I just need to copy dates from any round subsequent to a round missed  
that refers to that year as long as its begin or end date follows the  
date since last interview.  In the example above, respondent 1 (pubid  
= 1) has data missing for year 1999.  It is clear from the data from  
subsequent years that the job he first reported in 1997 is the same  
job at which he works.  Since he worked right through the year that  
has missing data, I would copy the concatenated start and finish dates  
from the first subsequent round and paste it to 1999 (this  
concatenated variable will later be split, and the end date will be  
changed to an imputed interview date for the year).  Respondent 2  
(pubid = 2) missed two consecutive survey rounds, but reports during  
the 2000 survey that he begun or ended a job since the date of the  
1997 interview.  Actually the job start and finish dates listed in  
stfin1_, year 2000, include the latter end of 1998 (14244) and part of  
year 1999 (thru 14500).  stfin2_ of includes years 1999 and 2000.   
Therefore it, too, can be backfilled to 1999.

What is the best way to proceed with backfilling this information so  
that I can tie wages and compensation, as well as hours and weeks  
worked, to the year to which it ought to apply?


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index