Statalist The Stata Listserver

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

st: RE: putting files together

From   "Maarten Buis" <>
To   <>
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 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


*   For searches and help try:

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