Dealing with identifier variables in data management and analysis

Identifier variables are prominent in most data files and, more often than not, are essential to fully use the information in a Stata dataset. However, rendering them in the proper format and relevant number of digits appropriate for data management and statistical analysis might pose unnerving challenges to inexperienced or even veteran Stata users. To lessen these challenges, I provide some useful tips and guard against some pitfalls by featuring two official Stata routines: the string() function and its elaborated wrapper, the tostring command. I illustrate how to use these two routines to address the difficulties caused by identifier variables in managing and analyzing data from private institutions and U.S. government agencies.

Issue Date:
Publication Type:
Journal Article
DOI and Other Identifiers:
dm0071 (Other)
PURL Identifier:
Published in:
Stata Journal, Volume 13, Number 4
Page range:
Total Pages:

Record appears in:

 Record created 2017-04-01, last modified 2018-01-23

Download fulltext

Rate this document:

Rate this document:
(Not yet reviewed)