Speaking stata: Seven steps for vexatious string variables

Nicholas J. Cox, Clyde B. Schechter

Research output: Contribution to journalArticle

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.

Original languageEnglish (US)
Pages (from-to)981-994
Number of pages14
JournalStata Journal
Volume18
Issue number4
StatePublished - Jan 1 2018

Fingerprint

Strings
Numerics
Categorical variable
Date
Convert
Form

Keywords

  • Dates
  • Destring
  • Dm0098
  • Egen
  • Encode
  • Numeric variables
  • String variables

ASJC Scopus subject areas

  • Mathematics (miscellaneous)

Cite this

Speaking stata : Seven steps for vexatious string variables. / Cox, Nicholas J.; Schechter, Clyde B.

In: Stata Journal, Vol. 18, No. 4, 01.01.2018, p. 981-994.

Research output: Contribution to journalArticle

@article{1156d9ebbdee4211b59d812b1e7a9aef,
title = "Speaking stata: Seven steps for vexatious string variables",
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.",
keywords = "Dates, Destring, Dm0098, Egen, Encode, Numeric variables, String variables",
author = "Cox, {Nicholas J.} and Schechter, {Clyde B.}",
year = "2018",
month = "1",
day = "1",
language = "English (US)",
volume = "18",
pages = "981--994",
journal = "Stata Journal",
issn = "1536-867X",
publisher = "DPC Nederland",
number = "4",

}

TY - JOUR

T1 - Speaking stata

T2 - Seven steps for vexatious string variables

AU - Cox, Nicholas J.

AU - Schechter, Clyde B.

PY - 2018/1/1

Y1 - 2018/1/1

N2 - 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.

AB - 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.

KW - Dates

KW - Destring

KW - Dm0098

KW - Egen

KW - Encode

KW - Numeric variables

KW - String variables

UR - http://www.scopus.com/inward/record.url?scp=85059079057&partnerID=8YFLogxK

UR - http://www.scopus.com/inward/citedby.url?scp=85059079057&partnerID=8YFLogxK

M3 - Article

AN - SCOPUS:85059079057

VL - 18

SP - 981

EP - 994

JO - Stata Journal

JF - Stata Journal

SN - 1536-867X

IS - 4

ER -