Closed mcaceresb closed 7 years ago
Min, max, first, last, firstnm, lastnm all preserve Stata's extended missing values. However, gcollapse treats them all as missing.
gcollapse
. sysuse auto, clear (1978 Automobile Data) . replace price = .a (74 real changes made, 74 to missing) . gcollapse (first) price, by(foreign) . l +------------------+ | foreign price | |------------------| 1. | Domestic . | 2. | Foreign . | +------------------+
However, collapse gives
+------------------+ | foreign price | |------------------| 1. | Domestic .a | 2. | Foreign .a | +------------------+
Further, extended values are not correctly parsed by glevelsof. Consider:
glevelsof
clear set obs 5 gen x = _n replace x = . in 2 replace x = .a in 3 replace x = .b in 4 glevelsof x
While "." is excluded, both ".a" and ".b" appear via their internal representation (rather than ".a" and ".b").
Min, max, first, last, firstnm, lastnm all preserve Stata's extended missing values. However,
gcollapse
treats them all as missing.However, collapse gives
Further, extended values are not correctly parsed by
glevelsof
. Consider:While "." is excluded, both ".a" and ".b" appear via their internal representation (rather than ".a" and ".b").