Announcement

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

  • How to generate new variable that only contains the right atrial volume index (RAVI) of males

    Hey everyone,

    I would like to generate a new variable that is continous and only contains the measurements of males.
    I tried:

    gen RAVI_males = RAVI & female_sex ==0

    However, this just gives me a binary variable with 1=male and 0=female.

    However, I want a variable that has the RAVI''s of only males.


    Any help is appreciated!

  • #2
    Figure it out. I used the following:

    gen RAVImales = RAVI
    replace RAVImales =. if Female_sex==1

    Comment


    • #3
      I'm not certain of what your dataset looks like, but you could try something like the following.
      Code:
      clonevar RAVI_males = RAVI if female_sex == 0
      And edit the variable label.

      Comment


      • #4
        Originally posted by Rajiv Rama View Post
        Figure it out.
        Okay; didn't see your post before I replied.

        Comment


        • #5
          Ah thanks Joseph, that would also have worked

          Comment

          Working...
          X