Speaking Stata: Concatenating values over observations
Nicholas Cox
Stata Journal, 2020, vol. 20, issue 1, 236-243
Abstract:
Concatenation, or joining together, of strings or other values, possibly with extra punctuation such as spaces, is supported in Stata by addition of strings and by the egen function concat(), which concatenates values of variables within observations. In this column, I discuss basic techniques for concatenating values of variables over observations, emphasizing simple loops that can be tuned to suit variants as desired. Commonly, such concatenated strings report a profile or history of each individual within panel or longitudinal data. Such histories can then be analyzed further.
Keywords: concatenation; strings; panel data; longitudinal data (search for similar items in EconPapers)
Date: 2020
Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj20-1/pr0071/
References: Add references at CitEc
Citations:
Downloads: (external link)
http://hdl.handle.net/10.1177/1536867X20909698
Related works:
This item may be available elsewhere in EconPapers: Search for items with the same title.
Export reference: BibTeX
RIS (EndNote, ProCite, RefMan)
HTML/Text
Persistent link: https://EconPapers.repec.org/RePEc:tsj:stataj:y:20:y:2020:i:1:p:236-243
Ordering information: This journal article can be ordered from
http://www.stata-journal.com/subscription.html
DOI: 10.1177/1536867X20909698
Access Statistics for this article
Stata Journal is currently edited by Nicholas J. Cox and Stephen P. Jenkins
More articles in Stata Journal from StataCorp LLC
Bibliographic data for series maintained by Christopher F. Baum () and Lisa Gilmore ().