Statalist The Stata Listserver


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

RE: st: combining data sets with different dimensions


From   Maarten buis <maartenbuis@yahoo.co.uk>
To   statalist@hsphsun2.harvard.edu
Subject   RE: st: combining data sets with different dimensions
Date   Sat, 15 Apr 2006 09:45:50 +0100 (BST)

I agree with Jenifer that it is best to create the dataset step by step checking your dataset in
detail after each step. Appart from looking at the datamatrix (which is a good way to get a feel
of what you are doing) I found -list if _merge==1- and -list if _merge==2- also very useful to
detect problems. 

Although this is a step by step process, the end result should be a do-file that creates the new
merged file from the original files. (In my orignal code I overwrite the original dataset. This is
bad practice.) You can add automatic checks in that do-file with the -assert- command.  With this
do-file you can easily find out what you have done, and change it if you made a mistake. This
practise has saved me lots and lots of time.
HTH,
Maarten

--- "Marino, Jennifer" <jmarino@fhcrc.org> wrote:
> (If you're trying to run the code Maarten supplied as a
> do-file and Stata is sticking at that point, you could run it with the
> nostop option, but it's quite a bit safer to run it interactively and
> make sure you're where you want to be at each step.)


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

visiting adress:
Buitenveldertselaan 3 (Metropolitan), room Z214

+31 20 5986715

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


		
___________________________________________________________ 
24 FIFA World Cup tickets to be won with Yahoo! Mail http://uk.mail.yahoo.com
*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index