Dear expers,

my data:
Code:
* Example generated by -dataex-. To install: ssc install dataex
clear
input double facilityid str76 lender double bankallocation str26 lenderrole
  1 "General Electric Capital Corp"               100 "Lead bank"  
  2 "General Electric Capital Corp"               100 "Lead bank"  
  3 "General Electric Capital Corp"               100 "Lead bank"  
  4 "General Electric Capital Corp"               100 "Lead bank"  
  5 "Fleet Real Estate"                           100 "Lead bank"  
  6 "Toronto Dominion Bank"                       100 "Lead bank"  
  7 "Toronto Dominion Bank"                       100 "Lead bank"  
  8 "Toronto Dominion Bank"                       100 "Lead bank"  
  9 "Bank of Boston"                              100 "Lead bank"  
 10 "Manufacturers Hanover Trust"                 100 "Lead bank"  
 12 "Westpac Banking Corp"                        100 "Lead bank"  
 13 "Capital Bank NA"                             100 "Lead bank"  
 14 "First American Bank & Trust"                 100 "Lead bank"  
 15 "Security Pacific National Bank"              100 "Lead bank"  
 16 "Banque Worms SA"                             100 "Lead bank"  
 17 "National Westminster Bank USA"               100 "Lead bank"  
 18 "National Westminster Bank USA"               100 "Lead bank"  
 21 "Pacificorp Credit"                           100 "Lead bank"  
 22 "Pacificorp Credit"                           100 "Lead bank"  
 26 "First National Bank Minneapolis"             100 "Lead bank"  
 28 "Heller Financial Inc"                        100 "Lead bank"  
 29 "Heller Financial Inc"                        100 "Lead bank"  
 30 "Bank of Boston"                              100 "Lead bank"  
 39 "Prudential Insurance Co of America"          100 "Lead bank"  
 40 "LF Rothschild & Co Inc"                      100 "Lead bank"  
 41 "Citibank"                                    100 "Agent"      
 42 "Citibank"                                    100 "Agent"      
 43 "Citibank"                                    100 "Agent"      
 44 "Dominion Bank"                                17 "Participant"
 44 "PNC Bank - Cincinnati"                        17 "Participant"
 44 "Commerce Union Bank"                          26 "Participant"
 44 "Third National Bank of Nashville"             40 "Agent"      
 45 "Chemical Bank"                               100 "Agent"      
 46 "Chemical Bank"                               100 "Agent"      
 47 "Chemical Bank"                               100 "Agent"      
 48 "Union Bank of Norway"                        100 "Lead bank"  
 49 "Security Pacific National Bank"              100 "Lead bank"  
 50 "Security Pacific National Bank"              100 "Lead bank"  
 51 "Security Pacific National Bank"              100 "Lead bank"  
 54 "Bank of Boston"                              100 "Lead bank"  
 55 "Dresdner Bank AG"                            4.6 "Participant"
 55 "National Westminster Bank USA"              32.4 "Agent"      
 55 "Banca di Roma SpA"                          1.85 "Participant"
 55 "Arab Banking Corp BSC [ABC]"                 5.5 "Participant"
 55 "Bank of Nova Scotia"                        18.5 "Participant"
 55 "National Bank of Canada"                    18.5 "Participant"
 55 "Creditanstalt Bankverein"                   18.5 "Participant"
 56 "1st Source Bank"                            53.3 "Agent"      
 56 "Harris Trust & Savings Bank"                46.7 "Co-agent"   
 58 "Yasuda Trust & Banking Co Ltd"              3.33 "Participant"
 58 "US National Bank of Oregon"                 6.67 "Participant"
 58 "Societe Generale SA"                          10 "Participant"
 58 "Security Pacific National Bank"               20 "Agent"      
 58 "Le Credit Lyonnais SA [LCL]"                6.67 "Participant"
 58 "Long-Term Credit Bank of Japan Ltd"           10 "Participant"
 58 "Continental Bank"                          13.33 "Participant"
 58 "Chemical Bank"                             13.33 "Participant"
 58 "First Interstate Bank of Nevada"            6.67 "Participant"
 58 "Midlantic National Bank"                      10 "Participant"
 59 "Continental Bank"                          13.33 "Participant"
 59 "US National Bank of Oregon"                 6.67 "Participant"
 59 "Chemical Bank"                             13.33 "Participant"
 59 "First Interstate Bank of Nevada"            6.67 "Participant"
 59 "Long-Term Credit Bank of Japan Ltd"           10 "Participant"
 59 "Yasuda Trust & Banking Co Ltd"              3.33 "Participant"
 59 "Societe Generale SA"                          10 "Participant"
 59 "Security Pacific National Bank"               20 "Agent"      
 59 "Le Credit Lyonnais SA [LCL]"                6.67 "Participant"
 59 "Midlantic National Bank"                      10 "Participant"
 60 "Yasuda Trust & Banking Co Ltd"              3.33 "Participant"
 60 "First Interstate Bank of Nevada"            6.67 "Participant"
 60 "Long-Term Credit Bank of Japan Ltd"           10 "Participant"
 60 "Midlantic National Bank"                      10 "Participant"
 60 "Continental Bank"                          13.33 "Participant"
 60 "Security Pacific National Bank"               20 "Agent"      
 60 "US National Bank of Oregon"                 6.67 "Participant"
 60 "Chemical Bank"                             13.33 "Participant"
 60 "Le Credit Lyonnais SA [LCL]"                6.67 "Participant"
 60 "Societe Generale SA"                          10 "Participant"
 62 "Generale Bank SA"                              7 "Participant"
 62 "First Chicago"                                 9 "Participant"
 62 "National Westminster Bank Plc"                 7 "Participant"
 62 "Citizens & Southern National Bank"             7 "Participant"
 62 "National City Bank"                            7 "Participant"
 62 "Harris Trust & Savings Bank"                   9 "Participant"
 62 "Credit Suisse AG"                             12 "Agent"      
 62 "National Bank of Canada"                       7 "Participant"
 62 "Security Pacific National Bank"                7 "Participant"
 62 "NationsBank of North Carolina"                 7 "Participant"
 62 "Westpac Banking Corp"                          7 "Participant"
 62 "Commerzbank AG"                                7 "Participant"
 62 "Bank of Nova Scotia"                           7 "Participant"
 64 "Continental Bank"                           22.2 "Participant"
 64 "Home Federal Savings"                       11.1 "Participant"
 64 "National Westminster Bank USA"              13.9 "Participant"
 64 "National Bank of Canada"                    11.1 "Participant"
 64 "Bank of Boston"                             30.5 "Agent"      
 64 "Bankers Trust Co"                           11.1 "Participant"
 67 "Boatmen's National Bank of Kansas City"      100 "Lead bank"  
 68 "Vermont National Bank"                       100 "Lead bank"  
 69 "MBank Venture Capital"                      16.7 "Participant"
 69 "Interfirst Venture Corp"                    16.7 "Participant"
 69 "Bank of Boston"                             66.7 "Agent"      
 70 "Citicorp Industrial Credit"                  100 "Lead bank"  
 71 "Citicorp Industrial Credit"                  100 "Lead bank"  
 74 "Chemical Bank"                               100 "Lead bank"  
 75 "Security Pacific National Bank"              100 "Lead bank"  
 76 "Chemical Bank"                              83.3 "Agent"      
 76 "City National Bank Beverly Hills"           16.7 "Participant"
 77 "City National Bank Beverly Hills"           16.7 "Participant"
 77 "Chemical Bank"                              83.3 "Agent"      
 79 "Algemene Bank Nederland"                     100 "Lead bank"  
 80 "Bank of California"                          100 "Lead bank"  
 81 "WestAmerica Bancorporation"                  100 "Lead bank"  
 82 "Mellon Bank"                                 100 "Lead bank"  
 84 "Swiss Bank Corp"                             100 "Agent"      
 85 "Midlantic National Bank"                     100 "Lead bank"  
 86 "First Interstate Bank of California"         100 "Lead bank"  
 87 "Marine Midland Bank"                         100 "Lead bank"  
 88 "Citibank"                                    100 "Lead bank"  
 89 "Citibank"                                    100 "Agent"      
 90 "Citibank"                                    100 "Lead bank"  
 91 "Citibank"                                    100 "Lead bank"  
 96 "Toronto Dominion Bank"                       100 "Agent"      
 97 "Toronto Dominion Bank"                       100 "Agent"      
 98 "Citicorp Industrial Credit"                   17 "Participant"
 98 "Citibank"                                     33 "Participant"
 98 "Bankers Trust Co"                             50 "Agent"      
 99 "Citicorp Industrial Credit"                   17 "Participant"
 99 "Citibank"                                     33 "Participant"
 99 "Bankers Trust Co"                             50 "Agent"      
