Moving Averages

Prev Next

Moving Averages are changing values over time that need to be tracked and used to perform some other action. Think of it like a super external variable.

For example, if a diary is getting entered by Participants, a score on each diary needs to get averaged (per Participant). Once that average reaches a specified value, the diary should stop itself from getting deployed to that Participant.

Prerequisite to access moving average definitions

User has access to form builder

Moving average configuration is accessed from within the External Variables screen.

Web browser:

Mobile app:

The parameters to define are as follows:

Form and field - Identify which field needs to be tracked over time (should be number-based field)

Prior Records - How many of the latest records should be averaged together before the action is taken. This can be the number of records or days. For example, should the average of the previous 5 existing records be used, no matter the number of total days they occurred through? Or should the previous 5 days be averaged?

When using the Days unit, if a given day does not exist, it assumes a 0 as part of the average.

For example if the moving average was set to 7 days, and a subject was filling in a daily diary and started on 08/01/2025 and completed the forms each day except on the 3rd and the 5, the data used to calculate the 7 day average would be like this (date, value, MA):

  • 08/01/2025,  2, NA

  • 08/02/2025,  3, NA

  • 08/03/2025,  0, NA

  • 08/04/2025,  1, NA

  • 08/05/2025,  0, NA

  • 08/06/2025,  4, NA

  • 08/07/2025,  2 , 1.71

Interval diary to terminate - Which diary should get stopped based on the defined value being reached. Currently this is the only action available to perform based on the moving average. Others may be added in the future.

Terminate if less than or equal to - The value that will determine if the action (terminating the diary) should be performed. In the current model, it assumes an average value starts high and decreases over time.

Exporting the results of moving averages

As forms in the study get saved, the moving average is computed on the fly in order to accomplish some action, such as terminating a diary schedule. To see the values that are getting computed over time, the data can be exported to a report:

Export for a specific site:

Within the resulting window, access the data from the bottom:

Export for all sites/subjects:

From the configuration screen

When viewing the export it is important to know how the computation is configured. For example, the average shown above is computing the pior 3 records, so each row of data seen in the exported file is the average of the prior 3 values.