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, is already up and running.

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

Re: st: RE: RE: joinby command and memory issues

From   "Weichle, Thomas" <>
To   <>
Subject   Re: st: RE: RE: joinby command and memory issues
Date   Tue, 12 Oct 2010 12:02:48 -0500

Eric, I'm trying to apply the second method that you suggested because I
need to keep all the receipt dates.  After I reshape epo.dta, it creates
a dataset of 1 record per individual.  Here are my reshaped data
results.  36,381 individuals with a maximum of 854 dates.  Someone
received the EPO drug very often!  Now that I have 1 record per
individual, wouldn't it be appropriate to then do a 1:m (many) merge
instead of a joinby where the many represents each of the hemoglobin
test dates for the individual?  I believe the data are set up
appropriately for this 1:many merge.

reshape wide epo_dt, i(study_id) j(i)

Data                               long   ->   wide
Number of obs.                   278492   ->   36381
Number of variables                   4   ->     856
j variable (854 values)               i   ->   (dropped)
xij variables:
                                 epo_dt   ->   epo_dt1 epo_dt2 ...

Tom Weichle
Math Statistician
Center for Management of Complex Chronic Care (CMC3)
Hines VA Hospital, Bldg 1, C202
708-202-8387 ext. 24261 

*   For searches and help try:

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