Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Calculate values based on changes

    Dear statalists,
    I have a dataset containing a group of parent firms and their foreign subsidiaries. Both the total number of subsidiaries in each foreign country and the total number of foreign locations may vary across years. I am planning to calculate a ratio operationalized as (total number of subsidiaries of newly added countries at time T+1)/(total number of new countries added at time T+1).

    For example, in the year of 2005, a parent firm has a total of 6 subsidiaries located in UK, Canada, Japan, and India; in the year of 2006, this parent firm has a total of 9 subsidiaries (6 of them located in the former four countries + 2 subsidiaries located in a newly added country -- Brazil + 1 subsidiary located in another newly added country – Mexico). So the ratio in the year of 2006=(2+1) subsidiaries/2 countries.

    I am having a hard time in figuring out how to identify the newly added countries each year compared to the previous year and calculate the newly added subsidiaries from these newly added countries. I looked up the cases in the forum but failed to get a good answer. Please kindly give me some directions. All suggestions are appreciated. Thank you.

    Below if the data example. I included four variables:
    1. parent_id: parent firm id
    2. subsidiary_name: subsidiairy's name (basically I use this name to count the number of subsidiaries)
    3. country_code: subsidiary's location
    4. year: year



    Code:
    * Example generated by -dataex-. For more info, type help dataex
    clear
    input long parent_id str300 subsidiary_name str8 country_code float year
    1004 "Telair International GmbH"                                                  "DE" 2013
    1004 "Teleflex Aviation Products AS"                                              "NO" 2012
    1004 "Telair International GmbH"                                                  "DE" 2014
    1004 "Airinmar Holdings Limited"                                                  "GB" 2012
    1004 "Airinmar Holdings Limited"                                                  "GB" 2014
    1004 "Airinmar Limited"                                                           "GB" 2018
    1004 "Nordisk Aviation Products AS"                                               "NO" 2013
    1004 "Airinmar Holdings Limited"                                                  "GB" 2016
    1004 "Nordisk Aviation Products AS"                                               "NO" 2014
    1004 "Airinmar Holdings Limited"                                                  "GB" 2013
    1004 "Airinmar Holdings Limited"                                                  "GB" 2015
    1004 "Telair International GmbH"                                                  "DE" 2012
    1004 "Airinmar Holdings Limited"                                                  "GB" 2017
    1004 "AAR Canada Holdings ULC"                                                    "CA" 2018
    1021 "International AB"                                                           "SE" 2000
    1021 "QR srl"                                                                     "IT" 2007
    1021 "QR Imaging srl"                                                             "IT" 2008
    1021 "International AB"                                                           "SE" 1998
    1021 "International AB"                                                           "SE" 1999
    1021 "International AB"                                                           "SE" 2002
    1021 "International AB"                                                           "SE" 2001
    1021 "QR Imaging srl"                                                             "IT" 2007
    1021 "QR srl"                                                                     "IT" 2008
    1045 "AMR Foreign Sales Corporation, Ltd"                                         "BM" 2005
    1045 "Aero Perlas"                                                                "PA" 2005
    1045 "Peru Dispatch Company"                                                      "PE" 1998
    1045 "SABRE Computer-Reservierungssytem GmbH"                                     "AT" 1997
    1045 "Dispatch Services 93, S.A."                                                 "VE" 2000
    1045 "Caribbean Dispatch Services, Ltd"                                           "LC" 2002
    1045 "AMR Services (UK) Ltd"                                                      "GB" 1997
    1045 "Aerosan, S.A."                                                              "CL" 2016
    1045 "SABRE Suomi Oy"                                                             "FI" 1998
    1045 "ATC Loisiers S. A."                                                         "FR" 1997
    1045 "Dispatch Services 93, S.A."                                                 "VE" 1998
    1045 "SABRE Espana Marketing, S. A."                                              "ES" 1997
    1045 "Avion Assurance Ltd"                                                        "BM" 2007
    1045 "SABRE Technology Holland, B.V."                                             "NL" 1998
    1045 "American Airlines de Venezuela, S.A."                                       "VE" 2005
    1045 "Airways Assurance Limited"                                                  "BM" 2017
    1045 "SABRE France Sarl"                                                          "FR" 1997
    1045 "International Ground Services, S.A. de C.V."                                "MX" 2018
    1045 "Wingate Travel Hong Kong Ltd"                                               "HK" 1997
    1045 "Dispatch Services 93, S.A."                                                 "VE" 2006
    1045 "Aerosan Airport Services, S.A."                                             "CL" 2014
    1045 "Caribbean Dispatch Services, Ltd"                                           "LC" 2015
    1045 "International Ground Services, S.A. de C.V."                                "MX" 2011
    1045 "AEROSAN S.A."                                                               "CL" 2007
    1045 "International Ground Services, S.A. de C.V."                                "MX" 2006
    1045 "Sabre Belgium"                                                              "BE" 1999
    1045 "Aerodespachos Colombia, S.A."                                               "CO" 2004
    1045 "Caribbean Dispatch Services, Ltd"                                           "LC" 2011
    1045 "SABRE Portugal Servicos Lda"                                                "PT" 1998
    1045 "Dispatch Services 93, S.A."                                                 "VE" 1999
    1045 "Aerosan Airport Services, S.A."                                             "CL" 2016
    1045 "Caribbean Dispatch Services Limited"                                        "LC" 2018
    1045 "Avion Assurance Ltd"                                                        "BM" 2001
    1045 "AMR Two Flags Aviation Services Limited"                                    "DE" 1997
    1045 "Societe de Fret et de Services"                                             "FR" 1998
    1045 "AEROSAN Airport Services S.A."                                              "CL" 2003
    1045 "SABRE Sverige AB"                                                           "SE" 1997
    1045 "Avion Assurance, Ltd"                                                       "BM" 2018
    1045 "American Holidays (50/50 AA/AMR)"                                           "GB" 2000
    1045 "American Airlines, Division de Servicios Aeroportuarios (R.D.), S.A. (DSA)" "DO" 2007
    1045 "Aerodespachos Colombia, S.A. AERCOL S.A."                                   "CO" 2007
    1045 "AEROSAN S.A."                                                               "CL" 2002
    1045 "AMR Foreign Sales Corporation, Ltd"                                         "BM" 2000
    1045 "Aerosan, S.A."                                                              "CL" 2017
    1045 "Aerodespachos Colombia, S.A."                                               "CO" 2006
    1045 "American Airlines de Mexico, S.A."                                          "MX" 2003
    1045 "Sabre Espana Marketing, S.A."                                               "ES" 1999
    1045 "Texas Aero Engine Services, L.L.C"                                          "CA" 2006
    1045 "Ticketnet Corporation"                                                      "CA" 1998
    1045 "American Airlines Overseas Finance, N.V."                                   "AN" 2003
    1045 "Dispatch Services 93, S.A."                                                 "VE" 2004
    1045 "SABRE Technology Enterprises II, Ltd"                                       "KY" 1998
    1045 "American Holidays (50/50 AA/AMR)"                                           "GB" 1998
    1045 "Dispatch Services 93, S.A."                                                 "VE" 2007
    1045 "Sabre Decision Technologies (Australia) Pty Ltd"                            "AU" 1999
    1045 "SABRE Ireland Ltd"                                                          "IE" 1998
    1045 "AEROSAN Airport Services S.A."                                              "CL" 2006
    1045 "DSA"                                                                        "DO" 1997
    1045 "American Airlines Marketing Services LLC"                                   "VE" 2006
    1045 "Avion Assurance Ltd"                                                        "BM" 2012
    1045 "International Ground Services, S.A. de C.V."                                "MX" 2014
    1045 "ONEworld Management Company Ltd."                                           "CA" 2002
    1045 "International Ground Services, S.A. de C.V."                                "MX" 2015
    1045 "Avion Assurance, Ltd"                                                       "BM" 2017
    1045 "Dispatch Services 93, S.A."                                                 "VE" 2007
    1045 "Ticketnet Corporation"                                                      "CA" 1997
    1045 "Aero Perlas"                                                                "PA" 2006
    1045 "oneworld Management Company Ltd"                                            "CA" 2003
    1045 "Peru Dispatch S.A."                                                         "PE" 2007
    1045 "Caribbean Dispatch Services Ltd"                                            "LC" 1997
    1045 "Sabre Suomi Oy"                                                             "FI" 1999
    1045 "SABRE Services Administration"                                              "MX" 1997
    1045 "SABRE UK Marketing Ltd."                                                    "GB" 1998
    1045 "Panama Dispatch"                                                            "PA" 1997
    1045 "American Airlines de Mexico, S.A."                                          "MX" 1998
    1045 "SABRE Servicios Colombia LTDA"                                              "CO" 1998
    1045 "Caribbean Dispatch Services, Ltd"                                           "LC" 2012
    end
Working...
X