I realised recently that a longitudinal variable in my dataset (whether people stated they were on furlough after being asked why their working hours were reduced from the previous wave of the study) was coded incorrectly. Right now, the variable is coded as “1” if a respondent reported furlough as the reason for fewer working hours than the last survey wave, and “0" even if a respondent was on furlough but whose working hours did not change from the last survey wave. Therefore, I want to recode this variable so that after the first report of a furlough-related decrease in working hours (“1”), the rest of the data (i.e. the proceeding waves) would also be coded “1". This may be a simple change to execute in R, but I spent a few hours this morning trying if-else statements and dplyr with no success.
TLDR : I would like to recode a variable so that if the variable equals 1 for a specified wave of my longitudinal dataset, it also equals 1 for the rest of the waves of the dataset.
Can I please ask for any suggestions you have for resolving this? Thank you so much!