Announcement

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

  • Different results for odds ratios: Logit coefficients vs margins command

    Hello everyone,

    unfortunately, I can't tell you which Stata-Version I was using, since I used a remote access client to work on a server. I can't access the server anymore, I only have the results and some of the code available.

    I have a dataset with patients in different regions and I am looking at differences in the probability of being referred to a specialist by regions. For each patient I have a dummy variable, indicating whether she is referred (referral), a categorical variable indicating the region (region) and several control variables. I first used a logit regression and then predicted the probability with the margins command.

    Code:
    logit referral i.region controlvars, robust
    
    margins region
    My base category is region 1 in the output. Region 2 has a coefficient of 0.598, which results in an odds ratio of e(0.598) = 1.818. However, when I look at the results of the margins command, the average adjusted prediction that is calculated with the magins command gives a probability of 0.775 for region 1 and a probability of 0.823 for region two. Calculating the odds ratio with these probabilities gives a completely different results: (0.823/(1-0.823) / (0.775/(1-0.775)) = 1.349. Does anyone know why these differences arise? Is there a logical explanation for that which I can give when showing my results, or did I mistake somewhere in my calculation?

    Best regards,
    Nina König

  • #2
    They are different things, and in general, you should not expect them to agree. They will agree when you have only the single discrete predictor and no other covariates. Otherwise, they will usually be different.

    Here's why. The odds ratio you get by exponentiating a logistic regression coefficient is a single statistic calculated by maximizing the likelihood over the entire estimation sample. What -margins- does is different. It calculates a predicted probability at every observation in the data set, using the single odds ratio from the logistic regression and applying the inverse logit transform.* Then it averages those probabilities. Then you applied the logit transformation to the average to calculate odds. Well, since the logit transformation is (highly) non-linear, the logit of the average probablity (what you calculated) is not the average of the logits of the individual probabilities. On top of that, we are dealing with yet another non-linear transformation beyond odds: taking a quotient to get an odds ratio. And again, the ratio of two averages is a different thing from the average of ratios.

    *I'm not saying that is how -margins- actually does the calculation--I don't know. I do know that what it does is mathematically equivalent to that.
    Last edited by Clyde Schechter; 28 Jun 2021, 11:10.

    Comment


    • #3
      Thank you very much for your help!

      Comment


      • #4
        Fortunately I hit this post today! I have been contemplating the same question.

        My data are based on a randomised clinical trial (treatment n=145; no treatment n= 73)

        In my research, the idea was to summarise the logit regression results (on log-odds scale and odds ratio) in supplementary materials. And use the model to estimate and present the predicted probabilities and marginal effects (dy/dx) (using margins) to be able to better interpret/explain the model on the probability scale (which makes more sense to my audience).

        My logit regression model includes a binary dependent variable (vision-response being Success vs. Failure), binary exposure (treatment vs. no treatment) adjusted for 5 baseline covariates (4 binary and 1 (age) being continuous).
        I used - margins, treatment - which produced (in my opinion} reasonable predicted probabilities, but just like Nina I could not trace these probabilities back to the odds ratio output from the logit regression. So with your response Clyde "They will agree when you have only the single discrete predictor and no other covariates", I now understand I can not use the margins output (predicted probabilities) to trace back the odds ratios from the model output.

        BUT, what if I still wish to present predicted probabilities and marginal effects based on the model predictions?
        Margins provides so many options.
        After reading the manual on this topic (several times) I ask myself what is the best ' margin option' to use.
        I do understand this my be rather a conceptual question (hence my call), but you probably have much more experience on this topic to provide some guidance.
        - "margins treatment": using the observed values for the covariates, but forcing every participant to either be treated or not treated i.e., marginal standardization, in which predicted probabilities of the outcome are calculated for every observed confounder value and then combined as a weighted average separately for each exposure level;
        - "margins, as balanced" margins assuming that all levels of factor variables are equally likely (design is balanced) i.e, estimated marginal means or least-squares means (but how is the continuous variable treated in this margins calculation?)
        - "margins treatment, subpop(treatment) post": where the subpop option calculates weights based on the treatment = 1 (exposed group)

        Is it just my call? Or is there guidance on what margin option to use when we try to present/understand logistic regression model results on a probability scale?

        Thanks in advance for your feedback.

        Comment


        • #5
          It is, in your words, your call. There are no general rules here--it depends on the specific questions you are trying to answer.

          Comment


          • #6
            Thank you for your feedback!

            Comment


            • #7
              I would like to verify whether I am having the same problem as the above users, because I am not only getting results from calculating ORs and AMEs (with margins dy/dx command)--I don't even have direction of effect:

              In the output below, I am running an ordinal logistic regression model where my primary IV is whether a person sees the word "undocumented" (rather than "illegal") in front of the word "immigrant" and my primary DV is how strongly supportive they are of admitting more immigrants (5 category outcome from admit much more to admit much fewer). Then I run the margins command with dy/dx on all variables to get probabilities as average marginal effects.
              I am concerned because the Average Marginal Effects (which I get from margins dy/dx command) coefficient for "undocumented" is 0.055 (suggesting a positive relationship) but the OR coefficient for "undocumented" is 0.7 (suggesting a negative relationship, since a OR beneath 1 means lower odds).
              I understand that if this was a continuous variable that would probably signfiy that toward the mean of the distribution for this IV there was a negative association between the IV and the DV, but across the entire distribution the relationship was negative. But since the i. prefix already makes this an indicator variable, I was wondering how to explain this discrepency and best account for the discrepancy between the two coefficients and interpret the OR coefficient, if the interpretation for the AME would be presumably: a participant seeing the word "undocumented" (rather than "illegal") in front of immigrant has a 5.5% higher probability of being relatively more supportive toward admitting more immigrants.

              If anyone can explain to me why I am not only getting different results in these two forms, but results with a different sign, I would really appreciate it, and how I should move forward with interpreting this output. I have been finding consistently different signed output in my regressions and this greatly affects my findings.

              My output:

              ologit letin_c undocumented i.female i.hispanic i.white age i.northeast i.south i.midwest log_income educ i.born_usa i.democrat i.republican media polview auth ethnocentrism if good==1, or


              /*

              Iteration 0: log likelihood = -581.8273
              Iteration 1: log likelihood = -512.58084
              Iteration 2: log likelihood = -511.21219
              Iteration 3: log likelihood = -511.2103
              Iteration 4: log likelihood = -511.2103

              Ordered logistic regression Number of obs = 389
              LR chi2(17) = 141.23
              Prob > chi2 = 0.0000
              Log likelihood = -511.2103 Pseudo R2 = 0.1214

              -------------------------------------------------------------------------------
              letin_c | Odds Ratio Std. Err. z P>|z| [95% Conf. Interval]
              --------------+----------------------------------------------------------------
              undocumented | .7015307 .137092 -1.81 0.070 .4783065 1.028933
              1.female | 1.221929 .2449192 1.00 0.317 .8249624 1.809914
              1.hispanic | 1.241505 .4125297 0.65 0.515 .6473056 2.381153
              1.white | 1.096227 .2621284 0.38 0.701 .68606 1.751615
              age | .9941287 .0058956 -0.99 0.321 .9826404 1.005751
              1.northeast | .8040948 .2401469 -0.73 0.465 .4478078 1.443852
              1.south | .6841401 .1822198 -1.43 0.154 .405909 1.153085
              1.midwest | .8104022 .2418133 -0.70 0.481 .4515579 1.454413
              log_income | 1.51057 .2175803 2.86 0.004 1.139029 2.003303
              educ | .975002 .0497074 -0.50 0.619 .8822867 1.07746
              1.born_usa | 2.577356 1.552953 1.57 0.116 .7912136 8.395663
              1.democrat | 1.904001 .4934707 2.48 0.013 1.145662 3.164302
              1.republican | .8597503 .2758321 -0.47 0.638 .4584404 1.612359
              media | 1.144947 .1097385 1.41 0.158 .9488581 1.38156
              polview | .6589678 .0645396 -4.26 0.000 .5438725 .7984198
              auth | 1.039364 .0998868 0.40 0.688 .8609219 1.25479
              ethnocentrism | .7680881 .0400474 -5.06 0.000 .6934739 .8507304
              --------------+----------------------------------------------------------------
              /cut1 | 4.204956 1.654574 .9620502 7.447862
              /cut2 | 5.128294 1.660895 1.872999 8.383589
              /cut3 | 6.78746 1.676324 3.501925 10.073
              /cut4 | 8.614816 1.697637 5.287508 11.94212
              -------------------------------------------------------------------------------

              *try this without hte i. prefix
              margins, dydx(*) predict(pr) post

              Average marginal effects Number of obs = 389
              Model VCE : OIM

              Expression : Pr(letin_c==0), predict(pr)
              dy/dx w.r.t. : undocumented 1.female 1.hispanic 1.white age 1.northeast 1.south 1.midwest log_income educ 1.born_usa 1.democrat 1.republican
              media polview auth ethnocentrism

              -------------------------------------------------------------------------------
              | Delta-method
              | dy/dx Std. Err. z P>|z| [95% Conf. Interval]
              --------------+----------------------------------------------------------------
              undocumented | .0557348 .0305222 1.83 0.068 -.0040877 .1155572
              1.female | -.0313385 .0311771 -1.01 0.315 -.0924446 .0297676
              1.hispanic | -.0331745 .049526 -0.67 0.503 -.1302437 .0638948
              1.white | -.0145285 .0380403 -0.38 0.703 -.0890861 .0600291
              age | .0009258 .0009313 0.99 0.320 -.0008996 .0027512
              1.northeast | .0348225 .0483923 0.72 0.472 -.0600247 .1296696
              1.south | .0605678 .0429606 1.41 0.159 -.0236335 .144769
              1.midwest | .0336521 .0485678 0.69 0.488 -.061539 .1288432
              log_income | -.0648533 .0224199 -2.89 0.004 -.1087954 -.0209111
              educ | .0039803 .0080177 0.50 0.620 -.0117341 .0196946
              1.born_usa | -.1655845 .1124822 -1.47 0.141 -.3860455 .0548765
              1.democrat | -.1041982 .0429971 -2.42 0.015 -.1884709 -.0199255
              1.republican | .0242321 .0523177 0.46 0.643 -.0783088 .126773
              media | -.0212817 .0150506 -1.41 0.157 -.0507804 .0082169
              polview | .0655755 .0147728 4.44 0.000 .0366214 .0945296
              auth | -.0060702 .0150833 -0.40 0.687 -.0356329 .0234924
              ethnocentrism | .0414839 .0078811 5.26 0.000 .0260372 .0569307
              -------------------------------------------------------------------------------
              Note: dy/dx for factor levels is the discrete change from the base level.

              Comment


              • #8
                * I am not only getting different numerical results from calculating ORs and AMEs (with margins dy/dx command) coefficients--they don't even have same direction of effect!: (sorry tried to just edit the above but no success)

                Comment


                • #9
                  This is complicated; it is one of the pitfalls of analyses with polytomous outcome variables, whether through -mlogit- or -ologit-. The root of the problem is that the outcome probabilities have to sum to 1 under all conditions. Now, in -ologit- we have a proportional odds assumption. So an odds ratio of 0.7, meaning that the odds of level 1 or higher are 0.7 as likely as the odds of level 0, and the odds of level2 or higher are 0.7 times as likely as the odds of level 1 or below, etc. But applying the same odds ratio across the board does not have the same effect on the underlying probabilities. For example, an odds ratio of 0.7 changes the odds from a starting value of 1 to a final value of 0.7, and these correspond to probabilities of 0.5 at the start and 0.41... at the end. But if the starting probability is 0.1, the starting odds are 0.111... The corresponding final odds are then 0.077777.... which corresponds to a probability of 0.072...Notice that the same 0.7 odds ratio has a much larger impact on a starting probability of 0.5 than it does on a starting probability of 0.1. (A difference of 0.09 vs 0.028.) This is a property of the non-linear odds:probability relationship. The same odds ratio has large effects on probabilities near 0.5 and small effects on probabilities close to 0 or 1.

                  Moreover, remember that the odds ratio you are talking about is not the odds of outcome 2 vs outcome 1 or anything that simple. It is the odds of outcome n or greater vs outcome n-1 or less: these are complicated to understand and translate mentally into probabilities of individual outcomes.

                  These facts, combined with the constraint that the probabilities of all of the outcome levels must add up to 1 can result in paradoxical-seeming findings. One probability may shrink so much that others must "grow" to "fill the gap" created by the shrinkage of others. In short, it is almost impossible for mere mortals to visualize how an odds ratio in one of these models plays out in terms of the effects on probabilities. So I suggest ignoring the odds ratios and, at least, postponing examination of the average marginal effects until you look at the average adjusted probabilities of each levels. I would get the latter using:
                  Code:
                  ologit letin_c i.undocumented...
                  margins undocumented
                  (In the current version of Stata, the default output of -margins- will be the probabilities at all of the outcome variable levels. In earlier versions of Stata you would get only one level, so you would have to write a little loop to get them all.)

                  This way you will see exactly what the probabilities are doing and how things shift around between undocumented = 0 and undocumented = 1 conditions. If you want to then characterize these by looking at the average marginal effects, you can do that and the results will be more comprehensible.

                  Comment


                  • #10
                    Thanks Clyde, your comments were helpful. Seems as with many nonlinear model (and especially multi ordinal models!) output the major trade off is the parsimony of having a tabular presentation of results (for which odds ratios tells a more consistent story) and the detail required to more faithfully describe how the probability changes across the logistic curve for different individuals (consuming more of your word count to interpret for the reader).
                    Actually for those unsatisfied with the odds ratios, what you recommended is what I have done in the meantime with both an ordinal logit model and a linear probability model! (see output below)

                    The ologit output was much more voluminous (5 coefficients per prediction because it is a 5 category variable), is more challenging time to interpret due to the nonlinearities across all categories, and has a higher proportion of predictions that are not statistically significant (as I guess multiple categorical/factorized values for the outcome are far more demanding in terms of sample size). so perhaps I think that it might be best to put it in the appendix and report the single quantities from the linear probability model as summaries of the magnitude and direction of effect since I had only around 11 of 54 coefficients above 1 and below 0 (which I guess is not too bad?) and they are nearly all statistically significant. Unless a particular type of individual is of specific interest (for which I would want to run margins), maybe odds ratios are still the most accurate and consistent summary measure of the direction of effect each variable has before going into this level of detail of results from margins on specific types of individuals?

                    I paste below a sample of my output from running margins after both my linear probability model and my ologit model for you to see what it gives me (both for differences in undocumented=0 and 1, as well as more specific individuals).
                    However, unlike what you wrote about the odds ratio output from the ologit regression (which I think is valid), I suspect that the ologit output is really giving me estimates of ending up only in each category rather than being in that category or below. If that were not the case, then the probability predicted by the margins command in being the mth category would always be higher than the probability in the m-1th category, which is clearly not the case from this output (if what you were suggesting I do with the loop on the ologit model is something different, let me know as that part was not totally clear to me, though if meant was just running the margins on different values of my outcome variable undocumented I do that too here):


                    . running margins only on undocumented:


                    ologit immunit undocumented female hispanic white age northeast south west log_income1 educ born_usa democrat republican media polview auth
                    > ethnocentrism if good==1, vce(robust)

                    Iteration 0: log pseudolikelihood = -572.19998
                    Iteration 1: log pseudolikelihood = -480.86088
                    Iteration 2: log pseudolikelihood = -477.90409
                    Iteration 3: log pseudolikelihood = -477.89677
                    Iteration 4: log pseudolikelihood = -477.89677

                    Ordered logistic regression Number of obs = 389
                    Wald chi2(17) = 144.94
                    Prob > chi2 = 0.0000
                    Log pseudolikelihood = -477.89677 Pseudo R2 = 0.1648

                    -------------------------------------------------------------------------------
                    | Robust
                    immunit_c | Coef. Std. Err. z P>|z| [95% Conf. Interval]
                    --------------+----------------------------------------------------------------
                    undocumented | .3678865 .1934248 1.90 0.057 -.0112192 .7469922
                    female | -.3256022 .2001657 -1.63 0.104 -.7179198 .0667153
                    hispanic | -.0365851 .3564881 -0.10 0.918 -.735289 .6621189
                    white | .3208842 .2604222 1.23 0.218 -.1895339 .8313023
                    age | .0039506 .0056313 0.70 0.483 -.0070865 .0149877
                    northeast | .0970029 .3034531 0.32 0.749 -.4977542 .6917601
                    south | .0972555 .2701359 0.36 0.719 -.4322011 .6267122
                    west | .1249587 .2851121 0.44 0.661 -.4338507 .6837681
                    log_income1 | -.0908772 .1417954 -0.64 0.522 -.3687912 .1870368
                    educ | .0512813 .0546763 0.94 0.348 -.0558822 .1584448
                    born_usa | .4440389 .5943451 0.75 0.455 -.7208561 1.608934
                    democrat | -.4379517 .2444349 -1.79 0.073 -.9170352 .0411319
                    republican | .9065078 .3166183 2.86 0.004 .2859472 1.527068
                    media | .205819 .0984014 2.09 0.036 .0129558 .3986822
                    polview | .0298254 .0887895 0.34 0.737 -.1441989 .2038496
                    auth | .2657919 .1031771 2.58 0.010 .0635685 .4680152
                    ethnocentrism | .2409618 .0566642 4.25 0.000 .129902 .3520216
                    --------------+----------------------------------------------------------------
                    /cut1 | .2152624 1.68039 -3.078242 3.508767
                    /cut2 | 1.373493 1.681814 -1.922802 4.669788
                    /cut3 | 1.575502 1.685635 -1.728282 4.879286
                    /cut4 | 3.469918 1.678124 .1808549 6.758982
                    -------------------------------------------------------------------------------

                    after ologit regression:
                    ologit immunit undocumented female hispanic white age northeast south west log_income1 educ born_usa democrat republican media polview auth
                    > ethnocentrism if good==1, vce(robust)

                    Iteration 0: log pseudolikelihood = -572.19998
                    Iteration 1: log pseudolikelihood = -480.86088
                    Iteration 2: log pseudolikelihood = -477.90409
                    Iteration 3: log pseudolikelihood = -477.89677
                    Iteration 4: log pseudolikelihood = -477.89677

                    Ordered logistic regression Number of obs = 389
                    Wald chi2(17) = 144.94
                    Prob > chi2 = 0.0000
                    Log pseudolikelihood = -477.89677 Pseudo R2 = 0.1648

                    -------------------------------------------------------------------------------
                    | Robust
                    immunit_c | Coef. Std. Err. z P>|z| [95% Conf. Interval]
                    --------------+----------------------------------------------------------------
                    undocumented | .3678865 .1934248 1.90 0.057 -.0112192 .7469922
                    female | -.3256022 .2001657 -1.63 0.104 -.7179198 .0667153
                    hispanic | -.0365851 .3564881 -0.10 0.918 -.735289 .6621189
                    white | .3208842 .2604222 1.23 0.218 -.1895339 .8313023
                    age | .0039506 .0056313 0.70 0.483 -.0070865 .0149877
                    northeast | .0970029 .3034531 0.32 0.749 -.4977542 .6917601
                    south | .0972555 .2701359 0.36 0.719 -.4322011 .6267122
                    west | .1249587 .2851121 0.44 0.661 -.4338507 .6837681
                    log_income1 | -.0908772 .1417954 -0.64 0.522 -.3687912 .1870368
                    educ | .0512813 .0546763 0.94 0.348 -.0558822 .1584448
                    born_usa | .4440389 .5943451 0.75 0.455 -.7208561 1.608934
                    democrat | -.4379517 .2444349 -1.79 0.073 -.9170352 .0411319
                    republican | .9065078 .3166183 2.86 0.004 .2859472 1.527068
                    media | .205819 .0984014 2.09 0.036 .0129558 .3986822
                    polview | .0298254 .0887895 0.34 0.737 -.1441989 .2038496
                    auth | .2657919 .1031771 2.58 0.010 .0635685 .4680152
                    ethnocentrism | .2409618 .0566642 4.25 0.000 .129902 .3520216
                    --------------+----------------------------------------------------------------
                    /cut1 | .2152624 1.68039 -3.078242 3.508767
                    /cut2 | 1.373493 1.681814 -1.922802 4.669788
                    /cut3 | 1.575502 1.685635 -1.728282 4.879286
                    /cut4 | 3.469918 1.678124 .1808549 6.758982
                    -------------------------------------------------------------------------------

                    margins, at(undocumented=0)

                    Predictive margins Number of obs = 389
                    Model VCE : Robust

                    1._predict : Pr(immunit_c==0), predict(pr outcome(0))
                    2._predict : Pr(immunit_c==.25), predict(pr outcome(.25))
                    3._predict : Pr(immunit_c==.5), predict(pr outcome(.5))
                    4._predict : Pr(immunit_c==.75), predict(pr outcome(.75))
                    5._predict : Pr(immunit_c==1), predict(pr outcome(1))
                    at : undocumented = 0

                    ------------------------------------------------------------------------------
                    | Delta-method
                    | Margin Std. Err. z P>|z| [95% Conf. Interval]
                    -------------+----------------------------------------------------------------
                    _predict |
                    1 | .3220066 .0272073 11.84 0.000 .2686812 .375332
                    2 | .1986853 .0195991 10.14 0.000 .1602719 .2370987
                    3 | .0344124 .0093162 3.69 0.000 .016153 .0526719
                    4 | .2678075 .0219604 12.20 0.000 .224766 .310849
                    5 | .1770882 .0191133 9.27 0.000 .1396268 .2145495
                    ------------------------------------------------------------------------------

                    . margins, at(undocumented=1)

                    Predictive margins Number of obs = 389
                    Model VCE : Robust

                    1._predict : Pr(immunit_c==0), predict(pr outcome(0))
                    2._predict : Pr(immunit_c==.25), predict(pr outcome(.25))
                    3._predict : Pr(immunit_c==.5), predict(pr outcome(.5))
                    4._predict : Pr(immunit_c==.75), predict(pr outcome(.75))
                    5._predict : Pr(immunit_c==1), predict(pr outcome(1))
                    at : undocumented = 1

                    ------------------------------------------------------------------------------
                    | Delta-method
                    | Margin Std. Err. z P>|z| [95% Conf. Interval]
                    -------------+----------------------------------------------------------------
                    _predict |
                    1 | .2641901 .0237809 11.11 0.000 .2175804 .3107998
                    2 | .192721 .0189963 10.15 0.000 .155489 .2299531
                    3 | .0351384 .0095077 3.70 0.000 .0165037 .0537731
                    4 | .2888908 .022274 12.97 0.000 .2452345 .3325471
                    5 | .2190596 .0213604 10.26 0.000 .177194 .2609253
                    ------------------------------------------------------------------------------



                    regress immunit undocumented female hispanic white age northeast south west log_income1 educ born_usa democrat republican media polview auth
                    > ethnocentrism if good==1, vce(robust)

                    Linear regression Number of obs = 389
                    F(17, 371) = 20.49
                    Prob > F = 0.0000
                    R-squared = 0.3860
                    Root MSE = .31343

                    -------------------------------------------------------------------------------
                    | Robust
                    immunit_c | Coef. Std. Err. t P>|t| [95% Conf. Interval]
                    --------------+----------------------------------------------------------------
                    undocumented | .0534014 .0322613 1.66 0.099 -.0100365 .1168393
                    female | -.0546178 .0330414 -1.65 0.099 -.1195897 .0103541
                    hispanic | .018581 .0577554 0.32 0.748 -.094988 .13215
                    white | .0356924 .0417822 0.85 0.394 -.0464673 .1178521
                    age | .0006658 .0009726 0.68 0.494 -.0012467 .0025783
                    northeast | -.0042267 .0508169 -0.08 0.934 -.104152 .0956985
                    south | .0067551 .0457491 0.15 0.883 -.0832049 .0967152
                    west | .0071697 .0485037 0.15 0.883 -.0882069 .1025464
                    log_income1 | -.0070737 .0226444 -0.31 0.755 -.0516012 .0374537
                    educ | .0087512 .0087964 0.99 0.320 -.0085458 .0260483
                    born_usa | .0830721 .076433 1.09 0.278 -.067224 .2333683
                    democrat | -.0872671 .0422592 -2.07 0.040 -.1703647 -.0041695
                    republican | .1339722 .0512862 2.61 0.009 .0331242 .2348203
                    media | .0365054 .0154037 2.37 0.018 .0062158 .066795
                    polview | -.0015377 .0143276 -0.11 0.915 -.0297112 .0266357
                    auth | .0558662 .016341 3.42 0.001 .0237336 .0879989
                    ethnocentrism | .0332709 .0071902 4.63 0.000 .0191323 .0474094
                    _cons | .1563884 .2649671 0.59 0.555 -.3646372 .6774141
                    -------------------------------------------------------------------------------



                    . margins, at(undocumented=0)

                    Predictive margins Number of obs = 389
                    Model VCE : Robust

                    Expression : Linear prediction, predict()
                    at : undocumented = 0

                    ------------------------------------------------------------------------------
                    | Delta-method
                    | Margin Std. Err. t P>|t| [95% Conf. Interval]
                    -------------+----------------------------------------------------------------
                    _cons | .4445849 .0229316 19.39 0.000 .3994928 .4896771
                    ------------------------------------------------------------------------------

                    . margins, at(undocumented=1)

                    Predictive margins Number of obs = 389
                    Model VCE : Robust

                    Expression : Linear prediction, predict()
                    at : undocumented = 1

                    ------------------------------------------------------------------------------
                    | Delta-method
                    | Margin Std. Err. t P>|t| [95% Conf. Interval]
                    -------------+----------------------------------------------------------------
                    _cons | .4979863 .0223472 22.28 0.000 .4540431 .5419294
                    ------------------------------------------------------------------------------

                    .
                    .margins after ologit command for specific type of individual:
                    . *sterotypical anti-immigrant American

                    . margins, at(undocumented=0 female=0 hispanic=0 white=1 age=75 south=1 northeast=0 west=1 log_income=10 educ=12 born_usa=1 democrat=0 republi
                    > can=1 media=7 auth=2 ethnocentrism=9)

                    Predictive margins Number of obs = 389
                    Model VCE : Robust

                    1._predict : Pr(immunit_c==0), predict(pr outcome(0))
                    2._predict : Pr(immunit_c==.25), predict(pr outcome(.25))
                    3._predict : Pr(immunit_c==.5), predict(pr outcome(.5))
                    4._predict : Pr(immunit_c==.75), predict(pr outcome(.75))
                    5._predict : Pr(immunit_c==1), predict(pr outcome(1))
                    at : undocumented = 0
                    female = 0
                    hispanic = 0
                    white = 1
                    age = 75
                    northeast = 0
                    south = 1
                    west = 1
                    log_income1 = 10
                    educ = 12
                    born_usa = 1
                    democrat = 0
                    republican = 1
                    media = 7
                    auth = 2
                    ethnocentr~m = 9

                    ------------------------------------------------------------------------------
                    | Delta-method
                    | Margin Std. Err. z P>|z| [95% Conf. Interval]
                    -------------+----------------------------------------------------------------
                    _predict |
                    1 | .0030149 .0023735 1.27 0.204 -.0016371 .007667
                    2 | .0065225 .0049488 1.32 0.188 -.003177 .016222
                    3 | .0021101 .0016398 1.29 0.198 -.0011039 .0053241
                    4 | .0610012 .0409677 1.49 0.136 -.0192939 .1412964
                    5 | .9273513 .0495104 18.73 0.000 .8303127 1.02439
                    ------------------------------------------------------------------------------

                    . margins, at(undocumented=1 female=0 hispanic=0 white=1 age=75 south=1 northeast=0 west=1 log_income=10 educ=12 born_usa=1 democrat=0 republi
                    > can=1 media=7 auth=2 ethnocentrism=9)

                    Predictive margins Number of obs = 389
                    Model VCE : Robust

                    1._predict : Pr(immunit_c==0), predict(pr outcome(0))
                    2._predict : Pr(immunit_c==.25), predict(pr outcome(.25))
                    3._predict : Pr(immunit_c==.5), predict(pr outcome(.5))
                    4._predict : Pr(immunit_c==.75), predict(pr outcome(.75))
                    5._predict : Pr(immunit_c==1), predict(pr outcome(1))
                    at : undocumented = 1
                    female = 0
                    hispanic = 0
                    white = 1
                    age = 75
                    northeast = 0
                    south = 1
                    west = 1
                    log_income1 = 10
                    educ = 12
                    born_usa = 1
                    democrat = 0
                    republican = 1
                    media = 7
                    auth = 2
                    ethnocentr~m = 9

                    ------------------------------------------------------------------------------
                    | Delta-method
                    | Margin Std. Err. z P>|z| [95% Conf. Interval]
                    -------------+----------------------------------------------------------------
                    _predict |
                    1 | .0020889 .0016659 1.25 0.210 -.0011762 .005354
                    2 | .0045324 .0034896 1.30 0.194 -.0023071 .0113719
                    3 | .0014702 .0011585 1.27 0.204 -.0008004 .0037408
                    4 | .0433488 .0303392 1.43 0.153 -.0161149 .1028125
                    5 | .9485598 .036366 26.08 0.000 .8772838 1.019836
                    ------------------------------------------------------------------------------

                    margins after regress command for ideal type individual

                    .
                    . *sterotypical anti-immigrant American

                    . margins, at(undocumented=0 female=0 hispanic=0 white=1 age=75 south=1 northeast=0 west=0 log_income=10 educ=12 born_usa=1 democrat=0 republi
                    > can=1 media=7 auth=2 ethnocentrism=9)

                    Predictive margins Number of obs = 389
                    Model VCE : Robust

                    Expression : Linear prediction, predict()
                    at : undocumented = 0
                    female = 0
                    hispanic = 0
                    white = 1
                    age = 75
                    northeast = 0
                    south = 1
                    west = 0
                    log_income1 = 10
                    educ = 12
                    born_usa = 1
                    democrat = 0
                    republican = 1
                    media = 7
                    auth = 2
                    ethnocentr~m = 9

                    ------------------------------------------------------------------------------
                    | Delta-method
                    | Margin Std. Err. t P>|t| [95% Conf. Interval]
                    -------------+----------------------------------------------------------------
                    _cons | 1.167816 .0973231 12.00 0.000 .9764424 1.35919
                    ------------------------------------------------------------------------------

                    . margins, at(undocumented=1 female=0 hispanic=0 white=1 age=75 south=1 northeast=0 west=0 log_income=10 educ=12 born_usa=1 democrat=0 republi
                    > can=1 media=7 auth=2 ethnocentrism=9)

                    Predictive margins Number of obs = 389
                    Model VCE : Robust

                    Expression : Linear prediction, predict()
                    at : undocumented = 1
                    female = 0
                    hispanic = 0
                    white = 1
                    age = 75
                    northeast = 0
                    south = 1
                    west = 0
                    log_income1 = 10
                    educ = 12
                    born_usa = 1
                    democrat = 0
                    republican = 1
                    media = 7
                    auth = 2
                    ethnocentr~m = 9

                    ------------------------------------------------------------------------------
                    | Delta-method
                    | Margin Std. Err. t P>|t| [95% Conf. Interval]
                    -------------+----------------------------------------------------------------
                    _cons | 1.221218 .0947721 12.89 0.000 1.03486 1.407576
                    ------------------------------------------------------------------------------


                    Comment


                    • #11
                      I think these models of polytomous outcomes are difficult to report clearly. As you note, they are very demanding of sample size. And the very meaning of things like odds ratios in this context is a bit mind-blowing for the typical reader. I think it is fair to highlight what you think are the most important outcomes in your main article and relegate the details to tables in a supplement.

                      I was not clear enough in my explanation about the meaning of the odds ratios. The discrete outcome for a given observation is determined by the linear combination xb (summ of explanatory variables times coefficients) and the cutoffs. They do so according to the following formula (screenshot from the online Stata PDF manual chapter for -ologit-):
                      Click image for larger version

Name:	Capture.PNG
Views:	1
Size:	16.7 KB
ID:	1666313

                      The kappas are the cutoffs, the xj's are the explanatory variables, and the beta represents the coefficients. This formula relies on the proportional odds assumption, that the odds of response at level 2 or higher vs level1 is the same as the odds of level 3 or higher vs levels 1 and 2, which, in turn is the same as the odds of level 4 or higher vs levels 1, 2, and 3, etc. Where that not the case, you could not have a single beta vector: you would need separate betas for each level. The proportional odds assumption is what makes this formula possible, and it greatly reduces the dimensionality of the problem. Estimation of these models would, as a practical matter, be very difficult or impossible for all but toy problems were this not the case. -ologit- finds the values of beta and the kappas that best, in the sense of maximum ikelihood, fits the data under these very stringent constraints.

                      That said, it remains true that the value of the coefficient represents the logarithm of the ratio of higher vs lower odds when xj = 1 vs when xj = 0.

                      As for the -margins- command, it just calculates the corresponding predicted probabilities using the -ologit- results from this formula and then reports the averaged results.

                      Comment


                      • #12
                        Thanks again, I was planning to relegate the ordinal regression output to an appendix and will try to summarize the take-away from the numerical patterns. Did you find the marginal predicted probabilities for different ideal-type individuals based on the linear probability regression model sufficiently reliable in their relatively more parsimonious form to include in the paper? (I intentionally coded my variable on a 0 to 1 scale thinking it might help.)
                        Unfortunately, in my discipline for quantitative papers we are expected at minimum to have at least a table or plot of coefficients, even if within the text I could probably avoid the hazard of numerically/precisely describing the change, which seems more hazardous/awkward than just describing the sign/direction of the association and putting the odds ratio in parentheses as evidence of my claim about which variables seem more important in terms of magnitude.
                        A snippet of what such a table looks like (I would of course acknowledge that a minority of the values are out of bounds for probability, but the point is to transparently offer numerical evidence for the consistent differences in the magnitudes for those who see undocumented versus illegal in the experiment) :
                        TABLE 5: DIFFERENCES FROM LINEAR PROBABILITY MODEL IN PREDICTED MARGINAL ESTIMATES OF VIEWS ABOUT IMMIGRATION
                        FOR HYPOTHESIZED ANTI-, PRO- AND MODERATE-IMMIGRATION US RESIDENT WHO VIEWS "UNDOCUMENTED" V. "ILLEGAL" IMMIGRANT
                        let more immigrants in anti-immigration US resident pro-immigration US resident moderate-immigration US resident
                        undocumented 0.1 0.53** 0.34**
                        illegal 0.15 0.58** 0.39**
                        immigrants don't need favors anti-immigration US resident pro-immigration US resident moderate-immigration US resident
                        undocumented 0.93*** 0.39*** 0.42***
                        illegal 0.90** 0.42** 0.39***
                        immigrants demand too many rights anti-immigration US resident pro-immigration US resident moderate-immigration US resident
                        undocumented 1.03**** -0.39*** 0.38***
                        illegal 1**** -0.43*** 0.35***

                        Comment

                        Working...
                        X