Announcement

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

  • Obtaining the Conditional Probabilities

    Hello Everyone,

    I am working on inter generational education mobility for which i have constructed unique son and father pairs. I have already obtained coefficient of father's education explaining the son's education and correlation as well. So in short i have taken son's education as dependent variable on father's education in my regression.

    Now i want to obtained the the conditional probability. What is the probability of son having university education given the education of father is no schooling? Similarly, son having college education given he father education is college? so on and so for.

    Lets say we have 3 levels of schooling, (1) no schooling, (2) college and (3) university. I want to put condition on father's education in order to obtain the probability for son's education.

    In my analysis i have the following variables HHID, Birth Year (for cohort- lets say 5 cohorts), Son (Education of son) and Father (Education of father). Can you please guide me how can i obtain such probabilities in STATA? Thank you so much
    Last edited by Syed Raza; 05 Apr 2018, 03:34.

  • #2
    Code:
    tab sons_education fathers_education, col
    will give you the crude conditional probabilities. If you want to adjust for other variables

    Code:
    mlogit sons_education i.fathers_education other_variables
    margins fathers_education

    Comment


    • #3
      Dear Professor,

      Thank you so much for your reply. However, there is kind of situation here, as you can see in the table below. I used the second command with this way :



      Code:
      mlogit son_edu_group i.father_edu_group if birth_son>1927 & birth_son<1934
      margins father_edu_group
      I have repeated the same code for all ten cohorts. here is the output for this first cohort. I believe margin shows the conditional probability but as you can see some of the values are greater than 1. I wonder how is that possible? In fact we are putting condition of father's education and trying to get the conditional probability for son's education. For example fourth line in output shows, Father having no schooling and son will be university graduate.
      Code:
      -------------------------------------------------------------------------------------------
                                |            Delta-method
                                |     Margin   Std. Err.      z    P>|z|     [95% Conf. Interval]
      --------------------------+----------------------------------------------------------------
      _predict#father_edu_group |
                          1  0  |   .4156899     .03694    11.25   0.000     .3432889    .4880909
                          1  5  |   .0638345   .0159467     4.00   0.000     .0325796    .0950894
                          1 12  |   .0226949   .0224519     1.01   0.312      -.02131    .0666998
                          1 14  |   8.38e-09   .0000409     0.00   1.000    -.0000802    .0000802
                          2  0  |   .4494847   .0372848    12.06   0.000     .3764078    .5225617
                          2  5  |   .6297813   .0314985    19.99   0.000     .5680454    .6915173
                          2 12  |   .1818939   .0581551     3.13   0.002     .0679121    .2958757
                          2 14  |   2.20e-08   .0000663     0.00   1.000    -.0001299      .00013
                          3  0  |   .1348254   .0255993     5.27   0.000     .0846517     .184999
                          3  5  |   .2638308   .0287487     9.18   0.000     .2074845    .3201772
                          3 12  |   .5909112   .0741214     7.97   0.000      .445636    .7361865
                          3 14  |   .8000131   .1788811     4.47   0.000     .4494126    1.150613
                          4  0  |   7.17e-09   6.35e-06     0.00   0.999    -.0000124    .0000124
                          4  5  |   .0425534   .0131671     3.23   0.001     .0167463    .0683604
                          4 12  |      .2045   .0608052     3.36   0.001     .0853241    .3236759
                          4 14  |   .1999869    .178881     1.12   0.264    -.1506135    .5505873
      In output of all ten cohorts i see some of the values in margin greater than 1. Can you guide me on this?

      Comment


      • #4
        No; look for the negative powers.

        8.38e-09 for example is 0.00000000838, as Stata will confirm.

        See the help for
        format.

        Code:
        . di %13.11f 8.38e-09
        0.00000000838


        https://en.wikipedia.org/wiki/Scient...ion#E-notation

        Comment


        • #5
          Thank you so much.

          Comment


          • #6
            Nick Cox

            Sir i have one more question. Is there any way in Stata i can plot all these conditional probabilities. For instance i have ten cohorts and table above you see represents on cohort. I want to keep cohorts on x-axis so there should be 4 graphs. For example one graph for father having no-schooling, one graph for father having primary education so on and so for. So in every graph we will have four curve showing probability of sons attaining different level of educations which are five in this case.

            Maintaining the results in excel and plotting would be hectic if you can recommend some efficient way of doing this in stata?
            Last edited by Syed Raza; 07 Apr 2018, 04:13.

            Comment


            • #7
              I'd check out marginsplot

              Comment


              • #8
                Nick Cox okay sir

                Comment

                Working...
                X