Hi everyone,
I have a mock data that collect in 3 years: 2002, 2003 2005.
Variables are: fd, cl, hs, hl, all coded to 1 (yes) or 0 (no); with sub_id.
data test;
input id $ fd cl hs hl 2002 2003 2005;
datalines;
1 1 1 0 . 1 0 0 . 1 1 0 1
2 1 0 1 1 0 0 1 1 1 0 1 1
3 1 . 0 0 1 . 0 0 1 1 . 0
5 1 1 1 0 0 1 1 1 . 1 0 0
...
;
run;
I want to have outcomes as below:
a) Highly severe: In EACH surveyed year, if a subject responded "yes" to ALL fd, cl, hs, hl.
b) Severe: In EACH surveyed year, if a subject responded "yes" at least TWO-THREE to fd, cl, hs, hl.
c) Moderate: In EACH surveyed year, if a subject responded "yes" at least ONE to fd, cl, hs, hl.
d) Mild: In ANY surveyed year, if a subject responded "yes" at least ONE to fd, cl, hs, hl.
e) None: In EACH surveyed year, if a subject responded "no" to ALL fd, cl, hs, hl.
Also, the data step, should I do them in wide data or long data.
Much appreciate for your help.
Phan S.
... View more