Announcement

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

  • Reorganising data for -ranksum- test

    I wish to use the
    HTML Code:
     -ranksum-
    command. My data are in the current format:

    HTML Code:
         +-------------------------------------------+
         | SkinT~d0   SkinT~d6   SkinT~d8   Skin~d10 |
         |-------------------------------------------|
      1. |     26.4         27       29.4       36.1 |
      2. |     49.7          .          .          . |
      3. |     60.4          1          .       13.6 |
      4. |     17.2       14.2       14.2        8.3 |
      5. |     34.4       26.6       15.4       51.5 |
         |-------------------------------------------|
      6. |        .          .          .          . |
      7. |        .          .          .          . |
      8. |     24.8          .       37.9       53.3 |
      9. |     16.6       88.2       81.2       47.9 |
     10. |      5.3        1.8        4.7        1.2 |
         |-------------------------------------------|
     11. |     16.6        2.4        3.6        4.1 |
     12. |        .       78.1       75.1       29.6 |
     13. |        .          .          .          . |
     14. |     29.6       30.2       49.1       13.6 |
     15. |     27.8       10.7        5.9       14.2 |
         +-------------------------------------------+
    I would like the values of the second variable (SkinT~d6) to be placed immediately after the first variable (SkinT~d0) and a binary variable to indicate which group the values belong to. I would be grateful for any advice on how to do this.

  • #2
    Possibly you see a reshape

    Code:
    help reshape
    but you need an identifier variable first.

    Comment


    • #3
      Sara:
      -help stack- might be what you're looking for.
      PS: crossed in the cyberspace with Nick's reply, who interestingly highlights a different approach.
      Kind regards,
      Carlo
      (Stata 19.0)

      Comment

      Working...
      X