Stata 15 help for mf_soundex

[M-5] soundex() -- Convert string to soundex code

Syntax

string matrix soundex(string matrix s)

string matrix soundex_nara(string matrix s)

Description

soundex(s) returns the soundex code for a string, s. The soundex code consists of a letter followed by three numbers: the letter is the first letter of the name and the numbers encode the remaining consonants. Similar sounding consonants are encoded by the same number.

soundex_nara(s) returns the U.S. Census soundex code for a string, s. The soundex code consists of a letter followed by three numbers: the letter is the first letter of the name and the numbers encode the remaining consonants. Similar sounding consonants are encoded by the same number.

When s is not a scalar, these functions return element-by-element results.

Remarks

soundex("Ashcraft") returns "A226".

soundex_nara("Ashcraft") returns "A261".

Conformability

soundex(s), soundex_nara(s): s: r x c result: r x c

Diagnostics

None.

Source code

Functions are built in.


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index