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: Closing gaps in STATA panel
From
Morten Hesse <[email protected]>
To
stata list <[email protected]>
Subject
st: Closing gaps in STATA panel
Date
Mon, 20 Sep 2010 11:07:14 +0200
Dear stata-listers,
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.
Any ideas?
Best regards
Morten
*
* 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/