Announcement

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

  • Categorize a group of countries

    I have a 95 countries that I want to categorize them into High Income, Upper Middle Income, Lower Middle Income, and Low Income. The problem is the number 95 is large and I don't know from where to start.

    I want also to delete a group of observations that are in between the Country variable in the data and they are not near to each other.

    Thanks
    Last edited by Mustapha Younis; 08 Jun 2021, 15:50.

  • #2
    One place you can start is the World Bank's classification system (https://datahelpdesk.worldbank.org/k...lending-groups). If your dataset contains GNI per capita data, you can create an indicator variable using the cutoffs indicated at the link. If not, you can download that data from the WB's World Development Indicator databank and merge it with your dataset. The link also contains a list of the countries contained in each category which you can refer to when coding your dataset.

    Comment


    • #3
      Then I use the command bmi_cat?
      Would you help me with the command to link the category with the range of income specified for each class? Thanks

      Comment


      • #4
        Classifying the income categories is very simple if you have the GNI data:

        Code:
        egen category = cut(gni), at(0 1035 4045 12535 999999) icodes
        label define Category 0 "Low-income" 1 "Lower middle-income" 2 "Upper middle-income" 3 "High-income"
        label values category Category

        Comment


        • #5
          Thank you so much.

          I will merge the data then do this.

          I want to do after that graphs comparing between income groups for example the relationship between entrepreneurship and GDP for high income countries and compare it with those in lower income levels.

          Does the previous categorization will help me to that? If not, would you please guide me how to execute this idea in my mind to make graphs (scatter or linear prediction) based on categories of countries?

          Thanks a lot.

          Comment


          • #6
            I would recommend a new thread if you want to delve deeper into this, but the basic technique for comparing categories in graph form is to use the by option. i.e.:

            Code:
            twoway lfit entrepreneurship gdp || scatter entrepreneurship gdp ||, by(category)

            Comment


            • #7
              Thanks a lot.

              Concerning adding the GNI and then categorizing, should I merge only the GNI of 2019 or add all the years that I use in the analysis?

              Based on your answer, which merge option should I use? many to many or others?

              Comment


              • #8
                The classification system is based on GNI in 2019, so drop all of the other years such that you only have one observation per country, then do a 1:m merge using your master dataset with the country variable as the key. In general, many to many merges are inadvisable and will almost never produce the results you're looking for.

                Comment


                • #9
                  Thanks Mr. Ali

                  Comment

                  Working...
                  X