Hi 🙂 I want to create a conditional variable (outcome) based on accident_id and road_user_type: - if anyone in an accident was a vulnerable road user > then outcome = 1; - else if everyone in an accident was a MVO > then outcome = 2; - else outcome = 3. Please help 🙂 dataset have; Accident_ID Road_user_type 1 Vulnerable 1 MVO 1 . 2 . 2 MVO 3 MVO 3 MVO 3 MVO dataset want; Accident_ID Road_user_type Outcome 1 Vulnerable 1 1 MVO 1 1 . 1 2 . . 2 MVO . 3 MVO 2 3 MVO 2 3 MVO 2
... View more