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: Comparing Variable Name Labels Between Datasets

From   Beth Gifford <>
Subject   st: Comparing Variable Name Labels Between Datasets
Date   Thu, 13 May 2010 22:23:29 -0400

We are working with a large dataset that goes back to 1976-through
current.  One challenge in working with these data is that the
variable names change frequently (the same variable may be name V453
one year and V455 the next).  However, the variables are labeled.  So
I'd like to do the following:
a) for each year, pull together a dataset with about 75 variables (DONE)
b) rename the variables to something sensible and also consistent
across years (ex. from 1976-2008 the variable for gender would always
be named gender)  (DONE)
c) compare the variable name labels across years to double check that
the new sensibly named variable is measuring what I think that it is
measuring. (HELP)
d) append the datasets (easy)
*I have looked at cf, cf2 and cf3 but I think that they only let me
compare observations. Encode won't work because it works on the
valuable labels but not the name labels
I am using Stata SE 11.0 on a windows machine.  This problem is
applicable to working with Monitoring the Future data as well as the
Youth Risk Behavior Surveys.


Elizabeth Gifford, PhD
Research Scientist
Center for Child and Family Policy
Duke University
214 Rubenstein Hall
Box 90545
Durham NC, 27708-0545
Work Phone: 919-613-9294
Fax: 919- 684-3731
Check out my new creation:

*   For searches and help try:

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