Announcement

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

  • Methods that adjust existing tests to account for clustering

    Hi All,

    I've recently read an interesting paper on how to analyse clustered data (A Study of Clustered Data and Approaches to Its Analysis) by Galbraith et al.

    In one of the sections "Approach D: Methods that explicitly account for clustering" the paper alludes to pre-existing univariate tests that can be modified to analyse clustered data. I was wondering whether these modified tests were available in Stata commands or not. I've done some searching and thus far found limited information on analysing clustered data this way using Stata.

    For you reference the whole paper can be found here: http://www.jneurosci.org/content/30/32/10601.long#T3

    Kind Regards,

    Rob.

  • #2
    Rob:
    thanks for providing the link to the article.
    As far as I know, -help cluster- can give you some guidances on the desired topic.
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Hi Carlo,

      Thanks for your response. Help cluster seems to focus on cluster analysis, whereas I want to perform analysis while taking into account clusters within my data. I know how to perform GEEs and GLMs, but for univariate tests the paper I alluded to suggests there are modified versions of the t-test etc. to account for clustered data.

      I was simply wondering whether these modified tests already exist in Stats or whether I may have to write own program. (I thought there was no point inventing the wheel if possible!)

      Thanks,

      Rob.

      Comment


      • #4
        since any t-test can be reproduced with the appropriate regress command, why not just use regress and the appropriate cluster option? see, e.g., "help regress" for the options available

        Comment


        • #5
          That is a perfectly valid answer, however for univariate tests such as the Mann-Whitney U test and Chi squared test, I wouldn't be able to use the regress command.

          Thanks,

          Rob.

          Comment


          • #6
            for the chi-squared test: if you have one variable as the dependent variable, you can use logistic (if binary) or one of its relatives if not - and then use the appropriate cluster option

            for the Mann-Whitney - sorry, I don't know of a "cluster" version - however, if you explain what you are trying to do, maybe someone can come up with something that is, at least, an approximation

            Comment


            • #7
              Originally posted by Rob Wood View Post
              That is a perfectly valid answer, however for univariate tests such as the Mann-Whitney U test and Chi squared test, I wouldn't be able to use the regress command.
              You might be looking for the series of "extended Mantel-Haenszel" (a.k.a., "Cochran-Mantel-Haenszel") methods. They're in the user-written command emh, which you can install directly from within Stata from the SSC repository. For the Mann-Whitney test, use emh <outcome variable> <treatment group variable>, anova transformation(modridit) strata(<cluster identifier variable>), and for the chi-square test, use emh <column or row variable> <row or column variable> [fweight=<count variable>], general strata(<cluster identifier variable>).

              The help file for emh refers you to another user-written command, somersd, which can perform some nonparametric tests and has a cluster() option, and so you might want to take a look at that, too.

              I agree with the others, though—if your looking for "modified versions of the t-test" just to handle clustered data, then regress (among several other official Stata commands) is what you're looking for.

              Comment


              • #8
                Thank you all for your responses.

                In a nutshell, I know how to perform multivariate analysis taking into account clusters, but wanted to know if there were ways to account for clustering in univariate tests. I know I can perform univariate regressions accounting for clustering, but I was wondering whether there existed specific commands to perform univariate analysis accounting for clustering.

                I shall give the responses above a go and see how I get on.

                Thanks again,

                Rob.

                Comment

                Working...
                X