Emily
2018-05-17 21:48:14 UTC
Alright y'all, I need to create a newvar, let's call it "Identity". The variable is whether survey respondents are cancer survivors, cancer caregivers, or folks who have been both a cancer survivor and caregiver. The way the data is recorded it's currently three categories (Survivors, Caregivers, or Boths), but I need TWO categories: 1) All Survivors and 2) All Caregivers.
The original data as is:
Group
1 = Survivors
2 = Caregivers
3 = Both Survivor and Caregiver
To be clear: some respondents are ONLY Survivors, some ONLY caregivers, and then a third group of people who identity as being BOTH survivors and caregivers. What I need:
NewVar
1 = "All Survivors"
2 = "All Caregivers"
To clarify a bit more, I'll give some hypothetical n's... let's say Survivors n = 50, Caregivers n = 40, and Boths n = 20. So ALL SURVIVORS would be n = 70, and ALL CAREGIVERS would be n = 60.
I need to combine 1 AND 3 for the first category, and 2 AND 3 for the second category. I think the code will look something like this:
COMPUTE Identity=. (???)
IF (Group = 1 AND 3) Identity = 1.
IF (Group = 2 AND 3) Identity = 2.
VALUE LABELS Identity
1 "All Survivors"
2 "All Caregivers".
FREQUENCIES VARIABLES=Identity
Any help appreciated!!!
The original data as is:
Group
1 = Survivors
2 = Caregivers
3 = Both Survivor and Caregiver
To be clear: some respondents are ONLY Survivors, some ONLY caregivers, and then a third group of people who identity as being BOTH survivors and caregivers. What I need:
NewVar
1 = "All Survivors"
2 = "All Caregivers"
To clarify a bit more, I'll give some hypothetical n's... let's say Survivors n = 50, Caregivers n = 40, and Boths n = 20. So ALL SURVIVORS would be n = 70, and ALL CAREGIVERS would be n = 60.
I need to combine 1 AND 3 for the first category, and 2 AND 3 for the second category. I think the code will look something like this:
COMPUTE Identity=. (???)
IF (Group = 1 AND 3) Identity = 1.
IF (Group = 2 AND 3) Identity = 2.
VALUE LABELS Identity
1 "All Survivors"
2 "All Caregivers".
FREQUENCIES VARIABLES=Identity
Any help appreciated!!!