Announcement

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

  • conducting a Wilcoxon sign rank test within socio demographic variables of paired data analysis

    Hello,
    Just a quick one here.
    Asking on How Can I do a wilcoxon sign ranked test by a 3rd variable (e.g., running a sign rank test on different sociodemographic characteristics like sex, age, nationality, level of income, employment status, e.t,c. ), considering also that i have a paired data, (before and after on same groups and 2 or more categories (like employment status, or income status, nationality). I have done that for the general cohort, now looking on how to stratify within social demographics.
    Thank you

    Hope i was able to put out the question right.

  • #2
    You can use the -bysort- prefix

    Code:
    bysort groupvar: signrank var1=var2

    Comment


    • #3
      Originally posted by Andrew Musau View Post
      You can use the -bysort- prefix

      Code:
      bysort groupvar: signrank var1=var2
      Hello Andrew,
      Thank you so much for your quick respond, just to confirm that i understand the command to give stata,
      Do you mean i run the code for example:
      bysort incomechange: signrank glocuselevelbefore =glocodelevelafter

      Comment


      • #4
        I have to advise that this looks likely to raise more questions than it answers. One Wilcoxon test can sometimes be helpful particularly if you recast it as estimating the probability that values in one group are greater than those in other. Otherwise, what's the strategy here? Tabulating lots of P-values for tests that don't know about each other?

        Why the interest in WIlcoxon any way? Perhaps it runs that your outcome variable is skewed and/or has some outliers, in which case consider working on a transformed scale or using a generalized linear model.

        Comment


        • #5
          Originally posted by Nick Cox View Post
          I have to advise that this looks likely to raise more questions than it answers. One Wilcoxon test can sometimes be helpful particularly if you recast it as estimating the probability that values in one group are greater than those in other. Otherwise, what's the strategy here? Tabulating lots of P-values for tests that don't know about each other?

          Why the interest in WIlcoxon any way? Perhaps it runs that your outcome variable is skewed and/or has some outliers, in which case consider working on a transformed scale or using a generalized linear model.


          yes, the outcome variable is skewed
          I was looking to check for changes in the different socio demographics, for before and after. just to stratify by sociodemographics is the idea
          for example and looking to check for changes in weight gain among adults ( before and after) and want to know the changes across spectrum. outcome variables is skewed of-course

          Comment


          • #6
            If weight gain can be negative, bets are open. Most regression machinery is more tolerant of mild skewness than myth makes out. In any case, at most the ideal condition is that errors are normal, not the data.

            Comment


            • #7
              hello,
              Does anyone know how best to deal with missing values in STATA and how I can go about it.

              Thank you

              Comment


              • #8
                this is a completely different question and belongs in a new topic; in the meantime, (1) see the FAQ for advice on asking questions and (2) see
                Code:
                help mi

                Comment

                Working...
                X