Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Common variables in different datasets


From   Nikolaos Kanellopoulos <nkkanel@yahoo.gr>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   st: Common variables in different datasets
Date   Tue, 13 Sep 2011 15:33:09 +0100 (BST)

 
 
I have a set of data files (file1.dta, file2.dta,...,file20.dta). There are some common variables which appear in all files and some which appear only in some. I want to create an output/table where the rows will be the variable names and the columns will be the file names and the cells will indicate whether the variable appears in each file.
 
I am hoping to get something like this :
 
Variables |  file1  |  file2  |  file3  |
-----------------------------------------------
var1         |   x     |  x      |  x     |
var2         |          |          |  x     |
var3         |  x      |  x      |         |


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   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   |   Site index