I have a panel database for firms i (90 firms) across year t (from 2013 to 2019). Some firms witnessed a cross border investment in a year that is between 2013 and 2019. I created a dummy=1, when the firm has received the investment in the corresponding year. I want to create three groups small (1), medium (2) and large (3) using the revenue generated by the company and then compute how likely one firm can go from group 1 to group 2 or 3, if received foreign investment. I am not sure which statistical method I should use and how to arrange my data according to this method.

Code:
* Example generated by -dataex-. To install: ssc install dataex
clear
input str12 Country str116 Company byte Invest int FiscalYear float(Currentassets_n Inventories_n Tradeandotherreceivables_n CashandCashEquivalents_n Shorttermfinancialassets_n Noncurrentassets_n Noncurrentliabilities_n Currentliabilities_n)
"Botswana"   "Botswana Telecommunications Corporation Limited"                                                                      0 2014  89.72   10.4   39.1  40.22     0  152.67  22.54   39.1
"Botswana"   "Chobe Holdings Limited"                                                                                               0 2014    6.5    .45    .23   4.93     0   17.25   2.64   3.77
"Botswana"   "First National Bank Of Botswana Limited"                                                                              0 2014      .      .      .      .     .       .      .      .
"Botswana"   "Letlole La Rona Limited"                                                                                              0 2014   5.05      0    .06   4.82     0   66.51    6.6   2.78
"Botswana"   "The Far Property Company (Proprietary) Limited"                                                                       0 2014   8.51      0    .19   1.52     0  118.85   49.3  18.86
"Botswana"   "Wilderness Holdings Limited"                                                                                          0 2014  46.05   2.23    2.4  33.38     0   53.67  14.04  43.31
"Botswana"   "Sefalana Holding Company Limited"                                                                                     0 2014  67.75  32.25  10.97  21.45     0   67.19   9.99  42.68
"Botswana"   "Turnstar Holdings Limited"                                                                                            0 2014  10.26      0   1.03   8.17     0  199.29  58.77   5.02
"Egypt"      "Nile Cotton Ginning Company Sae (????? ????? ???????)"                                                                0 2014   2.54   1.53    .58    .24     0   74.73    .36  10.78
"Egypt"      "The Arab Drug Company S.A.E (??????? ?????? ??????? ???????????)"                                                     0 2014   18.2   9.87   1.45    .62     0    8.33      0  14.68
"Egypt"      "Al Arafa For Investment And Consulting S.A.E (?????? ??????????? ???????????)"                                        0 2014 277.43 115.28  48.97  23.91    14  196.84  51.23 190.81
"Egypt"      "South Cairo & Giza Mills & Bakeries Co. Sae (????? ?????? ???? ??????? ???????)"                                      0 2014  17.25   2.04    .39   6.02     0   10.03    .69  13.83
"Egypt"      "Kahira Pharmaceuticals & Chemical Industries Co. S.A.E (??????? ??????? ????????? ?????????)"                         0 2014  56.17  19.04   7.23   9.56     0    12.7    .54  13.31
"Egypt"      "Wadi Kom Ombo Land Reclamation Co. S.A.E. (???? ??? ???? ???????? ???????)"                                           0 2014  18.11   1.71  10.85   1.09     0    6.96    .03  28.09
"Egypt"      "Nile Company For Pharmaceuticals & Chemical Industries S.A.E. (????? ??????? ????????? ?????????)"                    0 2014  44.69  19.18   4.67  10.17     0   14.96      0   16.8
"Egypt"      "El Nasr For Manufacturing Agricultural Crops S.A.E (????? ?????? ???????? ????????)"                                  0 2014    .42    .13    .02    .01     0   14.16    .58   7.99
"Egypt"      "Canal Shipping Agencies S.A.E (?????? ????????? ????????)"                                                            0 2014  44.84    .27    .17  29.69     0   23.27    .52  19.88
"Egypt"      "Egyptian Modern Education Systems S.A.E (??????? ???? ??????? ???????)"                                               0 2014    .29      0      0    .23     0    2.18    .02    .53
"Egypt"      "General Silos & Storage Co. Sae (?????? ??????? ????????)"                                                            0 2014  157.4   6.42 133.74  14.51     0   26.29   7.22 154.65
"Egypt"      "Alexandria Mineral Oils Company S.A.E. (???? ?????????? ?????? ???????? - ????)"                                      0 2014 280.05  49.71  27.82 164.15     0  176.71  14.84  49.75
"Egypt"      "Alexandria Co. For Pharmaceutical And Chemical Industries S.A.E (?????????? ??????? ????????? ?????????)"             0 2014  39.93  15.34   2.75  16.31     0    8.77    .47   9.44
"Egypt"      "Memphis Pharmaceuticals & Chemical Industries Co. S.A.E. (????? ??????? ????????? ?????????)"                         0 2014  28.58  13.91   4.15   3.99     0    9.35    .09  26.76
"Egypt"      "Eastern Company S.S.A.E (??????? ??????)"                                                                             0 2014 725.19 472.53  16.94  188.8     0  770.58 138.92 682.56
"Egypt"      "Arabia Cotton Ginning Company S.A.E. (??????? ???? ???????)"                                                          0 2014  134.9  52.79  34.19  18.72  1.28  293.65  30.59  91.82
"Egypt"      "Egyptian Chemical Industries (Kima) S.A.E (???????? ????????? ??????? - ????)"                                        1 2014 302.55  21.65   3.87 202.27  60.1   35.43      0   9.25
"Egypt"      "Misr Chemical Industries Company S.A.E. (??? ?????? ??????????)"                                                      1 2014  19.79   5.06   1.32   6.44  4.22   35.41    .71   6.96
"Egypt"      "United Arab Shipping S.A.E (??????? ??????? ????? ????????)"                                                          0 2014  11.59   1.66    .56   8.67   .07     .71   9.71    5.1
"Egypt"      "Egypt Free Shops Co. S.A.E. (???? ??? ??????? ?????)"                                                                 0 2014   26.5   8.75    .28  14.05  1.25    8.73    .25   5.63
"Egypt"      "Alexandria Flour Mills And Bakeries S.A.E (????? ? ????? ??????????)"                                                 0 2014   39.5    5.1   3.91   8.77     0    7.66    .91  37.34
"Egypt"      "Upper Egypt Flour Mills Co. Sae (????? ??? ??????)"                                                                   0 2014  72.97  13.67   7.37   30.6   .02   30.26    4.4  45.69
"Egypt"      "Misr Hotels Co. S.A.E (??? ???????)"                                                                                  0 2014  38.78    .02      0    7.3     0   128.2  74.07  13.74
"Egypt"      "Export Development Bank Of Egypt S.A.E (????? ?????? ?????? ????????)"                                                0 2014      .      .      .      .     .       .      .      .
"Egypt"      "East Delta Mills Co. S.A.E (????? ??? ??????)"                                                                        0 2014  89.88   9.91    .19   8.05   .14   21.43   1.79  83.28
"Egypt"      "Grand Investment Capital S.A.E (????? ?????? ??????????? ???????)"                                                    0 2014   8.41    .03   2.61   3.86     0    2.36      0   3.67
"Egypt"      "Extracted Oil & Derivatives Co. S.A.E (?????? ????????? ?????????)"                                                   0 2014  21.86  13.91    .35   5.08     0   10.31    .65   7.06
"Egypt"      "General Company For Land Reclamation,Development & Reconstruction S.A.E. (?????? ???????? ??????? ???????? ????????)" 0 2014  49.03   1.77  16.05    3.8   .21    7.43    6.8  72.66
"Egypt"      "The General Company For Ceramic And Porcelain Products S.A.E (?????? ??????? ????? ??????? )"                         0 2014  17.65   7.42    .19   7.64     0   26.62    .34   5.07
"Egypt"      "Abu Qir Fertilizers & Chemical Industries Co S.A.E (??? ??? ??????? ????????? ?????????)"                             0 2014 561.73  94.34   8.67  26.48 403.6  148.56  18.78 226.53
"Egypt"      "Misr Oils & Soap Company S.A.E. (??? ?????? ????????)"                                                                0 2014   8.41    6.3    .09   1.36     0    9.03   1.26   8.95
"Egypt"      "North Cairo Mills Company S.A.E. (????? ???? ???????)"                                                                0 2014  25.83   5.38   1.74   3.52  4.21    22.7    .04  19.54
"Egypt"      "Middle Egypt Flour Mills Co. S.A.E. (???? ????? ??? ??????)"                                                          1 2014  80.08   5.98    .31   2.28     0   37.04    6.3     86
"Egypt"      "Egyptian Iron & Steel Co. S.A.E (?????? ? ????? ??????? )"                                                            0 2014 304.22 195.62  11.05  47.63     0  160.57  45.75 649.87
"Egypt"      "Middle & West Delta Flour Mills S.A.E (????? ??? ???? ??????)"                                                        0 2014  80.91   9.32   3.39    4.8     0   37.76   2.96  88.41
"Egypt"      "General Company For Paper Industry (Rakta) S.A.E (?????? ?????? ?????)"                                               0 2014   21.5   6.61   1.66   8.54     0   14.37   9.43  18.75
"Ghana"      "Ayrton Drug Manufacturing Limited"                                                                                    0 2014   7.18   3.85   2.64    .16     0    2.43      0    3.7
"Ghana"      "Guinness Ghana Breweries Limited"                                                                                     0 2014  41.53  26.36   3.68   3.91     0   98.18  58.84  34.03
"Kenya"      "Olympia Capital Holdings Limited"                                                                                     1 2014   4.11   1.32   1.64    .29     0   13.71   1.19   3.52
"Kenya"      "Centum Investment Company Plc"                                                                                        0 2014  22.16      0      0   9.76     0  320.24  68.87     39
"Kenya"      "Longhorn Publishers Limited"                                                                                          0 2014   6.32    1.2   2.45   1.48     0    2.27      0   3.63
"Kenya"      "Safaricom Plc"                                                                                                        0 2014 327.64   34.2  35.12 203.82     0  1229.5  59.03 442.64
"Kenya"      "East African Breweries Limited"                                                                                       0 2014 226.04 110.74  57.37  12.57     0  491.39 300.19 313.38
"Kenya"      "Kapchorua Tea Company Plc"                                                                                            0 2014   7.19   2.26   2.72   1.56     0   15.13   4.94   1.41
"Kenya"      "Unga Group Plc"                                                                                                       0 2014   62.6  27.35  16.73   8.94     0      29  11.27  26.84
"Kenya"      "Williamson Tea Kenya Plc"                                                                                             0 2014  31.46    6.2   7.47   4.33     0   67.33  18.93   3.73
"Mauritius"  "The United Basalt Products Limited"                                                                                   0 2014  46.68  22.19   7.18   1.28     0  102.48  30.77  24.96
"Mauritius"  "Fincorp Investment Limited"                                                                                           0 2014  41.27      0      0      0     0  234.13  97.49  54.99
"Mauritius"  "Mauritius Oil Refineries Limited"                                                                                     0 2014  11.31      0      0      0     0    12.6   4.34   4.89
"Mauritius"  "Abc Motors Company Limited"                                                                                           0 2014  19.98      0      0      0     0   18.19   4.31  18.08
"Mauritius"  "C-Care (Mauritius) Limited"                                                                                           0 2014   4.35     .9   2.23    .79   .33   17.43   1.28   2.46
"Mauritius"  "Les Gaz Industriels Limited"                                                                                          0 2014   1.75    .42    .63    .06     0    8.98    .66   2.33
"Mauritius"  "Tropical Paradise Company Limited"                                                                                    0 2014   3.54      0      0      0     0   67.32  14.42   7.24
"Mauritius"  "Bluelife Limited"                                                                                                     0 2014  28.55      0      0      0     0  159.13  38.57  40.32
"Mauritius"  "Livestock Feed Limited"                                                                                               0 2014   24.2  11.49    8.4   1.35     0   36.91   3.86  17.39
"Mauritius"  "United Docks Limited"                                                                                                 0 2014    .64      0    .14    .03     0   68.26   3.15   3.33
"Mauritius"  "Excelsior United Development Companies Limited"                                                                       0 2014  10.18      0      0      0     0   56.77    3.9   7.64
"Mauritius"  "United Bus Service Limited"                                                                                           0 2014   5.18      0      0      0     0   34.94  20.22   13.1
"Mauritius"  "Ascencia Limited"                                                                                                     0 2014   6.53      0      0      0     0  162.96  32.76  10.84
"Mauritius"  "Caudan Development Limited"                                                                                           0 2014    3.8    .47   2.37    .01     0  126.45  18.93  14.62
"Mauritius"  "Mcb Group Limited"                                                                                                    0 2014      .      .      . 622.45     .       .      .      .
"Mauritius"  "Air Mauritius Limited"                                                                                                0 2014 120.93  21.67  49.51  27.06     0   347.3 141.83 215.05
"Mauritius"  "Innodis Limited"                                                                                                      0 2014   67.6  38.32  17.43   2.14     0   60.24  11.21  53.14
"Mauritius"  "Global Investment Opportunities Fund Limited"                                                                         0 2014      .      .      .      0     .       .      .      .
"Mauritius"  "Plastic Industry (Mauritius) Limited"                                                                                 0 2014   3.19      0      0      0     0    2.37    .56   1.48
"Mauritius"  "Phoenix Investment Company Limited"                                                                                   0 2014  42.94      0      0      0     0   89.17  12.46  19.87
"Mauritius"  "Compagnie Des Villages De Vacances De L'Isle De France Limitee"                                                       0 2014  20.37      0  20.31    .06     0   67.25  41.09     14
"Mauritius"  "Phoenix Beverages Limited"                                                                                            0 2014  42.82  18.78   9.29  13.19     0   89.17  12.46  19.77
"Mauritius"  "Rht Holding Limited"                                                                                                  0 2014   6.06      0      0      0     0   20.46   2.23   2.93
"Mauritius"  "Eagle Insurance Limited"                                                                                              0 2014      .      .      .  23.32     .       .      .      .
"Mauritius"  "Shumba Energy Limited"                                                                                                0 2014   2.01      0      0   1.93     0    2.33      0    .27
"Mauritius"  "Medine Limited"                                                                                                       0 2014  21.95      0      0      0     0  380.18  50.27  63.54
"Mauritius"  "Mauritius Secondary Industries Limited"                                                                               0 2014    .17      0      0      0     0    2.14    .43    .15
"Mauritius"  "Ciel Limited"                                                                                                         0 2014 395.46  93.35  77.55 170.82     0 1063.84 602.59 263.89
"Mauritius"  "Dale Capital Group Limited"                                                                                           0 2014    .58      0      0      0     0    1.16      0   1.14
"Mauritius"  "The Bee Equity Partners Limited"                                                                                      0 2014   4.61      0      0      0     0   44.59    .28    .69
"Mauritius"  "Les Moulins De La Concorde Ltee"                                                                                      0 2014  21.79      0      0      0     0   36.61   4.65  11.42
"Mauritius"  "Lux Island Resorts Limited"                                                                                           0 2014  36.04   2.88  12.77   3.59     0  306.34 140.47  55.04
"Mauritius"  "Associated Commercial Co Limited"                                                                                     0 2014   6.89      0      0      0     0    5.22    .12   2.55
"Mauritius"  "Alteo Limited"                                                                                                        0 2014 150.43      0      0      0     0  741.09 134.39 121.97
"Mauritius"  "Rogers & Company Limited"                                                                                             0 2014 103.33   6.85  47.67  22.32     0   596.2 108.73 115.35
"Mauritius"  "Promotion And Development Limited"                                                                                    0 2014  10.15    .47   2.94    .01     0  321.38  31.48  18.44
"Mauritius"  "Sun Limited"                                                                                                          0 2014  41.09      0      0      0     0  399.71 129.23 108.84
"Morocco"    "Cartier Saada Sa (????? ?????)"                                                                                       0 2014  14.21   8.12   4.72    .02     0    7.82   2.14    9.4
"Mozambique" "Companhia Mocambicana De Hidrocarbonetos, Sa"                                                                         0 2014 149.86   1.23  13.39  133.7     0   225.8 158.66  28.73
"Namibia"    "Trustco Group Holdings Limited"                                                                                       0 2014  84.32  32.45    3.2  12.42     0  149.22  82.41  35.58
"Namibia"    "Fnb Namibia Holdings Limited"                                                                                         0 2014      .      .      .      .     .       .      .      .
"Namibia"    "Nictus Holdings Limited"                                                                                              0 2014  69.16  10.01   23.5  32.98   .63    42.6   4.18  97.48
"Namibia"    "Capricorn Investment Group Limited"                                                                                   0 2014      .      .      .      .     .       .      .      .
"Nigeria"    "Cutix Plc"                                                                                                            0 2014   6.25   2.82     .7    .23     0    4.99   2.25   4.48
"Nigeria"    "Red Star Express Plc"                                                                                                 0 2014  15.18    .38   8.31   3.92     0    7.02    1.5   8.45
"Nigeria"    "Nigerian Enamelware Plc"                                                                                              0 2014  12.77   5.21      0      0     0     7.1   2.07    9.8
end