Statalist


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

RE: st: append


From   "Araujo, Edson" <[email protected]>
To   <[email protected]>
Subject   RE: st: append
Date   Sat, 8 Mar 2008 16:43:39 -0000

 
Thanks a lot, Friedrich!
The two datasets have the same variables (and code as you mentioned) and also I have the weights for both editions. Is there anything else required to use "append"?
Edson
 
 

________________________________

From: [email protected] on behalf of Friedrich Huebler
Sent: Sat 08/03/2008 16:09
To: [email protected]
Subject: Re: st: append



Edson,

You have to compare the coding, not the number of categories. Your
frequency tabulation does not explain which codes are used in the two
datasets.

As an example, assume that sex is coded as 1 = Male and 2 = Female.
Assume further that you have two datasets with the following frequency
distribution.

        Sex |      Freq.
------------+-----------
       Male |         52
     Female |         22
------------+-----------
      Total |         74

        Sex |      Freq.
------------+-----------
     Female |         30
------------+-----------
      Total |         30

As long as "male" and "female" are identified with the same code, you
can combine the datasets with -append-.

In your case, the codes may be the same but no one in the second
dataset uses braille. That said, you should also consider weights and
other issues when you combine two datasets.

Friedrich

On Sat, Mar 8, 2008 at 9:37 AM, Araujo, Edson <[email protected]> wrote:
> Dear STATA lister,
>
>  When using the command "append" to combine datasets what to do if the same variables have different alternatives in the different survey editions (as in the example below - 2006=4 answers and 2002=3 answers)? Is it a problem or can be ignored?
>  Thanks! Edson
>
>
>   use "C:\Documents and Settings\aksd\stata1\dataset2006.dta", clear
>
>  ta literacy
>
>     for those with codes |
>   10-17 in column 4 aged |
>         10years and abov |      Freq.     Percent        Cum.
>  -------------------------+-----------------------------------
>  unable to read and write |      6,177       34.56       34.56
>              able to read only |        896        5.01       39.57
>      able to read and write |     10,797       60.40       99.97
>                        uses braille |          5        0.03      100.00
>  -------------------------+-----------------------------------
>                                   Total |     17,875      100.00
>
>  . use "C:\Documents and Settings\aksd\stata1\2002\dataset2002.dta", clear
>
>  . ta literacy
>       liter |      Freq.     Percent        Cum.
>  ------------+-----------------------------------
>           1 |      7,670       30.64       30.64
>           2 |      1,450        5.79       36.43
>           3 |     15,912       63.57      100.00
>  ------------+-----------------------------------
>       Total |     25,032      100.00
*
*   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/


<<winmail.dat>>




© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index