*! version 0.1.0 07may2018

Title

concordance -- harmonize classification codes

Syntax

concordance varlist

Description

concordance provides an algorithm for concording industrial classification codes consistently over time.

It is similar to Pierce and Schott (2012),

but implemented as a Stata command that internally calls Java programs relying

on a graph algorithm developed by Sedgewick and Wayne(2011).

concordance requires exactly three variables: oldcode, newcode and year (of replacement).

Those variables provide all existing replacements between old and new codes together with the year of the replacement.

Format of oldcode/newcode can be numeric or string, but must be convertable to a positive

number that contains up to 18 digits (no blanks or special characters).

Dateformat of year: can be yyyy, yyyymm or yyyymmdd

concordance groups together all old and new codes that are related through different replacements over time, assigns them a common group code

and generates an output file with four variables:

productcode: contains all single old and new codes

groupcode: respective common group codes

year: the year when this productcode first appears in the concordance file

endyear: 0 if productcode is still active, or
date if productcode has been replaced

Data on product-level with changing codes over time

can now be merged with the resulting output file to allocate a

common groupcode to all concatenated product codes. See [D] merge.

Remarks

concordance.jar and concordance.ado must be installed in the user’s ado/plus directory.

concordance.jar is released under the GNU General Public License, version 3

and available for download: https://github.com/belln1/Concordance.

Use dataset testSet.csv to test concordance.ado.

Examples

Setup

. insheet oldcode newcode year using "testSet.csv", clear delimiter(;)

Perform harmonization

. concordance oldcode newcode year

Citation of concordance

concordance is a user-written command provided to the research community.

Please cite the following paper if you refer to the command:

Bellert, N., Fauceglia, D. 2019.

A practical routine to harmonize product classifications over time (Working Paper)

Authors

Bellert, N., Fauceglia, D.

References

Pierce, J. R. and Schott, P. K, 2012. Concording US Harmonized System Codes
over Time.

Journal of Official Statistics 2012, 28(1): 53–68.

Sedgewick, R. and Wayne, K. 2011. Algorithms. Massachusetts: Pearson Education.