I have a data set with the following variables: 1. Group 2. Status (Takes on variables 1-7)
I need to create a flag where the following conditions are met: -Flag 1=0 when Status <6, else Flag 1= 1 when Status >=6 -Within each group: If Status has reached 6 or higher and goes back down to below 6, the flag 1 must remain as 1.
The desired table would look as follows:
