create a new dummy variable "night work shift".


I want to create a new dummy variable “night shift work” (if the respondents have more than 4h work between 7pm and 7am, then they has night shift work). How should I do that? Could you please give me some suggestions?

Here is the method I tried. I tried to find out the respondents who works between 7pm-7am at first. So, in ATUS-X, I created my new time variable-“work” with a time restriction “4am-7am” and “7pm-4am”. In the dataset, under the variable “work in 4am-7am”(or “work in 7pm-4am” variable), there are several values, such as 0 or 1 or 12 or 89, etc. I don’t understand what do these number mean at here. And there’s no information about the value description in the codebook.

You can ignore my method if mine is too complicated.

Thank you very much.

I appreciate your help.



The values for your created Time Use variables correspond to the number of minutes the respondent spent on that activity (work) within the chosen timeframe. In other words, the “work in 4am-7am” variable can have values from 0 minutes to 180 minutes and the “work in 7pm-4am” variable can have values from 0 minutes to 540 minutes.

Since you are trying to determine if a respondent has more than 4 hours of work between 7pm and 7am, you will want to sum the number of minutes in both of your created Time Use variables. If this sum is greater than 240 minutes (= 4 hours), then you should flag them as working a night shift.

Hope this helps.