Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: specific doubt


From   "Rodrigo Briceno" <[email protected]>
To   <[email protected]>
Subject   RE: st: specific doubt
Date   Mon, 13 Jan 2003 11:00:54 -0600

Thanks Buzz. I checked my database and I found errors in the ID variable in
some sets. Then I review the command and I decided to use Merge using the 4
common variables to all the databases. I think that I found the solution,
because the final database is compose of 23,715 observations. Really I tried
two times. In the first I began with database 4 and then went to number 1 (I
got 33,714 obs). Then I tried beginning in database 1 and I get 23,715 obs.
which is the number of obs. of database 4. I hope that this procedure is ok!
Thanks for your comments, you help me a lot!
Rodrigo Briceno

-----Mensaje original-----
De: [email protected]
[mailto:[email protected]]En nombre de Buzz Burhans
Enviado el: Lunes, Enero 13, 2003 10:25 AM
Para: [email protected]
Asunto: Re: st: specific doubt


Hi Rodrigo,

It seems there are several possibilities your data is not aggregating as
expected. Several that have given me problems recently (but not the only
possibilities):

1. Run "codebook" on your ID and matching variables in each dataset, and
closely examine that the IDs are the same in all datasets.  I recently had
a similar problem, and every time I used the browse to examine the data I
couldn't see why I had trouble; running codebook revealed that my ID values
were different, but were labeled the same so they appeared to be the same
values when I looked at them in browse.

2. If you have duplicates within an id in some of the datasets, the joined
dataset will be expanded into a larger set of all possible combinations of
the duplicates...; you will need to decide if this is occuring

3. If the datasets have the same number of unique ids and no duplicates,
merge could work, but observations in the larger sets will have missing
values where there is no value in the smaller set

Buzz Burhans



At 09:48 AM 1/13/03 -0600, you wrote:
>Hello Stata listers. I'm having a problem related with several databases
and
>I wish to ask you for specific information required.
>I have four databases:
>ENIGH-RJB1.dta=19,470 obs.
>ENIGH-RJB2.dta=19,120 obs.
>ENIGH-RJB3.dta=  7,719 obs.
>ENIGH-RJB4.dta=23,715 obs.
>First of all, the bases have the same ID variables (in this case could be
>household number, member number, home number, primary unit of sample,
etc.).
>My purpose is to build an unique database with the differents variables
that
>have each database.
>I tried:
>use ENIGH-RJB4.dta
>joinby using ENIGH-RJB3.dta, but I got a new database with 72,077
>observations, that is totally wrong (I assume that the maximum would be
>23,715).
>I tried too:
>use ENIGH-RJB4.dta
>merge ENIGH-RJB3.dta I got a large number of missings (from obs, 7720 up).
>I know that I 'm doing something wrong but I can't understand what? Can
>somebody please provide me some help?
>Thank you very much.
>Rodrigo
>
>
>
>
>*
>*   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/

*
*   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/



*
*   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