Hi everyone,
I am trying to find out how to create a variable that shows me that the event "taking over care for a household member" has occured.
The event should only be coded 1 when in interview year 2013 care_hh was coded "0" and in interview year 2015 the variable care_hh was coded "1". Every other possible combination should be coded "0".
Help would be much appreciated.
I am trying to find out how to create a variable that shows me that the event "taking over care for a household member" has occured.
The event should only be coded 1 when in interview year 2013 care_hh was coded "0" and in interview year 2015 the variable care_hh was coded "1". Every other possible combination should be coded "0".
Help would be much appreciated.
Code:
* Example generated by -dataex-. For more info, type help dataex clear input str12 mergeid int int_year float care_hh "AT-000674-01" 2013 . "AT-000674-01" 2015 . "AT-001215-01" 2013 . "AT-001215-01" 2015 . "AT-001492-01" 2013 0 "AT-001492-01" 2015 0 "AT-001492-02" 2013 0 "AT-001492-02" 2015 1 "AT-001881-01" 2013 1 "AT-001881-01" 2015 . "AT-001881-02" 2013 0 "AT-001881-02" 2015 0 "AT-002136-01" 2013 0 "AT-002136-01" 2015 0 "AT-002136-03" 2013 0 "AT-002136-03" 2015 0 "AT-002180-02" 2013 0 "AT-002180-03" 2013 1 "AT-002525-01" 2013 0 "AT-002525-01" 2015 0 "AT-002525-02" 2013 0 "AT-002525-02" 2015 . "AT-002573-01" 2013 0 "AT-002573-02" 2013 0 "AT-002800-01" 2013 . "AT-002800-01" 2015 . "AT-002965-02" 2013 0 "AT-002965-02" 2015 0 "AT-003194-01" 2013 0 "AT-003194-01" 2015 1 "AT-003213-01" 2013 . "AT-003213-01" 2015 . "AT-004855-02" 2013 0 "AT-004855-02" 2015 0 "AT-006788-02" 2013 0 "AT-006788-02" 2015 0 "AT-006788-04" 2013 0 "AT-006788-04" 2015 0 "AT-007144-01" 2013 . "AT-007144-01" 2015 . end label values int_year dkrfna
Comment