I have three id variables in string format with missing observations. How can I count the number of observations by id type? In other words, I want to count the number of non-missing observations by SEDOL, ISIN, and WSID.
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input str40(SEDOL ISIN WSID) "2107727" "ARBRIO010194" "C025A750A" "2107727" "ARBRIO010194" "C025A750A" "2383486" "ARBRIO010186" "C025A750B" "2383486" "ARBRIO010186" "C025A750B" "2107727" "ARBRIO010194" "C025A7500" "2107727" "ARBRIO010194" "C025A7500" "2264194" "ARP3577N1097" "C025BE180" "2613310" "ARP495251018" "C025BT200" "2613310" "ARP495251018" "C025BT200" "2592743" "ARP6823S1030" "C025C103A" "2592754" "ARP6823S1113" "C025C103B" "2592765" "ARP6823S1295" "C025C103C" "2592765" "ARP6823S1295" "C025C1030" "2268679" "ARP3594C1024" "C025D374A" "2268679" "ARP3594C1024" "C025D374A" "2276155" "ARP3594C1107" "C025D374B" "2276155" "ARP3594C1107" "C025D374B" "2276155" "ARP3594C1107" "C025D3740" "2276155" "ARP3594C1107" "C025D3740" "2158565" "ARGASB010027" "C025F1920" "" "ARP6558L1095" "C025K020A" "2573492" "ARP6558L1178" "C025K020B" "" "ARP6558L1251" "C025K020C" "2573492" "ARP6558L1178" "C025K0200" "2378783" "ARBHIP010161" "C025K5790" "2378783" "ARBHIP010161" "C025K5790" "2038980" "ARSAMA010012" "C025L1610" "2010159" "ARAGRO010015" "C025L1660" "2092254" "ARBOLD010054" "C025L1820" "2179061" "ARCADO010023" "C025L1910" "2192626" "ARP2071R1377" "C025L1930" "2194309" "ARP2885N1161" "C025L2020" "" "" "C025L214A" "2485296" "ARP3568E1180" "C025L214B" "" "" "C025L214C" end
Comment