Announcement

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

  • How can I determine if these predicted probabilities are significantly different from each other in the table below with Stata?

    Hi, I have a small dataset for the purpose of demonstration below, which is about a table of the disciplinary action probabilities that students from different ethnic groups may face after different levels of disciplinary infractions. What I need now is to run Stata code to test if these predicted probabilities are significantly different from each other.
    I am not sure how to write the code, as this table is the result of running an ordinal longitudinal model and obtaining the results using the "margins" command.
    race--1(black);2-hispanic;3-White;4-Other
    outcome-1 (receiving minor disciplinary);2-(receiving medium disciplinary action);3- (receiving severe disciplinary action)
    infraction1-(the predicted probability of receiving minor disciplinary action); infractioninfraction2- (the predicted probability of receiving medium disciplinary action); infraction3- (the predicted probability of receiving severe disciplinary action)

    clear
    input byte race outcome infraction1 infraction2 infraction3
    1 1 0.674 0.698 0.228
    2 1 0.690 0.465 0.125
    3 1 0.712 0.577 0.290
    4 1 0.718 0.547 0.147
    1 2 0.284 0.388 0.528
    2 2 0.255 0.390 0.367
    3 2 0.240 0.329 0.435
    4 2 0.235 0.353 0.390
    1 3 0.069 0.146 0.353
    2 3 0.056 0.148 0.510
    3 3 0.050 0.094 0.276
    4 3 0.048 0.111 0.417
    end

    Can someone help me with this problem? Thank you!

  • #2
    clear
    input byte race outcome byte infraction_level double infraction
    1 1 1 0.674
    1 1 2 0.698
    1 1 3 0.228
    1 2 1 0.284
    1 2 2 0.388
    1 2 3 0.528
    1 3 1 0.069
    1 3 2 0.146
    1 3 3 0.353
    2 1 1 0.690
    2 1 2 0.465
    2 1 3 0.125
    2 2 1 0.255
    2 2 2 0.390
    2 2 3 0.367
    2 3 1 0.056
    2 3 2 0.148
    2 3 3 0.510
    3 1 1 0.712
    3 1 2 0.577
    3 1 3 0.290
    3 2 1 0.240
    3 2 2 0.329
    3 2 3 0.435
    3 3 1 0.050
    3 3 2 0.094
    3 3 3 0.276
    4 1 1 0.718
    4 1 2 0.547
    4 1 3 0.147
    4 2 1 0.235
    4 2 2 0.353
    4 2 3 0.390
    4 3 1 0.048
    4 3 2 0.111
    4 3 3 0.417
    end

    Comment


    • #3
      The 2nd floor is the long format of the data converted from wide format.

      Comment


      • #4
        I feel frustrated and nobody could help me....................

        Comment


        • #5
          That is a bit quick to feel frustrated. Maybe consider that people live in different time-zones...

          Just use the post option with margins and after that you can run a regular test with test command.
          ---------------------------------
          Maarten L. Buis
          University of Konstanz
          Department of history and sociology
          box 40
          78457 Konstanz
          Germany
          http://www.maartenbuis.nl
          ---------------------------------

          Comment


          • #6
            Thank you. But I don't know how to do this. Could you please help me with the code?

            Comment


            • #7
              Can someone help me?

              Comment

              Working...
              X