Flexibility Index in R Package

Jade_Washington
New Contributor
New Contributor

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.

1 ACCEPTED SOLUTION

Peter_Baker
Valued Contributor II
Valued Contributor II

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.

View solution in original post

1 REPLY 1

Peter_Baker
Valued Contributor II
Valued Contributor II

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.

Recommendations for you