Statalist The Stata Listserver


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

st: RE: putting files together


From   "Maarten Buis" <[email protected]>
To   <[email protected]>
Subject   st: RE: putting files together
Date   Wed, 28 Mar 2007 14:01:36 +0200

--- elin zetterlund wrote:
> I have 3 files containing different individuals, and
> must of the varibles are the same but some differ. I
> have tried the merge comand and the append comand,

You should use the -append- command in this case.
The difference between -append- and -merge- is that
-append- lets you add new cases, while -merge- will
let you add new variables to a given set of cases.
In other words, -append- adds rows, and -merge-
adds columns. 

If some variables have different names or if some
variables aren't present in all datasets, than that
will cause -append- to create missing values, as it
should. If a variable was missing in a dataset than
-append- can't guess the values on that variable, 
and you would not want it too.

Hope this helps,
Maarten

-----------------------------------------
Maarten L. Buis
Department of Social Research Methodology 
Vrije Universiteit Amsterdam 
Boelelaan 1081 
1081 HV Amsterdam 
The Netherlands

visiting address:
Buitenveldertselaan 3 (Metropolitan), room Z434 

+31 20 5986715

http://home.fsw.vu.nl/m.buis/
-----------------------------------------


 

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