Announcement

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

  • Kappa and Gini index from mlogit coefficients

    Dear Statalister,

    I will try to be short and concise, since I just need to know if some commands are available. I read in the forum other questions close to mine, but the answers were not applicable to my case.

    I am studying class voting through ESS data, and I need to compute kappa and Gini indexes to estimate the intensity of class differences in voting parties. Firstly, I performed a multinomial logistic model, with party voted (5 categories) as dependent variable and social class (8 categories) as independent one (plus several covariates). I used "margins" command to compute average marginal effects, in order to understand the class basis of vote. Now I need a measure to assess how much the various social classes differ in voting the different parties: according to the literature, I can use both kappa and Gini indexes. This will be useful in order to compare different models with different covariates and/or intervening variables. I tried to be very synthetic in the explanation of my work, now just one questions is in order.

    I tried to use several Stata packages ("ineqdeco", "ginidesc", "kap"), but they all seem to not offer the chance to compute the indexes through regression coefficients. Therefore, before starting to compute everything "by hand", I would ask: do You know any package or option which can allow me to get these indexes from mlogit regression coefficients and/or marginals?
    I really hope that this is a simple and not wasting-time question for You, since I am just searching for the best Stata command.


    I am sorry to not share my results, but, as You can imagine, I should copy and paste too many values.

  • #2
    I find it hard to imagine what you actually want to do (or, frankly, why would do so -- but I admit I do not know "the literature" that you are implicitly referring to). However, if I take you literally, as when you refer to
    compute the indexes through regression coefficients
    :

    Suppose you have a set of estimated coefficients stored in e(b), and you want to calculate a Gini coefficient to summarize differences across a subset of those coefficients.
    * extract from e(b) a new matrix containing the desired coefficients
    * use -svmat- to save the new matrix to new variable(s) in the current dataset
    * apply -ineqdec0- to the newly-created variables to get a Gini coefficient. I say -ineqdec0- because it allows values <= 0. (-ineqdeco- works with values > 0.)
    * apply -kappa- analogously

    Comment


    • #3
      Thank you very much, what You proposed is exactly what I should do.
      Anyway, I never used coef matrix before, and I do not find anything about how to create a matrix selecting only the coeff I need. Indeed, I have many coeff concerning covariates, but I need to focus only to the 6x8 ones concerning social classes.

      Comment


      • #4
        Look at the results from

        Code:
        help matrix extraction
        and, more generally,

        Code:
        help matrix
        -help- and -search- are your friends; keep in contact with them -- often.

        Comment

        Working...
        X