Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: help expanding the dataset by n observations


From   Scott Cunningham <scunning@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: help expanding the dataset by n observations
Date   Thu, 23 Nov 2006 12:34:29 -0500

I have the following dataset on county-level data.  VBL is a dummy
indicating whether an object is present in the county.  COUNTY is a
number greater than 0 indicating which United States county is being
described, and FIP is indicating which US state.


       +-----------------------------+
       | county   fip   year   vbl |
       |-----------------------------|
    1. |      1     1   1980       0 |
    2. |      1     1   1981       0 |
    3. |      1     1   1982       0 |
    4. |      1     1   1984       0 |
    5. |      1     1   1985       0 |
       |-----------------------------|
    6. |      1     1   1987       1 |
    7. |      1     1   1988       1 |
    8. |      1     1   1991       1 |
    9. |      1     1   1992       1 |
10. |      1     1   1995       1 |
       |-----------------------------|
11. |      1     1   1996       1 |
12. |      1     1   1999       1 |
13. |      1     1   2000       1 |
       +-----------------------------+

As one can see, I am missing years 1983, 1986, 1989, 1990, 1993,
1994, 1997, 1998, and 2001-2004.  For each county/fip, I want to
create 12 new observations which I can then use to fill in the
missing years.  I can do the filling in, but I cannot find
information for simply expanding this dataset by n observations.  I
have searched for the answer, but -expand- takes me to various
places, like -fillin-, neither of which seem appropriate.  Any help
is appreciated.

scott
*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index