[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: Re: statalist-digest V4 #1922
This is a second try to post to the list, please excuse any duplication.
I need some help merging files, each of which has from 1 to n
observations per person. I've been unable to find a definitive answer
from the Stata documention, FAQ or list archives. The number of
observations for a given person may (or may not) differ between the two
In my master file, I have demographics and diagnosis information. In the
using data, I have symptom intensity scores, collected longitudinally.
Not everyone in the master data must be present in the using file--not everyone has symptom scores--although everyone in the using data must be in the master file, so observations that are present in the using but not in the master will be dropped after the merge.
For example, my datasets look like this:
When I try to merge these files using the one-to-many procedure, the
number of symptom intensity scores increases dramatically, compared to
the using data, which is the correct number of scores. I suspect that
some sort of last-observation-carried-forward is happening if the number
of observations in the using file is larger than in the master, but I
don't know for sure. I also suspect that I may need to be using joinby,
but any suggestions would be greatly appreciated.
Thanks in advance,
* For searches and help try: