Statalist The Stata Listserver


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

Re: st: Merging data into a format to be able to use Event History


From   "Anders Alexandersson" <[email protected]>
To   [email protected]
Subject   Re: st: Merging data into a format to be able to use Event History
Date   Fri, 12 Jan 2007 13:19:57 -0500

Anthony Nyberg <[email protected]> wrote:
I have been unable to figure-out how to combine a number of different
data sets (7) of which 5 have dates for time varying covariates.  I can
append all of the data sets together, but then I have struggled with how
to fill-in, in the correct order, the appropriate values. All values,
including dates, are numerical.

Is there a good method for merging these data into one format (see the
"desired" table below)? [...]
A basic merging solution is to "always use 1-to-1 match merges". That
is, use the -reshape- "two-step" procedure: Reshape your long datasets
to wide format. Then merge the wide datasets. Then reshape again, this
time the merged wide dataset to your desired long format. You may find
this -reshape- FAQ useful:
http://www.stata.com/support/faqs/data/reshape3.html

Anders Alexandersson
[email protected]
*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index