Announcement

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

  • Update to -dstat-: various additional statistics supported

    Thanks to Kit Baum, an update to dstat is available from SSC. To obtain the update, type
    Code:
    . ssc install dstat, replace
    or use the adoupdate command.

    I fixed a number of bugs and made various additions to dstat summarize:
    • group-decomposition for inequality measures (within and between MLD/Theil/generalized entropy; between Gini, across groups average Gini/MLD/Theil/generalized entropy)
    • additional rank correlation measures (Kendall's tau-a, tau-b, Somers' D, Krukal's gamma)
    • diversity indices for categorical data (Herfindahl–Hirschman index, Gini impurity, Shannon entropy, Hill numbers, Rényi entropy)
    • association measures for categorical data (mutual information index, uncertainty coefficient/H index, Cramér's V, Duncan's D)
    As usual, all statistics come with influence-function based standard errors.
    ben

  • #2
    Thank you very much for this update Ben, dstat is much appreciated!

    For those who use asdocx, note that asdocx - while running your do-script - allows exporting the result figure created with dstat to Word (docx).
    This is now also possible with some of the other packages of Ben: coefplot, heatplot (hexplot) and reldist.
    http://publicationslist.org/eric.melse

    Comment


    • #3
      Dear Ben Jann thank you for the updated -dstat-. I installed it and tried to run examples. However, there's some wrong. Could you help me out? I have Stata/SE 16. Thank you.
      Code:
      . which dstat.ado
      c:\ado\plus\d\dstat.ado
      *! version 1.2.6  05dec2021  Ben Jann
      
      . sysuse nlsw88, clear
      (NLSW, 1988 extract)
      
      .
      . dstat (mean gmean median trim5 winsor5 huber95 hl) wage, over(union)
      class mm_density undefined
      (4884 lines skipped)
      (error occurred while loading dstat.ado)r(3000);

      Comment


      • #4
        Dear Chan,

        I tried the same example and on my system it runs fine:
        Code:
        Summary statistics                Number of obs   =      1,878
        
                    0: union = Nonunion
                    1: union = Union
        
        --------------------------------------------------------------
                wage | Coefficient  Std. err.     [95% conf. interval]
        -------------+------------------------------------------------
        0            |
                mean |   7.204669   .1090065      6.990882    7.418455
               gmean |   6.262381   .0875045      6.090764    6.433997
              median |   6.191625   .1122608      5.971456    6.411794
               trim5 |   6.817126   .1026971      6.615713    7.018538
             winsor5 |   7.037521   .1068814      6.827902     7.24714
             huber95 |   6.654137   .1089403       6.44048    6.867793
                  hl |   6.690819   .1067704      6.481418     6.90022
        -------------+------------------------------------------------
        1            |
                mean |   8.674294   .1942684      8.293289    9.055299
               gmean |   7.841896   .1641179      7.520023    8.163768
              median |    8.05153   .2265019      7.607308    8.495752
               trim5 |   8.309203   .1692544      7.977256    8.641149
             winsor5 |    8.43537   .1748754      8.092399     8.77834
             huber95 |   8.253002   .1645173      7.930346    8.575658
                  hl |   8.272946   .1709531      7.937668    8.608224
        Note that dstat requires the moremata package to be installed on your system (also from Ben).
        Did you install that as well? If not, proceed with:
        Code:
        ssc install moremata
        and try again the example code.
        http://publicationslist.org/eric.melse

        Comment


        • #5
          You could try updating moremata. A similar problem has been reported before: https://www.statalist.org/forums/for...lable-from-ssc

          Martyn

          Comment


          • #6
            Dear Eric and Martyn, thank you very much. I checked my moremata and find that it was installed on 3 Mar 2017. I should update it!

            Comment

            Working...
            X