Announcement

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

  • Andrew Musau
    started a topic Wishlist for Stata 18

    Wishlist for Stata 18

    Now that Stata 17 is out, use this thread to request features that you desire for Stata 18.
    sladmin

  • Clyde Schechter
    replied
    Ravindra Muley Your post at @705 has nothing to do with the Wishlist for Stata 18 (which is, in any case, a dead thread because Stata 18 is already released and in wide use.) Please post your question in a new thread and provide an informative title.

    Leave a comment:


  • Andrew Musau
    replied
    Originally posted by Ravindra Muley View Post
    Can you kindly guide on the minimum sample size or observations required to conduct for Boone indicator for measuring competition?
    I have no idea. Please start a new thread with an appropriate title and provide more information about the question. This will help others who might know to respond to you.

    Leave a comment:


  • Ravindra Muley
    replied
    Sir Andrew Musau Can you kindly guide on the minimum sample size or observations required to conduct for Boone indicator for measuring competition?
    Last edited by Ravindra Muley; 22 Feb 2024, 01:37.

    Leave a comment:


  • Allen Buxton
    replied
    Originally posted by Nobuaki Michihata View Post
    To be able to estimate subdistribution hazard ratios with more than two groups and to perform Gray's test with Stata.
    This is a workaround to allow the use of R package cmprsk to do Gray's test (Gray R. J. (1988), A class of K-sample tests for comparing the cumulative incidence of a competing risk, Ann. Stat. 16:1141-1154) from Stata. Stata does the Fine and Gray regression with stcrreg. https://www.statalist.org/forums/for...Here%20is%20an

    Leave a comment:


  • Andrew Musau
    replied
    minyahil alemu, welcome to Statalist. Please ask your question in a new thread and provide additional information on what you want to do, making sure that you have included a brief description of this in the title. See FAQ Advice #12 on how best to pose your question.

    Leave a comment:


  • minyahil alemu
    replied
    Is that possible to analyze VARX on Stata, please?

    Leave a comment:


  • Tom Best
    replied
    Thanks...this helps. For categorical variables, if I assign integer values to the categories, Cohen's d is very similar to the results of stddiff for the examples I have tried (but not identical). I haven't tried to prove it mathematically, but intuitively, I think this is because both are independent of the units/scale of the data, and because the proportion-version of the Mahalanobis distance proposed by Yang and Dalton is formulaically very-similar (if not identical) to the multi-dimensional, continuous-variable version of Cohen's d.

    Thanks again. -Tom
    Last edited by Tom Best; 12 May 2023, 11:05.

    Leave a comment:


  • Leonardo Guizzetti
    replied
    Originally posted by Tom Best View Post
    Thank you Leonardo Guizzetti ,

    The stddiff I am referring to is by Ahmed M. Bayoumi at the University of Toronto, available here: https://ideas.repec.org/c/boc/bocode/s458275.html . It uses the methods summarized in the following paper for both continuous and categorical variables:
    Yang DS, Dalton JE. A Unified Approach to Measuring the Effect Size Between Two Groups Using SAS. SAS Global
    Forum 2012. Paper 335
    This link, found via Google Scholar, worked for me: https://citeseerx.ist.psu.edu/docume...46a391c255581b
    When I type ssc describe stddiff into the Stata command line, information does appear for me...but not for you?
    For standardized differences between 2 groups for a continuous variable, stddiff is a wrapper for esize twosample when the user wants to see Cohen's d or Hedge's g.

    But I am most interested in sample-size-independent standardized differences between counts-per-category of an unordered categorical variable (e.g., differences between counts-per-category across two groups of respondents, where each category is a self-reported race/ethnicity or an aggregation of multiple subcategories of self-reported race/ethnicity). I often desire to display such standardized differences alongside chi-squared or Fisher's exact p-values. Collectively, I am under the impression that they give some quick but imperfect sense of whether the null-hypothesis of no-difference-between groups is supported, and of the magnitude of any difference between the two samples' distributions.

    In the Yang and Dalton paper above, the use of the Mahalanobis distance measure (i.e., the square root of Hotelling' T2 statistic) for standardized differences between multinomial proportions, coupled with the nice "Interpretation" section, are enticing in their brevity and similarity to the large-sample theory for comparing two group's proportions using a pooled covariance matrix. However, I cannot find peer-reviewed published work that comments on the appropriateness of using this multinomial proportion version of the Mahalanobis distance for this purpose. Despite it's hundreds of citations and intuitive nature, the Yang and Dalton article does not give such comments, and uses an unpublished (and unavailable, at least to me) 2008 work by Dalton as citation/justification. Are you aware of such peer-reviewed published work, or related reading about alternatives? Given all this, what are the chances of making such commands more readily accessible with improved documentation in future versions of Stata?

    Thank you,

    Tom
    Thanks for the link for -stddiff-. Indeed, I couldn't see it by searching for it. In the following example, I show how -esize- can give you the same effect size as for -stddiff-. -esize- has been around since at least Stata 16. Beyond that I don't have much to add as I tend not to use these sorts of effect sizes much.

    Code:
    . webuse population
    . stddiff age, by(sex)
    
    ------------------------------------------------------------------------------
                 |       sex=Female        |        sex=Male         |
                 | Mean or N     SD or (%) | Mean or N     SD or (%) |  Std Diff
    -------------+-------------------------+-------------------------+------------
             age |     36.37        9.4611 |     36.97        9.5298 |   -0.06312
    ------------------------------------------------------------------------------
    
    . esize twosample age, by(sex)
    
    Effect size based on mean comparison
    
                                   Obs per group:
                                          Female =        712
                                            Male =        288
    ---------------------------------------------------------
            Effect size |   Estimate     [95% conf. interval]
    --------------------+------------------------------------
              Cohen's d |  -.0632182    -.2001015    .0736969
             Hedges's g |  -.0631706    -.1999511    .0736415
    ---------------------------------------------------------

    Leave a comment:


  • Tom Best
    replied
    Thank you Leonardo Guizzetti ,

    The stddiff I am referring to is by Ahmed M. Bayoumi at the University of Toronto, available here: https://ideas.repec.org/c/boc/bocode/s458275.html . It uses the methods summarized in the following paper for both continuous and categorical variables:
    Yang DS, Dalton JE. A Unified Approach to Measuring the Effect Size Between Two Groups Using SAS. SAS Global
    Forum 2012. Paper 335
    This link, found via Google Scholar, worked for me: https://citeseerx.ist.psu.edu/docume...46a391c255581b
    When I type ssc describe stddiff into the Stata command line, information does appear for me...but not for you?
    For standardized differences between 2 groups for a continuous variable, stddiff is a wrapper for esize twosample when the user wants to see Cohen's d or Hedge's g.

    But I am most interested in sample-size-independent standardized differences between counts-per-category of an unordered categorical variable (e.g., differences between counts-per-category across two groups of respondents, where each category is a self-reported race/ethnicity or an aggregation of multiple subcategories of self-reported race/ethnicity). I often desire to display such standardized differences alongside chi-squared or Fisher's exact p-values. Collectively, I am under the impression that they give some quick but imperfect sense of whether the null-hypothesis of no-difference-between groups is supported, and of the magnitude of any difference between the two samples' distributions. These are nice for "Table 1 type" displays with data on many categorical and continuous variables by group.

    In the Yang and Dalton paper above, the use of the Mahalanobis distance measure (i.e., the square root of Hotelling' T2 statistic) for standardized differences between multinomial proportions, coupled with the nice "Interpretation" section, are enticing in their brevity and similarity to the large-sample theory for comparing two group's proportions using a pooled covariance matrix. However, I cannot find peer-reviewed published work that comments on the appropriateness of using this multinomial proportion version of the Mahalanobis distance for this purpose. Despite it's hundreds of citations and intuitive nature, the Yang and Dalton article does not give such comments, and uses an unpublished (and unavailable, at least to me) 2008 work by Dalton as citation/justification. Are you aware of such peer-reviewed published work, or related reading about alternatives? Given all this, what are the chances of making such commands more readily accessible with improved documentation in future versions of Stata?

    Thank you,

    Tom
    Last edited by Tom Best; 12 May 2023, 09:38.

    Leave a comment:


  • Leonardo Guizzetti
    replied
    Originally posted by Tom Best View Post
    Does Stata 18 provide standardized mean differences more readily in very basic commands like tabulate and ttest ? Maybe I am missing something, but is the user-created stddiff package the best available option?
    Would you be looking for -esize- ? There are many types of standardized mean differences, so this may be why you haven't found a command that suits your needs.

    Also note, there is no -stddiff- user-contributed package on SSC. Would you mind providing a source for this?

    Leave a comment:


  • Tom Best
    replied
    Does Stata 18 provide standardized mean differences more readily in very basic commands like tabulate and ttest ? Maybe I am missing something, but is the user-created stddiff package the best available option?

    Leave a comment:


  • Niels Henrik Bruun
    replied
    Otherwise, one can use -estimates table- or -estout-. Yet another solution is to select what you want from the return matrix r(table) into your matrix.

    Leave a comment:


  • daniel klein
    replied
    Originally posted by Bruce Weaver View Post
    Jeff Grogger, re your second example in #689, it seems to me that -more- as a prefix command might be more consistent with other Stata commands. E.g.,

    Code:
    more: reg y treatment x1-x475, robust

    That's a simple wrapper:

    Code:
    *! version 1.0.0  26apr2023
    program set_more_on
        
        version 17
        
        gettoken colon zero : 0 , parse(":") quotes
        if (`"`colon'"' == ":") local 0 : copy local zero
        
        local more_was `c(more)'
        
        nobreak {
            
            set more on
            
            capture noisily break version `= _caller()' : `0'
            local rc = _rc
            
            set more `more_was'
            
        }
        
        exit `rc'
        
    end
    Example:

    Code:
    set_more_on : reg y treatment x1-x475, robust

    Leave a comment:


  • Jeff Grogger
    replied
    Bruce Weaver That would work too.

    Leave a comment:

Working...
X