Announcement

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

  • Problem with analysing the trend in "Yes" responses in multiple binary variables

    Hi,

    I have 4 binary variables (yes/no) and I need to check if, in general, the same people responded "Yes" across all four binary variables. I can't seem to figure out the command to use for this.

    Thanks in advance!

  • #2
    just sum by row (if id is a row), assuming they are 0/1.

    g all4yes = q1 + q2 + q3 + q4 == 4

    if text,

    g all4yes = (q1=="Yes) + (q2=="Yes) + (q3=="Yes) + (q4=="Yes) == 4
    Last edited by George Ford; 05 Nov 2023, 13:07.

    Comment

    Working...
    X