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 on April 23, and its replacement, 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 <>
To   "" <>
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:

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