Hello Statalisters,
I am looking for a particular program (let's call it searchvar) that may help resolve some data management issues. Basically what I would like to do is something like:
searchvar (varname) using "filename",
and Stata would search a variable called varname in both the dataset in memory and the using dataset and report whether they are the same, whether there is any difference in terms of metadata (# of categories, values, format, labels...).
I would also like to do the opposite action, i.e. for two variables that may not share the same name, but the exact same characteristics for example if two variables in two datasets, say abc1 and xyz2, both have the same categories 1 = "Apple", 2 = "Orange", then Stata would list me abc1 and xyz2.
I don't know if I make sense, but if such a program would exist, it would save me from countless hours of work. If it doesn't exist, do you think such a program could be easily coded? What could be potential challenges to such a program?
Best regards,
I am looking for a particular program (let's call it searchvar) that may help resolve some data management issues. Basically what I would like to do is something like:
searchvar (varname) using "filename",
and Stata would search a variable called varname in both the dataset in memory and the using dataset and report whether they are the same, whether there is any difference in terms of metadata (# of categories, values, format, labels...).
I would also like to do the opposite action, i.e. for two variables that may not share the same name, but the exact same characteristics for example if two variables in two datasets, say abc1 and xyz2, both have the same categories 1 = "Apple", 2 = "Orange", then Stata would list me abc1 and xyz2.
I don't know if I make sense, but if such a program would exist, it would save me from countless hours of work. If it doesn't exist, do you think such a program could be easily coded? What could be potential challenges to such a program?
Best regards,
Comment