Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


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

Re: st: RE: Closing gaps in STATA panel


From   Morten Hesse <mh@crf.au.dk>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: RE: Closing gaps in STATA panel
Date   Mon, 20 Sep 2010 12:26:00 +0200

Thank you so much!

Den 20-09-2010 11:25, Nick Cox skrev:
help -fillin-.

Nick
n.j.cox@durham.ac.uk

Morten Hesse

I would like to request help for a problem with panels.

What I have is this:

I have a list of observations that indicate "events". These have a date
and a subject ID.

Using "collapse" I have turned them into a panel with ID and time (years).

When the event has not occurred within a year, the observation year does
not exist. That is, there are gaps in the panel.

I would like to add observation years for each ID with the value "0" to
the event, when there is no event - essentially to close the gaps.

As my original dataset with events is the only relevant source of
information about the events, the values should be zeroes.

I have tried to read about tsappend, but I could not figure out how to
use this command for this end.


*
*   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/
*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index