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

st: filling in gaps

From   Christopher Berry <>
Subject   st: filling in gaps
Date   Wed, 19 Oct 2005 11:55:38 -0500

I'd like to know if anyone can suggest a solution to the following problem. I have a data set with multiple observations on federal programs. However, the program ID is only given for the first observation of a program, and then is blank. The file looks like this:

10.001 1973
10.002 5623
10.003 6639 ....
I would like to fill in the gaps in the program IDs. In this case, rows 2 and 3 should be set 10.001, and row 5 should be set to 10.002. I should note that I have about 12000 rows of data. Program IDs are not necessarily sequential. There is not always a gap between program IDs; that is, a program may have only one row of data. Can anyone suggest a solution to this problem? I haven't found anything by searching the archives, although I confess that I'm not sure what the right search terms might be. Thanks.

* For searches and help try:

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