09-21-2021 07:57 AM
Hi all, is anyone using the Flex Index's ControlHours metric from the R package? I am really interested in understanding how it's calculated.
Solved! Go to Solution.
09-21-2021 08:08 AM
ControlHours is a binary variable which gets 'TRUE' whenever the Day_Span is less than or equal to the difference between the official finishing hour and the official starting hour supplied in the function argument. Day_Span is a computed intermediary variable code that calculates the the difference between first and last active hour of the day (much like a day-version of Work Week Span - see wpa/flex_index.R at main · microsoft/wpa (github.com)).
For example, if my official starting time is 9 am and end time is 6 pm, my official hours would be 9 hours; I will get `ControlHours == FALSE` if my day span exceeds those 9 hours in the week, and vice versa.
09-21-2021 08:08 AM
ControlHours is a binary variable which gets 'TRUE' whenever the Day_Span is less than or equal to the difference between the official finishing hour and the official starting hour supplied in the function argument. Day_Span is a computed intermediary variable code that calculates the the difference between first and last active hour of the day (much like a day-version of Work Week Span - see wpa/flex_index.R at main · microsoft/wpa (github.com)).
For example, if my official starting time is 9 am and end time is 6 pm, my official hours would be 9 hours; I will get `ControlHours == FALSE` if my day span exceeds those 9 hours in the week, and vice versa.