Announcement

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

  • Doubts on interpreting my glm coeffcients

    Dear all,

    I want to verify if I'm interpreting my glm model right. I have a dependent variable, in percentage, (the percentage of the country i population which gave money to charity in 2010, i=1,...,44) and independent variables also measured in percentages (e.g. percentage of the country i population that feels happy).
    I used a glm model

    You can see my dataset using:


    Code:
    dataex givingmoney Souci_humankind_much tolerance_at_home_mentioned Justifyied_cheat_tax_never Unemployed_should_take_any_job Do_you_consider_you_religious past_frequence_week_month q11_how_satisfied_with_life_very

    Code:
    input float(givingmoney Souci_humankind_much tolerance_at_home_mentioned Justifyied_cheat_tax_never Unemployed_should_take_any_job Do_you_consider_you_religious past_frequence_week_month q11_how_satisfied_with_life_very)
    Code:
    .27 11.83 55.74 48.2 59.5 90.8 9.48 34.97
    .69 10.88 68.72 56.71 55.95 63.88 58.7 61.1
    .06 17.43 66.87 62.26 33.04 88.71 31.55 28.28
    .4 10.31 82.24 40.25 53.95 57.79 67.22 63.86
    .29 10.84 58.13 73.55 39.57 94.82 50.03 50.6
    .18 12.15 65.21 68.11 55.15 61.15 11.35 30.47
    .11 14.08 63.87 27.68 39.02 31.78 11.92 28.56
    .26 10.97 70.21 58.16 43.72 83.61 75.09 53.11

    I'm using the glm command:
    Code:
    glm givingmoney Souci_humankind_much tolerance_at_home_mentioned Justifyied_cheat_tax_never Unemployed_should_take_any_job Do_you_consider_you_religious past_frequence_week_month q11_how_satisfied_with_life_very ,  family(binomial) link(logit) robust


    I verified my resid :
    Code:
    ovfplot
    and
    Code:
    rvfplot2, yline(0)
    and I want to interpret the effect of my independent variables:
    I used
    Code:
    mfx
    .

    How do I interpret these figures? As I'm using a link(logit) it should be : one unit increase in my independent variable causes a exp(coefficient value) change (odds ratio) in the dependent variable. However,how a one unit change in a independent variable in % should be interpreted? a 1% increase in the independent variable causes exp(coefficient)% in the dependent variable?

    Thank you





  • #2
    It seems the DV is not in percentage, for it is a proportion. But the IVs are shown in percentages. You didn’t provide the output, but I gather the interpretation would probably take an increase in 1% of the IV to be associated with a change in # percentage points of the DV. Margins and marginsplot are helpful as well.
    Best regards,

    Marcos

    Comment


    • #3
      Code:
      glm givingmoney Souci_humankind_much tolerance_at_home_mentioned Justifyied_adultery Unemployed_should_t
      > ake_any_job Do_you_consider_you_religious past_frequence_week_month why_people_in_need_unlucky q8_5 q11_
      > how_satisfied_with_life_very ,  family(binomial) link(logit) robust
      note: givingmoney has noninteger values
      
      Iteration 0:   log pseudolikelihood =  -16.66969
      Iteration 1:   log pseudolikelihood = -16.554162
      Iteration 2:   log pseudolikelihood = -16.554126
      Iteration 3:   log pseudolikelihood = -16.554126
      
      Generalized linear models                          No. of obs      =        44
      Optimization     : ML                              Residual df     =        34
                                                         Scale parameter =         1
      Deviance         =  2.122978712                    (1/df) Deviance =  .0624406
      Pearson          =  2.145369357                    (1/df) Pearson  =  .0630991
      
      Variance function: V(u) = u*(1-u/1)                [Binomial]
      Link function    : g(u) = ln(u/(1-u))              [Logit]
      
                                                         AIC             =  1.207006
      Log pseudolikelihood = -16.55412626                BIC             = -126.5395
      
      --------------------------------------------------------------------------------------------------
                                       |               Robust
                           givingmoney |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
      ---------------------------------+----------------------------------------------------------------
                  Souci_humankind_much |   .0006955   .0096602     0.07   0.943    -.0182381    .0196292
           tolerance_at_home_mentioned |    .000144   .0081629     0.02   0.986    -.0158549     .016143
                   Justifyied_adultery |   .0167571   .0067305     2.49   0.013     .0035655    .0299487
        Unemployed_should_take_any_job |   .0283718   .0097493     2.91   0.004     .0092634    .0474801
         Do_you_consider_you_religious |  -.0138382   .0060726    -2.28   0.023    -.0257402   -.0019362
             past_frequence_week_month |    .013365   .0041612     3.21   0.001     .0052093    .0215208
            why_people_in_need_unlucky |  -.0125862   .0180596    -0.70   0.486    -.0479824      .02281
                                  q8_5 |  -.0407581   .0213375    -1.91   0.056    -.0825787    .0010626
      q11_how_satisfied_with_life_very |   .0433576   .0080953     5.36   0.000     .0274911    .0592241
                                 _cons |  -4.115413   1.203707    -3.42   0.001    -6.474635   -1.756191
      --------------------------------------------------------------------------------------------------
      Sorry for not sharing the results. So, if I have these coefficients, how should I interpret them ? e.g. an increase of 1% in "q11_how_satisfied_with_life_very" implies exp (0,043)=1,04 - so 4%- increase in my DV?
      Regarding the proportions or percentages, how do I know if I'm talking about one or other? my DV is between 0 and 1.

      I used the margins like the following. How should I interpret my model? the exp(coefficients) are not the same of the margins command results.

      Code:
      margins, dyex(_all)
      
      Average marginal effects                          Number of obs   =         44
      Model VCE    : Robust
      
      Expression   : Predicted mean givingmoney, predict()
      dy/ex w.r.t. : Souci_humankind_much tolerance_at_home_mentioned Justifyied_adultery
                     Unemployed_should_take_any_job Do_you_consider_you_religious past_frequence_week_month
                     why_people_in_need_unlucky q8_5 q11_how_satisfied_with_life_very
      
      --------------------------------------------------------------------------------------------------
                                       |            Delta-method
                                       |      dy/ex   Std. Err.      z    P>|z|     [95% Conf. Interval]
      ---------------------------------+----------------------------------------------------------------
                  Souci_humankind_much |    .002113   .0293589     0.07   0.943    -.0554294    .0596554
           tolerance_at_home_mentioned |   .0019295   .1093707     0.02   0.986    -.2124331    .2162921
                   Justifyied_adultery |   .1853545   .0728582     2.54   0.011     .0425551     .328154
        Unemployed_should_take_any_job |   .2592745   .0912705     2.84   0.005     .0803876    .4381614
         Do_you_consider_you_religious |  -.1759145   .0734185    -2.40   0.017    -.3198122   -.0320169
             past_frequence_week_month |   .1236224   .0384032     3.22   0.001     .0483534    .1988913
            why_people_in_need_unlucky |  -.0367728   .0524393    -0.70   0.483    -.1395519    .0660063
                                  q8_5 |  -.1358831    .071117    -1.91   0.056    -.2752699    .0035036
      q11_how_satisfied_with_life_very |   .4410024   .0771725     5.71   0.000      .289747    .5922578
      --------------------------------------------------------------------------------------------------
      Thank you
      (Obrigado Marcos! Abraços, Marcelo)
      Last edited by marcelo ribeiro; 26 May 2019, 07:29.

      Comment


      • #4
        When a variable goes from 0 to 1, such as this DV, it is a proportion. If it goes from zero to 100 it is a percentage.

        The margins command you selected is a semielasticity, but the IVs are already in percentage, hence I fail to see any advantage compared to the regular (dy/dx) output.

        To end , I don’t know whether it was just a toy example, but if the sample size is 44, it may be rather small.
        Best regards,

        Marcos

        Comment


        • #5
          Thank you for your answer Marcos.
          I saw the stata manual on margins and marginsplot, but this command just works for categorical IVs, what's not my case.However, could I keep with the interpretation: increase of 1% in my IV (e.g.
          q11_how_satisfied_with_life_very
          ) implies increase of exp(coefficient) % in my DV? If not, could you please give me an example how to interpret .
          Besides VIF test and linkstest checking residuals, can I use the OLS R^2 as an informal indicator of this model? Or how can I find a similar R^2 for glm?
          Unfortanetely the information for my IVs are availabe just for the 44 obs of the DV. Should I gave up on this model because of its size or how can I fix it?

          Thank you!
          Kind regards,

          Marcelo

          Comment


          • #6
            With regards to - margins - , it is not true that "this command just works for categorical IVs".

            Please see some examples with - at() - under - margins - command.

            Theoretically speaking, I gather the interpretation in #3 would be "an increase in 1% of this variable X would increase the DV in 4.3 percentage points.

            In general, 9 predictors for 44 observations seem too much and the significant results may be due to overfitting.

            With regards to the study design, it is far from my field, and I believe you should discuss with your supervisor/professor.

            In spite of the topic being far from my field, I had the impression there might be, potentially, some sort of ecological fallacy as well as overfitting.

            Best regards,

            Marcos

            Comment


            • #7
              Good afternoon Marcos,

              Thank you very much for your insights and answers, they were very helpful.

              Kind regards,
              Marcelo

              Comment

              Working...
              X