Announcement

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

  • #16
    But do I have to look at margins, dydx? I understand that interpretation of sign can now be tricky. But can't I just look for my categorical independent variables at
    Code:
     margins X, atmeans predict (outcome(#))
    and for continuous variable wage_of_hour I could use
    Code:
     margins, dydx ...
    .

    Because this looks fine for me, I don't need more analysis. Just a simple comparison of the workers. Because here I can say female occupation has the highest average probability for level of employment:
    2. according to margins:
    The average probability of being in a female occupation with a level of employment with 50-89% is 52.28%

    The average probability of being in a male occupation with a level of employment with 50-89% is 11.16%

    The average probability of being in a mix occupation with a level of employment with 50-89& is 36.56%
    Sorry again for disturbing,
    Last edited by Anshul Anand; 09 Jun 2015, 09:15.

    Comment


    • #17
      It depends what you want. Using dydx will give you the marginal effect (that is, the effect on probability by increasing the independent variable by one). Omitting dydx gives you the predicted probability of being in a certain outcome, not the change in probability. The way you are talking about it, it sounds like you want to compare the two approaches, but you can't do that, because they have different meanings and interpretations.

      Your interpretation:

      2. according to margins:
      The average probability of being in a female occupation with a level of employment with 50-89% is 52.28%
      The average probability of being in a male occupation with a level of employment with 50-89% is 11.16%
      The average probability of being in a mix occupation with a level of employment with 50-89& is 36.56%

      is more or less correct, although I would change "average" to "predicted" and add "at the means of the other variables."

      Comment


      • #18
        Thank you Joshua D Merfeld!!! Yes, I am only interested in of being in a certain outcome. Thank you very much to you all!!!

        Last edited by Anshul Anand; 09 Jun 2015, 10:46.

        Comment


        • #19
          Ok, I need some help for the interaction term:
          Code:
           mlogit occupation i.occupational_status i.flexible_working i.level_of_employment c.wage_per_hour#i.agegroup, base(mix_occupation)
          the wage per hour is in range from 10 to 7682 (3 values are above 1000). I categorized age in four groups because these are the groups where wages changes due to age.

          the output I get for the interaction is:
          Code:
          for female occupation:
          agegroup#c.wage_per_hour  
            
          20_29    -.0140473    .0017506    -8.02    0.000    -.0174784    -.0106163
          30_39    -.0214578    .0011523    -18.62    0.000    -.0237163    -.0191993
          40_49    -.0165352    .0010012    -16.52    0.000    -.0184975    -.0145729
          50_64    -.0144538    .0009742    -14.84    0.000    -.0163632    -.0125445
          
          for male occupation:
          agegroup#c.wage_per_hour  
          
              20_29    -.0052381    .0014492    -3.61    0.000    -.0080785    -.0023977
              30_39    -.0041117    .0007272    -5.65    0.000    -.005537    -.0026865
              40_49    -.0001267    .0002574    -0.49    0.623    -.0006312    .0003778
              50_64    -.0015584    .0006172    -2.52    0.012    -.0027681    -.0003487
          I am not sure how in this I should use margins atmeans predict (outcome(#)) because of this table with wage per hour and agegroup:
          Code:
                  agegroup
          wage    29    39    49    64    Total
                              
          10    5    8    7    2    22
          11    5    9    12    10    36
          12    7    9    8    9    33
          13    5    5    9    13    32
          14    4    8    13    26    51
          15    6    11    12    12    41
          16    13    13    13    13    52
          17    11    21    27    18    77
          18    27    18    33    39    117
          19    33    37    38    30    138
          20    37    60    44    60    201
          21    63    61    57    56    237
          22    75    91    69    58    293
          23    97    89    86    89    361
          24    96    98    111    105    410
          25    116    101    119    130    466
          26    127    130    113    111    481
          27    147    122    123    133    525
          28    153    153    143    142    591
          29    140    150    156    160    606
          30    143    165    157    144    609
          31    154    149    167    166    636
          32    166    171    148    166    651
          33    150    199    187    179    715
          34    121    180    164    164    629
          35    112    160    171    185    628
          36    100    190    203    172    665
          37    72    195    206    158    631
          38    89    174    182    181    626
          39    86    194    213    161    654
          40    69    171    191    188    619
          41    65    196    183    189    633
          42    73    184    191    176    624
          43    45    180    163    153    541
          44    49    161    186    160    556
          45    32    156    155    159    502
          46    42    147    164    145    498
          47    28    122    150    143    443
          48    25    133    141    138    437
          49    28    143    138    126    435
          50    14    117    140    121    392
          51    25    117    116    103    361
          52    15    103    140    125    383
          53    14    110    119    118    361
          54    15    99    121    116    351
          55    8    90    82    96    276
          56    7    82    98    96    283
          57    7    81    92    70    250
          58    10    79    81    87    257
          59    5    59    81    65    210
          60    7    63    94    82    246
          61    7    74    80    80    241
          62    4    68    79    67    218
          63    2    58    94    84    238
          64    4    55    71    59    189
          65    3    53    58    61    175
          66    3    45    64    72    184
          67    3    35    71    60    169
          68    2    37    64    65    168
          69    0    29    51    44    124
          70    2    36    62    52    152
          71    2    36    55    34    127
          72    2    28    51    59    140
          73    2    26    38    37    103
          74    1    28    53    48    130
          75    0    16    38    43    97
          76    1    27    37    35    100
          77    0    22    47    43    112
          78    0    18    48    33    99
          79    0    17    30    36    83
          80    0    11    25    31    67
          81    1    21    24    27    73
          82    2    22    31    22    77
          83    0    18    25    24    67
          84    2    13    30    21    66
          85    0    13    18    31    62
          86    1    11    28    14    54
          87    0    16    24    20    60
          88    1    11    19    25    56
          89    0    8    24    11    43
          90    0    11    19    30    60
          91    2    10    20    13    45
          92    1    7    15    17    40
          93    0    14    18    15    47
          94    0    6    12    11    29
          95    0    6    19    19    44
          96    0    8    20    12    40
          97    0    8    18    14    40
          98    1    5    15    15    36
          99    0    4    7    10    21
          100    0    5    11    19    35
          101    0    3    13    7    23
          102    0    5    12    12    29
          103    0    11    13    13    37
          104    1    5    8    8    22
          105    0    6    10    4    20
          106    0    5    9    10    24
          107    0    3    5    6    14
          108    0    3    10    11    24
          109    0    2    4    5    11
          110    0    6    5    6    17
          111    0    5    7    10    22
          112    0    2    6    6    14
          113    0    4    4    5    13
          114    0    4    2    5    11
          115    1    0    1    4    6
          116    0    1    6    7    14
          117    0    4    7    4    15
          118    0    1    4    5    10
          119    1    4    7    11    23
          120    0    0    5    1    6
          121    0    0    5    3    8
          122    1    1    5    6    13
          123    0    1    2    5    8
          124    1    3    3    3    10
          125    0    0    3    2    5
          126    0    2    5    1    8
          127    0    1    6    5    12
          128    0    1    0    1    2
          129    0    2    5    4    11
          130    0    2    6    5    13
          131    0    1    1    0    2
          132    0    1    1    3    5
          133    0    0    0    5    5
          134    0    1    2    1    4
          135    0    2    3    2    7
          136    0    1    3    2    6
          137    0    0    1    2    3
          138    0    0    5    3    8
          139    0    0    2    1    3
          140    0    1    1    1    3
          141    0    2    2    2    6
          142    0    0    2    0    2
          143    0    0    0    1    1
          144    0    0    3    2    5
          145    0    0    1    1    2
          146    0    0    2    4    6
          147    0    0    3    0    3
          148    0    0    3    1    4
          149    0    3    3    1    7
          150    0    0    2    0    2
          151    0    0    0    1    1
          152    0    0    0    1    1
          153    0    0    0    2    2
          154    0    1    2    0    3
          155    0    1    4    2    7
          156    0    1    1    3    5
          157    0    0    1    1    2
          158    0    0    3    2    5
          159    0    1    2    2    5
          160    0    1    0    1    2
          161    0    0    1    1    2
          162    1    2    2    3    8
          163    0    1    1    0    2
          164    0    1    1    4    6
          165    0    0    0    1    1
          166    0    0    3    2    5
          167    0    0    2    0    2
          168    0    0    2    0    2
          169    0    0    2    1    3
          170    0    0    0    2    2
          171    0    1    1    3    5
          172    0    0    2    2    4
          173    0    0    3    3    6
          174    0    1    1    0    2
          175    0    1    2    0    3
          176    0    0    1    1    2
          178    0    2    1    1    4
          179    1    0    0    1    2
          180    0    1    2    0    3
          181    0    0    1    0    1
          182    0    1    0    1    2
          183    0    0    0    2    2
          184    0    1    1    0    2
          186    0    1    1    0    2
          187    0    0    1    0    1
          188    0    0    1    0    1
          189    0    0    1    1    2
          190    0    1    2    1    4
          191    0    0    0    1    1
          192    0    0    0    2    2
          193    0    0    1    0    1
          194    0    0    0    2    2
          195    0    0    0    2    2
          196    0    2    0    1    3
          197    0    0    1    0    1
          198    0    0    1    0    1
          199    0    0    0    1    1
          203    0    0    3    0    3
          204    0    1    0    1    2
          207    0    2    0    1    3
          209    0    1    0    1    2
          210    0    0    0    1    1
          212    0    0    1    0    1
          213    0    0    1    0    1
          215    0    0    1    0    1
          216    0    0    1    1    2
          219    0    2    1    1    4
          224    1    0    1    0    2
          225    1    0    0    0    1
          227    0    0    1    0    1
          232    0    0    0    4    4
          233    0    0    1    0    1
          237    0    0    0    1    1
          240    0    0    0    1    1
          241    0    0    0    1    1
          249    0    0    0    1    1
          254    0    1    0    0    1
          258    0    1    0    0    1
          260    0    0    0    2    2
          263    0    1    0    0    1
          268    0    0    1    0    1
          271    0    0    1    0    1
          276    0    0    0    1    1
          295    0    0    0    1    1
          302    0    0    0    1    1
          305    0    0    0    1    1
          308    0    0    0    1    1
          309    0    0    1    1    2
          314    0    0    0    1    1
          319    0    0    0    1    1
          320    0    0    1    0    1
          331    0    1    0    0    1
          343    0    1    0    0    1
          350    0    0    0    1    1
          354    0    1    0    0    1
          362    0    0    1    0    1
          363    0    0    0    1    1
          364    0    0    0    1    1
          371    0    1    0    0    1
          377    0    0    1    0    1
          400    0    0    0    1    1
          407    0    1    0    0    1
          410    0    0    0    1    1
          411    0    1    0    0    1
          413    0    1    0    0    1
          417    0    0    0    1    1
          433    0    1    0    0    1
          460    1    0    0    0    1
          508    0    1    0    0    1
          657    0    0    1    0    1
          676    0    0    0    1    1
          703    0    0    0    1    1
          885    0    0    0    1    1
          889    0    0    1    0    1
          903    0    0    0    1    1
          1091    0    0    1    0    1
          3144    0    0    0    1    1
          7682    0    0    1    0    1
                              
          Total    3,002    6,638    7,620    7,257    24,517
          I think this is bad... however the dataset contains also a variable, where they categorize the wage per hour:
          Code:
           
                                               20_29 30_39 40_49 50_64 Total
          
          2.Bis 15 Fr./Std.            38       55        68      77      238
          3.15 - 20 Fr./Std.          210    228       202    227      867
          4.20 - 25 Fr./Std.          691    657       683    670   2,701
          5.25 - 30 Fr./Std.         823     902       871    933   3,529
          6.30 - 35 Fr./Std.         598  1,045    1,063  1,021   3,727
          7.35 - 40 Fr./Std.         339  1,037    1,066    986    3,428
          8.40 - 45 Fr./Std.        152     824       847    782    2,605
          9.45 - 50 Fr./Std.          69    569       702     642    1,982
          10.50 Fr./Std=<           82  1,321    2,118   1,919   5,440
          
          Total                      3,002  6,638    7,620    7,257  24,517
          Would be an interaction term with that categorized wage per hour and agegroup better?

          Last edited by Anshul Anand; 09 Jun 2015, 13:43.

          Comment


          • #20
            Given that you have used -fvvarlist-, the interaction term just represents the effect of wave within each age group. That is, the first coefficient represents the effect of wage for those aged 20 to 29 and so on.

            Could you explain a little more what problem you think exists in the data? What do you think is "bad"?

            Comment


            • #21
              I think this is bad...
              Why? It isn't at all surprising to find that a wage per hour variable has a skew distribution with a long tail and, in a finite data set, sparsity at individual values. And in no way does that impair your analysis. If you were treating wage_per_hour as a discrete variable, you would have a problem with lots of singleton dummies and collinearity with age group, but as a continuous variable, I just don't see a problem. Is there something I'm missing here?

              As a general principle, converting a continuous variable into a discrete variable by applying cutpoints is a bad idea, often a really terrible idea. Unless there is reason to believe that something truly discontinuous happens to the outcome you are studying when the predictor variable crosses a cutpoint, you are just throwing away information. For example if you have two categories of 15-20 and 20-25, you are treating 20.01 and 19.99 as radically different wages, but you are also saying that 20.01 and 24.99 are essentially the same. There are only a few situations in which that isn't just nonsense.

              Discrete variables should be used for things that are inherently discrete. Continuous variables should be used as continuous (with non-linear specifications through the use of transformations, splines, polynomial terms, or fractional polynomials if need be). Grouped values of continuous variables should be avoided unless that is the only form in which the data is available or when legal/privacy considerations require it.

              See Royston P, Altman DG, Sauerbrei W. Dichotomizing continuous predictors in multiple regression: a bad idea. Statistics in Medicine 2006; 25:127-141 for a full explanation.
              Last edited by Clyde Schechter; 09 Jun 2015, 13:47.

              Comment


              • #22
                thanks for the answers. My intuition was that it is bad... So it would make more sense to do "c.wage_per_hour#c.age" where age ranges from 20 to 64. If I do that, I got:
                Code:
                for female occupation:
                c.wage_per_hour#c.age  -.0002318   .0000151   -15.37   0.000    -.0002613   -.0002022
                
                for male occupation:
                c.wage_per_hour#c.age   -3.77e-06   5.56e-06    -0.68   0.498    -.0000147    7.13e-06
                But I don't know how to interpret this with "margins, atmeans predict (outcome(#))" because its continuous. And also I would only be able to make an statement about female occupation and mix occupation (because the effect on male occupation is insignificant).

                Comment


                • #23
                  To use -margins- with a continuous by continuous interaction you just need to select some interesting values of wage per hour and age and put them into an -at()- option. So, say some interesting values of wage_per_hour are 10, 30, 100, 300, 1000, 3000, and some interesting values of age are 20, 30, 40, 50, and 60. Then you can do this:

                  Code:
                  margins, at(wage_per_hour = (10 30 100 300 1000 3000) age = (20(10)60)) ///
                      predict(outcome(1)) predict(outcome(2)) predict(outcome(3))
                  to get the predicted probabilities of all three outcomes at all of those combinations of wage_per_hour and age. Note that both wage_per_hour and age appear in the same -at()- option. If you put them in separate -at()-s, you will not get combinations of the two, but each listed separately--which, in an interaction model, is not very useful. Note also that if you are using Stata version 14, you do not have to specify those three -predict()- options because giving you all three outcome probabilities is now the default (thank you Richard Williams for pointing that out earlier in this thread).

                  And you may also want to look at -margins, dydx()- with similar at() specifications.

                  Comment


                  • #24
                    And also I would only be able to make an statement about female occupation and mix occupation (because the effect on male occupation is insignificant).
                    No. Given the complex way in which probabilities of outcomes go up and down in multinomial models, the non-significance of the interaction coefficient in one outcome level does not mean that the probability of that outcome is unaffected by the interaction. It may well show considerable variation as a result of the effects of the interaction on the probabilities of the other outcome levels and the constraint that the sum of the three level probabilities must always be 1. So you still need to examine the actual predicted probabilities and marginal effects at each level of the outcome.

                    Apart from that very strong consideration in the case of -mlogit-, even in models that don't have these complications, if there is a strong theoretical reason to include an interaction in a model, it should stay there even if in your particular data you don't get a significant coefficient for it. If you included the interaction term just "on a hunch" and found it not significant then, by all means, you can remove it. (Caveat: don't make a fetish out of p < 0.05. p = 0.052 is not meaningfully different from p = 0.05 or p = 0.048.)

                    Comment


                    • #25
                      sorry for not giving any response. I was working on my thesis... Joshua D Merfeld, you said:
                      Given that you have used -fvvarlist-, the interaction term just represents the effect of wave within each age group. That is, the first coefficient represents the effect of wage for those aged 20 to 29 and so on.
                      . Does that mean, higher wage for the agegroup 20_29 makes it less liekly being in a female occupation than the reference category? Maybe this helps (where lohn=wage_per_hour and alter=agrgroup):
                      Code:
                       margins, at(lohn=(10(5)100) alter=29) predict(outcome(1))
                      marginsplot
                      The graph of marginsplot:
                      Click image for larger version

Name:	marginsplot.png
Views:	1
Size:	32.5 KB
ID:	1298082



                      And Clyde Schechter:
                      (Caveat: don't make a fetish out of p < 0.05. p = 0.052 is not meaningfully different from p = 0.05 or p = 0.048.)
                      The problem is, that we students have to follow the rules of the university ):

                      And Joshua D Merfeld, your tipp with changing the baseoutcome was really helpful. Because I did just now understand that: If the baseoutcome is mix occupation I interpret the coefficient relativ to the baseoutcome. changing the baseoutcome to men occupation gives me the opposite sign of mix occupation, meaining the interpretation remains as a whole the same. Now I can compare men occupation with women occupation. That is what I wanted . The only problem is to understand the interaction effect as above mentioned.
                      Last edited by Anshul Anand; 12 Jun 2015, 04:52.

                      Comment


                      • #26
                        I mean the interaction effect as mentioned in #19.
                        Given that you have used -fvvarlist-, the interaction term just represents the effect of wave within each age group. That is, the first coefficient represents the effect of wage for those aged 20 to 29 and so on.
                        . Does that mean, that an increase in wage makes it less likely to be in a female occupation relativ to the mix occupation?
                        Last edited by Anshul Anand; 12 Jun 2015, 08:28.

                        Comment


                        • #27
                          Hi Anshul,

                          Yes, your interpretation that higher wages make one less likely to be in a female job for those that are 20-29 is correct. The -margins, dydx- command gives you the change in probability of being in the outcome of interest, though, not as a comparison to the base category, and the -margins- command without dydx specified gives you the (expected conditional) probability of being in the category of interest, again not as a comparison to the base category. The only coefficient that is with respect to the base category is the coefficient from the mlogit command itself, prior to doing any margins commands.

                          Also, I don't think any universities have rules regarding p-values (at least not that I've heard of). Clyde is 100% correct that you shouldn't make a big deal out of 0.05.

                          Josh

                          Comment


                          • #28
                            Hi Joshua D Merfeld! Many Thanks!!! Last questions. If I have as baseoutcome the mix occupation and the result is being in a female occupation is more likely relativ to the mix occupation if working part-time and now I change the baseoutcome to male occupation and the result is being in a female occupation is more likely relativ to the male occupation if working part-time. Can I say after that: Summing together, being in a female occupation is more likely?

                            And I am not sure whether I should do three regression : one for female, one for male and one with all. My hypotheses are: Being in a female occupation is more likely if working part-time ; Being in a female occupaation is more likely if having flexible working time; Being in a male occupation is more likely if having high wages; Being in a male occupation is more likely if having high position (with comparison interpretation).

                            Comment


                            • #29
                              I did not want to open a new topic because i´m basicly having the same problem. I´m not sure how to interpret my results of the margins after a logit regression.

                              I used the code:
                              Code:
                              mlogit wechsel $var2
                              margins, dydx(*) post noestimcheck
                              I used post noestimcheck because of the size of the dataset it takes hours to calculate the margins and I had to do alot modells so I wanted to have results.

                              This is the output I recieve with outreg2:

                              Code:
                               
                              (1) (2) (3) (4) (5)
                              VARIABLES LABELS 0b.gender 1.gender age 0b.staat 1.staat
                              1bno._predict 0.000 0.000
                              (0.000) (0.000)
                              2o._predict 0.000 0.000
                              (0.000) (0.000)
                              3o._predict 0.000 0.000
                              (0.000) (0.000)
                              4o._predict 0.000 0.000
                              (0.000) (0.000)
                              5o._predict 0.000 0.000
                              (0.000) (0.000)
                              1bn._predict 0.001 0.002*** 0.034***
                              (0.002) (0.000) (0.003)
                              2._predict 0.010*** -0.001*** -0.016***
                              (0.001) (0.000) (0.002)
                              3._predict -0.007*** -0.004*** -0.016***
                              (0.002) (0.000) (0.002)
                              4._predict -0.036*** 0.001*** -0.005***
                              (0.001) (0.000) (0.002)
                              5._predict 0.033*** 0.001*** 0.003
                              (0.001) (0.000) (0.002)
                              The Variable wechsel only has 5 posible outcomes so I have marginal effects for each of the outcomes. But how do I interpret them now ?
                              For example gender:
                              Is the probabiility of being in second class of wechsel 1 % higher for woman than for man ?

                              If this is the interpretation then what is the advantage of multinominal logit compared to a logit regression where i recode wechsel ?

                              Comment


                              • #30
                                Even a small hint where to look to find the correct interpretation method would be very nice. Or would it be more use full to open a new topic ?

                                Comment

                                Working...
                                X