Recently, the missing() function no longer identifies empty strings for me as it had earlier. Am I the only one? I think I first noticed this a few weeks ago, but unfortunately I didn't write it down. (I updated stata moments ago just in case, but that didn't help.)
E.g., I have a string variable for social security numbers (without any dashes) called ssn. I can see empty strings in a browse window (as periods). Here are a few commands and stata's responses, copied from the output window:
Any help would be appreciated!
Akiva
E.g., I have a string variable for social security numbers (without any dashes) called ssn. I can see empty strings in a browse window (as periods). Here are a few commands and stata's responses, copied from the output window:
. replace ssn = trim(ssn) // just to be safeOf course, this example is easy to work around, because I can destring; that option isn't available for many or most strings.
(0 real changes made)
. count if missing(ssn)
0
. count if ssn=="" // and this isn't working either
0
. destring(ssn), replace
ssn: all characters numeric; replaced as long
(170 missing values generated)
. count if missing(ssn)
170
Any help would be appreciated!
Akiva
Comment