Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: Common variables in different datasets
From
Nikolaos Kanellopoulos <[email protected]>
To
"[email protected]" <[email protected]>
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/