Announcement

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

  • Creating A Country Transtion Matrix to Transform Historical Countries to Modern Ones

    Hi all!

    I am working on the individual level data on first-generation immigrants in the US, who have declared their birthplaces as "historical" countries in the 1940, 1950, and 1960 samples. My task is to transform these birthplaces/"historical" countries to "modern" ones. In this regard, I need to create a transition matrix for each sample to effectively accomplish this task. These old samples comprise between 75 and 120 birthplace/"historical" country records. Here are the steps that I am planning to follow:

    1. I initially need to create a transition matrix of zeros that specify responses given by these immigrants to the birthplace question as rows and all modern countries as columns. Each cell in this matrix needs to yield the probability of a birthplace/"historical" country being exactly the same as a "modern" country. As such, all cells need to contain values in [0,1], and rows need to sump up to 1.

    2. If it's the case that a "historical" country and a "modern" one are the same (e.g., France), the entry in a given cell needs to switch from 0 to 1. On the other hand, if a "historical" country (e.g., USSR) is in several "modern" countries (e.g., Ukraine, Russia, etc.), then probabilities need to be proportional to population of each "modern" country.

    I have tried several scenarios using the
    Code:
    reshape
    and
    Code:
    xttrans
    commands, but to no avail. I am also aware that MATA could probably be more suitable for this task, but then again, I'm not so familiar with it. I seem to be facing two main issues:

    (i) It's my understanding that each "historical" sample should consist of 1 variable ("country_old"). However, "modern" sample should contain 2 variables ("country_modern" and "population" for probabilty weights). If I try to merge them, they won't merge, since there is no country id for them. I don't think generating the country id would be plausible considering that it won't help in the process or merging, since they will be unique on their own.
    (ii) If I were to reshape them, population as a second variable would float around, which is problematic.

    I'm very confused and lost at the moment, and I apologize if I'm being sloppy in my problem identification. Please, let me know if I should clarify further.

    All help/comments/suggestions are highly appreciated!

    Wolfgang.

  • #2
    I am not quite sure what your question is, and what data you have and how it is organized. Maybe this data from the Correlates of War project can help: https://correlatesofwar.org/data-set...itorial-change ?
    ---------------------------------
    Maarten L. Buis
    University of Konstanz
    Department of history and sociology
    box 40
    78457 Konstanz
    Germany
    http://www.maartenbuis.nl
    ---------------------------------

    Comment


    • #3
      Hi Maarten,

      Thank you for your response! I'm sorry if my inquiry isn't clear enough. Let me re-phrase what I'm exactly looking for. The data I'm using is IPUMS USA, where each first generation immigrant (foreign-born person) reports their country of birth in each sample (in my case, those samples are 1940, 1950, and 1960). My aim is to create a transition matrix described in my post transforming those birthplaces to modern countries, where each cell represents a probability weight. For instance, if a person claims their birthplace as "Italy," the probability that this birthplace is a modern country (say, in 2010) is 1 with absolute certainty. If, however, another person declares their birthplace as "USSR," then each post-Soviet country has to take a probability weight based on its respective population in 2010.

      Now, my question is, how I should create this transition matrix given the steps in my post. I have tried a couple of ways to establish that, but I've fallen down the rabbit hole, and that's why I feel lost.

      Also, I took a look at the link you have attached, but it's not quite what I'm looking for. I still appreciate your time and effort in responding to my post. I hope my further clarification helps.

      Thanks,
      Wolfgang.

      Comment


      • #4
        How to do something depends on the raw material you have. So we need to know what you have on which you want to base your transition matrix.
        ---------------------------------
        Maarten L. Buis
        University of Konstanz
        Department of history and sociology
        box 40
        78457 Konstanz
        Germany
        http://www.maartenbuis.nl
        ---------------------------------

        Comment


        • #5
          Maarten,

          I'm attaching the relevant data files. The file named "ipums_1940_cleaned.dta" contains birthplace (bpld_name and bpld_code) and immigrants (immi_1940) variables, "country_1.dta" contains 1940 country names, which I have extracted from the previous file, and "country_2.dta" entails population at the country level in 1990. What I want to do is to transition birthplaces in 1940 to countries in 1990 creating a transition matrix of probability weights based on population.

          Thanks,
          Wolfgang.
          Attached Files

          Comment


          • #6
            In those three datasets you don't have the information on what country in dataset 1 "belongs" to what country in dataset 2. So the short answer is that you could not do it because it is logically impossible. The dataset I linked to in #2 allows for such linkages.
            ---------------------------------
            Maarten L. Buis
            University of Konstanz
            Department of history and sociology
            box 40
            78457 Konstanz
            Germany
            http://www.maartenbuis.nl
            ---------------------------------

            Comment


            • #7
              Maarten,

              That's exactly my point in trying to create a transition matrix. The dataset that you have linked pertains to territorial changes as a result of wars occuring between/amongst countries in 1816-2018, which is once again very far from what I'm attempting to establish. I know that those country names in datasets 1 and 2 linked to #5 aren't the same, since dataset 1 merely reports the 1940-level birthplaces/historical countries of immigrants in the US (extracted from dataset 3), whereas dataset 2 contains the list of 1990-level modern countries. The transition matrix (initially starting as zeros) in question needs to contain 1940-level birthplaces as rows and 1990-level modern countries as columns. Each cell needs to yield a probability weight corresponding to a given historical country being the same as or being part of a modern country. The former case is easy, since the cell needs to switch from 0 to 1. However, the latter case is a little complicated because a probability weight there needs to be proportional to a modern country's population.

              My primary struggle here is to not be sure which command(s) need to be used.

              I'm sorry if I caused confusion in my prior responses.

              Wolfgang.

              Comment


              • #8
                I know what you try to do, but creating that matrix requires information that is simply not in the data. Remember, that for Stata your country variable just contains a sequence of characters; it does not know that it is country names, it does not know what a country is, it certainly does not know which countries come from which other country. Such information needs to be in your data, and that is not the case. Stata cannot create information out of nothing. So it is impossible without further data. Not surprisingly, there is no Stata command for impossible tasks. So your next step is to look for additional data that contains the information you need.
                ---------------------------------
                Maarten L. Buis
                University of Konstanz
                Department of history and sociology
                box 40
                78457 Konstanz
                Germany
                http://www.maartenbuis.nl
                ---------------------------------

                Comment


                • #9
                  Maarten,

                  Thank you for your response. I'll try looking for that further considering your suggestion.

                  Wolfgang.

                  Comment

                  Working...
                  X