VARORDER: Stata module for automatic semantic temporal ordering of variables in wide-format Stata datasets
Hao Ma ()
Additional contact information
Hao Ma: NA
Statistical Software Components from Boston College Department of Economics
Abstract:
varorder automatically detects and reorganizes eligible temporal variable families in wide-format Stata datasets. The module uses semantic information in variable names, variable labels, variable notes, and attached value-label metadata; recognizes supported ordinary, staged, and hierarchical temporal sequences; and normalizes harmless differences in capitalization, separators, punctuation, and leading zeros internally. Attached value labels provide conservative value-domain or construct evidence but do not by themselves assign a variable-level time position. Ambiguous, conflicting, colliding, related but non-temporal, and unsupported cases are left unchanged. Before changing physical variable order, varorder displays one bounded consolidated preview and asks for a single Enter confirmation. This module changes only physical variable order, preserves data and metadata, applies the proposed permutation transactionally, and provides a single-level undo.
Language: Stata
Requires: Stata version 16
Keywords: data management; variable order (search for similar items in EconPapers)
Date: 2026-08-22, Revised 2026-09-01
Note: This module should be installed from within Stata by typing "ssc install varorder". The module is made available under terms of the MIT license (https://opensource.org/licenses/MIT).
References: Add references at CitEc
Citations:
Downloads: (external link)
http://fmwww.bc.edu/repec/bocode/v/varorder.ado program code (text/plain)
http://fmwww.bc.edu/repec/bocode/v/varorder.sthlp help file (text/plain)
http://fmwww.bc.edu/repec/bocode/v/varorder_test.do program code (text/plain)
http://fmwww.bc.edu/repec/bocode/v/varorder_example.do program code (text/plain)
http://fmwww.bc.edu/repec/bocode/v/varorder_example_data.dta
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:boc:bocode:s459871
Ordering information: This software item can be ordered from
http://repec.org/docs/ssc.php
Access Statistics for this software item
More software in Statistical Software Components from Boston College Department of Economics Boston College, 140 Commonwealth Avenue, Chestnut Hill MA 02467 USA. Contact information at EDIRC.
Bibliographic data for series maintained by Christopher F Baum ().