100 "Citibank"                                     33 "Participant"
100 "Bankers Trust Co"                             50 "Agent"      
100 "Citicorp Industrial Credit"                   17 "Participant"
102 "Royal Bank of Canada"                        100 "Lead bank"  
103 "Royal Bank of Canada"                        100 "Lead bank"  
104 "Royal Bank of Canada"                        100 "Lead bank"  
105 "Marine Bank"                                  35 "Agent"      
106 "Marine Bank"                                  35 "Agent"      
107 "Chase Manhattan Bank"                        100 "Agent"      
108 "Sovran Bank"                                 100 "Lead bank"  
109 "National Westminster Bank USA"             17.65 "Co-agent"   
109 "Midland Bank Plc"                            5.8 "Participant"
109 "Bankers Trust Co"                           36.5 "Co-agent"   
109 "First National Bank of Maryland"             3.5 "Participant"
109 "Fleet National Bank"                         5.8 "Participant"
109 "Creditanstalt Bankverein"                    8.2 "Participant"
109 "Kleinwort Benson"                          4.725 "Participant"
109 "Heller Financial Inc"                      17.65 "Participant"
110 "Heller Financial Inc"                      17.65 "Participant"
110 "Midland Bank Plc"                            5.8 "Participant"
110 "Creditanstalt Bankverein"                    8.2 "Participant"
110 "National Westminster Bank USA"             17.65 "Co-agent"   
110 "Fleet National Bank"                         5.8 "Participant"
110 "Kleinwort Benson"                          4.725 "Participant"
110 "Bankers Trust Co"                           36.5 "Co-agent"   
110 "First National Bank of Maryland"             3.5 "Participant"
111 "Security Pacific National Bank"              100 "Agent"      
112 "Swiss Bank Corp"                           11.65 "Participant"
112 "Bank of Nova Scotia"                        6.84 "Participant"
112 "Security Pacific National Bank"             6.84 "Participant"
112 "CIBC [Canadian Imperial Bank of Commerce]"  6.84 "Participant"
112 "Manufacturers Hanover Trust"               19.17 "Agent"      
112 "Nippon Credit Bank Ltd"                     6.84 "Participant"
112 "Credit Agricole SA"                        11.65 "Participant"
112 "First National Bank Minneapolis"           11.65 "Participant"
112 "National Westminster Bank USA"             11.65 "Participant"
112 "Long-Term Credit Bank of Japan Ltd"         6.84 "Participant"
113 "CIBC [Canadian Imperial Bank of Commerce]"  6.84 "Participant"
113 "Credit Agricole SA"                        11.65 "Participant"
113 "Swiss Bank Corp"                           11.65 "Participant"
113 "Security Pacific National Bank"             6.84 "Participant"
113 "Long-Term Credit Bank of Japan Ltd"         6.84 "Participant"
113 "Nippon Credit Bank Ltd"                     6.84 "Participant"
113 "Bank of Nova Scotia"                        6.84 "Participant"
113 "National Westminster Bank USA"             11.65 "Participant"
113 "First National Bank Minneapolis"           11.65 "Participant"
113 "Manufacturers Hanover Trust"               19.17 "Agent"      
114 "Long-Term Credit Bank of Japan Ltd"         6.84 "Participant"
114 "Manufacturers Hanover Trust"               19.17 "Agent"      
114 "CIBC [Canadian Imperial Bank of Commerce]"  6.84 "Participant"
114 "Bank of Nova Scotia"                        6.84 "Participant"
114 "National Westminster Bank USA"             11.65 "Participant"
114 "Credit Agricole SA"                        11.65 "Participant"
114 "Swiss Bank Corp"                           11.65 "Participant"
114 "First National Bank Minneapolis"           11.65 "Participant"
114 "Security Pacific National Bank"             6.84 "Participant"
114 "Nippon Credit Bank Ltd"                     6.84 "Participant"
115 "National Westminster Bank USA"             34.19 "Lead bank"  
115 "United States Trust"                        5.13 "Participant"
115 "Irving Trust"                               8.55 "Participant"
115 "First Interstate Bank of California"       25.64 "Participant"
115 "Connecticut Bank & Trust"                  13.68 "Participant"
115 "Horizon Bank"                              12.82 "Participant"
116 "Horizon Bank"                              12.82 "Participant"
116 "Irving Trust"                               8.55 "Participant"
116 "First Interstate Bank of California"       25.64 "Participant"
116 "United States Trust"                        5.13 "Participant"
116 "Connecticut Bank & Trust"                  13.68 "Participant"
116 "National Westminster Bank USA"             34.19 "Lead bank"  
end

My goal is to have one observation per facilityid and in cases where there are more than one observation per facilityid, I want that stata only takes the one observation where the bank is the leader in the facility (drop all participant). The problem is, that sometimes there is different naming of the leader in the facility (Lead bank or Lead Agent) and sometimes there is even a Lead Co-Agent where two banks share the role. In these cases I want to have the one with the higher allocation (variable bankallocation). Is this possible?