wpa icon indicating copy to clipboard operation
wpa copied to clipboard

Discussion: person-averaging for `flex_index()` components

Open martinctc opened this issue 3 years ago • 1 comments

Problem

When calculating the components for the Flexibility Index in flex_index() , i.e. TakeBreaks, ControlHours, and ChangeHours, the current "table" return calculates the percentages per org without person averaging. This means that the interpretation of the outputs would be,

x % of work weeks in Org A involve habitual breaks being taken.

Whilst this output is simple to understand/interpret, it is inconsistent with other functions in the package, e.g. create_bar(), where the person-averaging approach is always used. This means that an average for the person is first calculated, and that average for the org is then re-calculated using those person-averages.

Solution

The alternative output is for the "table" return to calculate the percentages per org using person averaging. The interpretation would then become:

On average, employees in Org A take breaks y % of the time.

Possible solutions

There are three possible options:

  1. Stick to the current method without person-averaging.

  2. Apply the new person-averaging method, replacing the old calculation. Note that this will be a breaking change to the package, and users will need to manipulate on the "data" output themselves to reproduce old calculations.

  3. Enable both options with an additional argument, such as "pavg" which can either be set to TRUE or FALSE. Alternatively, we can allow an additional return option of "table-pavg", which will calculate the table with person averaging. This may increase the complexity of the function, but will offer the largest range of flexibility (!) to the user.

Would love to hear any additional feedback on this proposed change.

martinctc avatar Apr 30 '21 13:04 martinctc