How do I create variable to indicate a binary variable changes from 0 to 1, from year 1 to year 2 in SAS 9.4? My binary variable of interest is manager_fem = 1 if manger is a female and 0 otherwise. Here is the data I have. Company ID Year manager_fem 1234 1 0 1234 2 0 1234 3 1 1234 4 1 4567 1 0 4567 2 1 4567 3 1 4567 4 1 Here is the data I want. Company ID Year manager_fem fem-change 1234 1 0 0 1234 2 0 0 1234 3 1 1 1234 4 1 0 4567 1 0 0 4567 2 1 1 4567 3 1 0 4567 4 1 0 Thank you in advance for any help you provide!
... View more