Announcement

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

  • How do you combine categorical and numerical variables?

    How can I combine variables?

    These variables all refer to use of prescription benzodiazepines:

    valium
    ativan
    benzo_other

    The variables are categorical:
    - More than once per day
    - Once per day
    - A few times per wee
    - Weekly or less
    - Monthly or less
    - I haven't taken this

    Because sample sizes are so small, I'd like to combine these variables to ONE variable on benzodiazepine use.

    Could you please help me with a code or command?

    I also have numerical variables I'd like to combine

  • #2
    Welcome to Statalist!

    This question is not easy to answer because the formats of the variable are not clear. Approach can be different if a variable is numeric with a label, or is a character-based string variable. Please take some time to carefully read the FAQ (http://www.statalist.org/forums/help), and then use -dataex- to provide some sample data (they don't need to be real data, they just need to be formatted the same way as your real data.)

    If you do that, it may increase the chance of getting some useful answers or codes.

    Comment


    • #3
      Originally posted by Shima Shakory View Post
      Because sample sizes are so small, I'd like to combine these variables to ONE variable . . .
      Ken has given good recommendations, but I'm curious as to what sample size has to do with the need to reformat the indicator variables into a single nominal categorical variable. I don't see the connection.

      Comment


      • #4
        single nominal categorical variable → single ordered categorical variable

        Comment

        Working...
        X