Home  >>  Archives  >>  Volume 18 Number 4  >>  dm0098

The Stata Journal
Volume 18 Number 4: pp. 981-994



Subscribe to the Stata Journal
cover

Speaking Stata: Seven steps for vexatious string variables

Nicholas J. Cox
Department of Geography
Durham University
Durham, UK
n.j.cox@durham.ac.uk
Clyde B. Schechter
Albert Einstein College of Medicine
Bronx, NY
clyde.schechter@einstein.yu.edu
Abstract.  String variables that seemingly should be numeric require some care. The column provides a step-by-step guide explaining how to convert them or—as the case may merit—to leave them as they are. Dates in string form, identifiers and categorical variables, and pure numeric content trapped in string form need different actions. Practical advice on good and not so good technique is sprinkled throughout.
Buy article (PDF): $14.00 View cart
Buy entire issue (PDF): $28.00

View all articles by these authors: Nicholas J. Cox, Clyde B. Schechter

View all articles with these keywords: string variables, numeric variables, dates, encode, egen, destring

Download citation: BibTeX  RIS

Download citation and abstract: BibTeX  RIS