Configuring a dynamic randomization

  • Published by Viedoc System 2023-10-09
  • Print

This lesson describes how to configure a dynamic randomization in Viedoc Admin.


Introduction to randomizations

About the randomization service

Viedoc offers support for randomization. Subjects can be randomized using:

  • static randomization: randomization based on a randomized list,
  • dynamic randomization (Pocock and Simon): randomization based on an algorithm.

Dynamic randomization ensures a more even distribution of subjects across the treatment groups, with regard to prognostic factors that might influence the effect of treatment on the subjects.

The randomization in Viedoc is configured in a similar way for static and dynamic randomization. The main difference is that for static randomization, a list with outcomes (randomization numbers, treatment groups, and so on) - the randomization list - is created and uploaded by the user, while for dynamic randomization, an algorithm is used to assign subjects to a treatment group and the randomization list is created by the system.

It is possible to upload a separate allocation list that allocates an Investigational Product (IP) to the subject. When the subject is randomized, Viedoc informs the clinic user which IP should be given to the subject. The allocation list is most commonly used in double-blind studies. Uploading of the allocation list is done in a similar way for static and dynamic randomization.

Terminology

Term Definition
RTSM Randomization and Trial Supply Management.
Blinded role A role that does not know which treatment the subject is receiving. Most roles in a clinical trial should be blinded.
Unblinded Statistician

A system role that can configure the randomization in Viedoc Admin.

The Unblinded Statistician sees which subjects are assigned to which treatments, and should therefore not have any role in the study where he/she should not know this information. An Unblinded Statistician can never again work in a blinded role within that study.

Randomization list A list for allocating subjects to treatments or groups. The randomization list shows all available slots in the randomization. When randomization has started (that is, when the first subject has been randomized), the randomization list also shows which subjects have been assigned to which treatment or group.
Allocation list A list for allocating IP to subjects. The allocation list shows all available IPs. When randomization has started, the allocation list also shows which IPs have been assigned to which subjects. Advanced allocation can be set up and for this there are two options for the allocation list(s):
  • Use individual allocation list for each randomization.
  • Use one global allocation list for all your randomizations.
    Note! To be able to use Logistics, a Global allocation list must be used.
Scope

Defines the scope from which a randomization slot or an IP should be selected. One of the following scopes can be chosen:

  • Study
  • Country
  • Site
Factor (Prognostic factor)

Items that might influence the effect of treatment on the subjects, and that are to be used as input when randomizing the subject. For example sex or age. Viedoc supports the use of drop-down lists, radio buttons, integer and free text data types as input items.

Outcome Items to be populated by the randomization service, for example treatment group.
Blinded outcome Items to be populated by the randomization service, that should remain blinded until after the subject has been unblinded or emergency unblinded for a specific subject. These items will not be visible for any user in the system, except for the Unblinded Statistician who can see them in Viedoc Admin, or until an emergency unblinding was performed (for details on how the emergency unblinding is performed in Viedoc Clinic, see Randomization, allocation and emergency unblinding).

Workflow

Randomizations are configured in Viedoc Designer and Viedoc Admin, and executed in Viedoc Clinic. The schematic below depicts what different steps need to be taken, and which roles have permission to perform these steps, depending on the allocation configuration type as described below:

  • Randomization, optionally together with allocation performed at the same time as the randomization within the same form. In this case the form is locked (and therefore not possible to be edited) after the randomization is performed in Viedoc Clinic.
    The configuration workflow in this case looks as illustrated in the following image:
  • Randomization, optionally together with advanced allocation allows you to set up the allocation in a more flexible way, including:

- Configuring individual forms for randomization and allocation, to keep the two steps separated in the study workflow

- The possibility to perform multiple allocations at different visits during the study

- The possibility to replace an already performed allocation with a new allocation

- The possibility to undo an already performed allocation

The configuration workflow in this case looks as illustrated in the following image:

http://help.viedoc.net/l/2e752a/en/

This is a single-sourced file that should have the following content:
Introduction to randomization

Detailed instructions regarding these steps are described in:

An example of how to configure a dynamic randomization is described in detail in the following lesson:

For a video tutorial on how to configure a static list randomization and a dynamic randomization, see:


Study license and randomization

Important! The randomization feature must be included in your study license in order for the randomization configuration to be available in production mode. You can still configure a randomization in demo mode without a license.

On the randomization page, under the Demo tab, you can create the configuration and perform all the configuration actions for the dynamic randomization, and select the Edit settings and generate new list link.

If your study license has the randomization feature included, it will be shown on the Study settings page under Included features on the Settings tab:

If your study either does not have a license key (Reference ID), or has a license key that does not include the randomization feature, on the randomization page, under the Production tab:

  • A message is shown informing you that the randomization feature is not included in the license:
  • The Create configuration and Edit configuration links are not available.

For more information on licensing, see Overview of Viedoc


Dynamic randomization

What is dynamic randomization?

For dynamic randomization, the randomization service in Viedoc allocates a treatment to the subject based on previously given information. That means that the probability of a subject getting assigned to a treatment will change depending on previous assignments. This way, dynamic randomization ensures a more even distribution of the subjects across factors and treatments for each site.

For dynamic randomization, you do not need to upload a randomization list in the beginning of the study. Instead, you need to configure an algorithm for how the probability of assignments will be calculated. The randomization service in Viedoc then creates a randomization list while assigning subjects to treatments.

Viedoc offers the Pocock and Simon method for dynamic randomization. The Pocock and Simon method aims to minimize imbalance in the distribution of subjects across the treatment groups, with regard to prognostic factors that might influence the effect of treatment on the subjects. It does so by hypothetically assigning a new subject to each of the treatment groups and calculating the amount of imbalance for each assignment. The method then assigns the subject to the treatment group with the smallest imbalance.

When configuring a Pocock and Simon randomization, it is possible to set the relative importance of the factors, and the desired division of treatments to be allocated. Two different variation methods can be chosen: Range and Range squared, see Concepts and terminology for dynamic randomizatons for more information.

The original statement of the Pocock and Simon method was deterministic, random number values were only used in tie-breaking situations. The randomization service in Viedoc is based on a modified Pocock and Simon method in which every randomization decision depends on a random number. For this, Donald E. Knuth's subtractive random number generator algorithm is used, see References.

References

The underlying theory for the dynamic randomization method that is implemented in Viedoc is described in the following articles:

  • Pocock S.J. and Simon R. Sequential treatment assignment with balancing for prognostic factors in the controlled clinical trial. Biometrics 1975;31:103-115.
  • Miller E. Probability sharing in a modified Pocock-Simon method.12th Int. Conf. of S.C.M.A Jun 22, 2005.

The Donald E. Knuth's subtractive random number generator algorithm that is used in the modified Pocock and Simon method implemented in Viedoc is described in the following article:

  • Donald. E. Knuth. The Art of Computer Programming, volume 2: Seminumerical Algorithms. Addison-Wesley, Reading, MA, second edition, 1981.

Concepts and terminology for dynamic randomizations

In Viedoc, the same annotations as in the above mentioned articles are used.

Term Description
Factor weight

The relative importance of a factor when calculating imbalance, set as an integer value greater than zero.

For example, if it is more important to achieve balance in the factor Gender than in the factor Age, then a factor weight of 2 could be set on Gender and a factor weight of 1 set on Age.

Outcome weight

Allocation ratio. The desired division of treatments to be allocated.

For example, if we have three treatments, A, B and C, and we would like treatment A to be allocated 50% of the time, and treatment B and C 25% of the time respectively, we would set the allocation ratio as follows: Treatment A: 2, Treatment B: 1, and Treatment C: 1.

D The amount of variation in the set of values for a factor, that is, the imbalance for one factor.

The amount of variation can be calculated as:
  • Range - the difference between the highest and the lowest values in the set.
  • Range Squared - the square of the range.

Tip! Range square increases the spread of the distribution and may be useful if you have many factors.

Note! When calculating D, the allocation ratio is taken into account. A treatment that should be allocated more often (that is, has a higher outcome weight) has its D reduced so as to favour the treatment.

G

The total amount of imbalance across all factors.

G is calculated by multiplying D for each factor with its factor weight, and then summing this up for all factors. In other words, G is calculated as the weighted sum of {dik}, where dik is the lack of balance among treatment assignments. The weighted sum is used when some prognostic factors are considered more important than others.

If it is more important to obtain balance across a certain factor, this factor will get a higher factor weight. Thus its imbalance will have a larger impact on the G, which will make the treatment assignment leading to that specific G more unfavourable.

If D is calculated as range square, the range is squared before any factor weight is applied.

P (p)

The probability with which the treatment that minimizes imbalance is assigned. The probability determines the extent to which one wishes to favour the treatment group that would lead to the smallest imbalance.

During the randomization, the probability P for each treatment assignment is calculated, based on a probability cut-off. This probability cut-off (referred to as p below) is a static decimal between 0 and 1 that is provided by a statistician. In Viedoc, the probability cut-off has to be entered as x/1000. So for a p of 0.8 (80%), the number 800 should be entered.

During randomization, P for each treatment will be distributed as follows:
(N = number of treatments, p = probability cut-off)

  • If the Gs are the same for all treatment assignments, then the probability will be the same for each treatment: P=p/N.
  • If one treatment has the lowest G, then it will have its probability P as p. The remaining treatments will split the remaining probability: P=(1 - p)/(N - 1)
  • If one or more treatments share the lowest G value, then Viedoc first calculates what the remaining non-favoured treatments will get and then splits the remainder between the favoured treatments.
Random A random number between 0 and 1, generated using Donald E. Knuth's subtractive random number generator algorithm.
seed A value that is used to initialize the random number generator and that is based on the number of ticks to represent the current date.

Calculations behind the scenes

In the section A use case for dynamic randomization, a detailed example of how to configure a dynamic randomization is provided. This use case example also describes the algorithm, and the calculations that are executed by Viedoc in order to assign a subject to a treatment group.


Working with randomizations in Viedoc Admin

Description of the randomization page

Note! The randomization page is only visible for users with the role Unblinded Statistician.

Once the randomization mapping has been set up in Viedoc Designer, the RTSM field appears for users with the role Unblinded Statistician. When you click the toolbox icon in the RTSM field, the Randomizations pop-up opens. Here you can do the following:

1. Choose the type of the allocation list to be used:

  • Individual allocation list - separate allocation lists for each of the randomizations in your study.
  • Global allocation list - one global allocation list for all the randomizations in your study.
    Note! the upcoming Drug logistics feature will require a Global allocation list to be used.

2. View a list of randomizations that have been added to your study.

3. Open the Randomization page to configure the randomization or view the randomization details.

Note! If no randomization configuration is created, it is not possible to randomize a patient in Viedoc Clinic.

On the Randomization page, you can view or do the following:

4. View the items, and their code lists, that have been mapped as input factors.

5. View the items, and their code lists, that have been mapped as outcome and blinded outcome.

6. Set up the randomization list by defining:

  • The scope of the randomization list. You can select one of the following options:
    • Study
    • Country
    • Site
      Note! If you set the scope to Country or Study site, a separate randomization list for each country or site will be created. In that case, you cannot use Country or Site respectively as input factor(s).
  • The factors - only if the advanced allocation is not enabled in Viedoc Designer (see Setting up the randomization lesson in the Viedoc Designer User Guide for details on advanced allocation). If advanced allocation is enabled, then the factors are automatically populated from the settings in Viedoc Designer.
  • The outcome - only if the advanced allocation is not enabled in Viedoc Designer (see Setting up the randomization lesson in the Viedoc Designer User Guide for details on advanced allocation). If advanced allocation is enabled, then the outcomes are automatically populated from the settings in Viedoc Designer.

7. Optional: set up the allocation list by defining:

  • The scope of the allocation list. You can select one of the following options:
    • Study
    • Country
    • Study site
      Note! If you set the scope to Country or Study site, a separate allocation list for each country or site has to be uploaded.
  • The factors - only if the advanced allocation is not enabled in Viedoc Designer (see Setting up the randomization lesson in the Viedoc Designer User Guide for details on advanced allocation). If advanced allocation is enabled, then the factors are automatically populated from the settings in Viedoc Designer.
  • The outcomes - only if the advanced allocation is not enabled in Viedoc Designer (see Setting up the randomization lesson in the Viedoc Designer User Guide for details on advanced allocation). If advanced allocation is enabled, then the outcomes are automatically populated from the settings in Viedoc Designer.

8. Select the randomization method.

9-17. You can test the randomization in demo mode by uploading dummy randomization lists and dummy allocation lists to make sure everything works as expected before randomizing patients in production mode. Click the tab (8) to switch between demo mode and production mode.

10. View the details of the randomization list for the different scopes: the scope (in this example the study) and the status (Active, Inactive or Not initiated). In this field, you can upload the randomization list by clicking Upload (not visible in the image). Once a randomization list has been uploaded, icon 11 and 12 appear.

11. Download a template (Excel file) for the randomization list.

12. View the randomization list. An Excel file is downloaded. For a description of the randomization list, see The randomization list.

13. Edit the randomization list. You can select one of the two following options:

  • Add to list - to upload a randomization list (Excel file) that adds slots to the existing randomization list.
  • Upload a new list - to upload a randomization list (Excel file) that replaces the existing randomization list. The current list will then be inactivated. This will not affect already randomized subjects.

14. View the details of the allocation lists for the different scopes: the scope (in this example the sites, for each scope a different allocation list needs to be uploaded) and the status (Active, Inactive or Not initiated). In this field, you can upload the randomization list by clicking Upload. Once a randomization list has been uploaded, icon 15 and 16 appear.

15. Download a template (Excel file) for the allocation list.

16. View the allocation list. An Excel file is downloaded. For a description of the allocation list, see The allocation list.

17. Edit the allocation list here, if you selected to use Individual allocation list. You can select one of the two following options:

  • Add to list - to upload an allocation list (Excel file) that adds slots to the existing allocation list.
  • Upload a new list - to upload an allocation list (Excel file) that replaces the existing allocation list. The current list will then be inactivated. This will not affect already randomized subjects.

The numbers in front of the study name and site names in the Randomization List and Allocation List fields (5228, 18213, 18215, and 18217 in the image) are the study identification number and site identification numbers that are generated by the system and used for internal identification of study and sites.

The randomization list

Once the randomization is started, it is possible to view the randomization list by clicking View in the Randomization List field (see nr 12 in the image above). An Excel file is downloaded that has the following sheets:

  • Configuration - summarizes the factors and outcomes and their code lists configured for the randomization, and the randomization details (randomization method, variation method, probability, maximum number of slots per list, factor weights and allocation ratio).
  • Current distribution - displays the distribution of randomized subjects over the different factors and treatments.
  • Slots - one row for each randomized subject, listing:
    • the details of the randomization: factors and outcomes, subject details, user details (e-mail address) of the clinic user who randomized the subject, and date and time of randomization,
    • the details of the applied algorithm: variation method, probability P, factor weights, allocation ratio, maximum number of slots per list, Gs (the total amount of imbalance for each possible assignment), Ps (the probability P for each possible assignment), Random (a random number between 0 and 1, generated using Donald E. Knuth's subtractive random number generator algorithm) and Seed (a value used to initialize the random number generator, based on the number of ticks to represent the current date). See the image below.

The allocation list

If allocation is activated, a file with available slots (kit numbers) should be uploaded for each scope (study, country or site), before the first subject can be randomized.

A template allocation list customized for your randomization configuration can be downloaded by clicking Download template in the Allocation List field (see nr 15 in the image above). For the example shown in the image above, the template allocation list looks as follows:

The list shows the factors and outcomes. The Item IDs are displayed as column names, their code lists are dispayed in the rows below. Every possible combination for the factors and outcomes is shown here. The item RANDKITNO (kit numbers) was configured to be an open text field, so the allocation list says <string>. A list of kit numbers has to be added to the file, before the template can be uploaded as allocation list, as in the example below:

Once the randomization is started, it is possible to view the allocation list by clicking the view button in the Allocation List field (see nr 16 in the image above). An Excel file is downloaded that has the following sheets:

  • Configuration - summarizes the factors and outcomes and their code lists configured for the randomization.
  • Current distribution - displays the distribution of randomized subjects over the different factors and groups.
  • Slots - lists all the slots, the factors and outcomes (kit number in this case), and whether the slot is still available. If the slot has been taken, subject details, user details (e-mail address) of the clinic user who randomized the subject, and date and time are also displayed, see the image below.

Step-by-step guides

Configuring a dynamic randomization

Note! The randomization can only be configured by users that are assigned the system role Unblinded Statistician.

To configure the randomization, follow the steps below.

1

In Viedoc Admin, go to the study for which you would like to configure the randomization. In the RTSM field, click the toolbox icon to open the randomization window.

2

Click Open to select the randomization you would like to configure.

The Randomization configuration window opens as a pop up. This window also displays the prognostic factors and outcomes that have been defined in Viedoc Designer.

3

In the Randomization List field, select:

  1. the scope of the randomization list
    and, only if advanced allocation is not enabled in Viedoc Designer:
  2. the factors that should be balanced for in the randomization,
  3. the outcome.

Note! To be able to perform a dynamic randomization, you need to specify only one outcome for the randomization list, and you need to make sure that the items used as factors and outcome have a code list. It is not possible to use free text items in the randomization list for dynamic randomization.

Note! You can also select Country or Study Site as factors. Yet, if you have set the scope to Country or Study site, you cannot use Country or Site respectively as input factor(s).

4

If you want to use allocation, select the Allocation list checkbox, select the scope of the allocation list, and, only if advanced allocation is not enabled in Viedoc Designer, the input factors, and the desired outcome (for example, kit number). Based on the allocated treatment, a kit number will then be assigned to the subject.

From the Randomization method dropdown list, select Dynamic (Pocock and Simon).

5


Select Approve settings & generate list. The Create configuration link is displayed.

Select Create configuration to configure the dynamic randomization:

Note! You will need to create the dynamic randomization configuration individually for demo mode and production mode after creating the dynamic randomization settings.

6

Configure the dynamic randomization (see also Concepts and terminology for dynamic randomization):

  1. Select the variation method from the Variation method drop down menu.
  2. Enter the desired value for probability.
    The probability (p) determines the extent to which one wishes to favour the treatment group that would lead to the smallest imbalance. P should be between 1/(number of groups) and 1. To achieve this, enter a value (x) between 1000/(number of groups) and 1000.
  3. In Factor Weights, enter the relative importance of the prognostic factors by typing their weights.
    For example, if it is more important to achieve balance in Factor A (Gender in the image below) than Factor B (Smoker in the image below), then a weight of 2 could be set on Factor A and a weight of 1 set on Factor B.
  4. In Allocation ratios, enter the desired division of treatments to be allocated.
    For example, say we have three treatments A, B and C. If we would like treatment A to be allocated 50% of the time, and treatments B and C 25% of the time respectively, we would set the outcome weights as follows: Treatment A: 2, Treatment B: 1, Treatment C: 1.
  5. Type the maximum number of slots per list in the Max slots per lists field.
  6. Click Ready. The pop-up closes.
  7. Click Approve settings & generate list.

The randomization page reloads and shows the randomization list with status Inactive, and the Allocation lists that are to be uploaded (status Not initiated).

When the maximum number of slots is reached during randomization, no additional subjects can be randomized. You can edit the maximum number of slots in the randomization configuration at any time, see Editing the configuration of a dynamic randomization.

Configuring the allocation list

There are two different options for the allocation lists, as follows:

  • Individual allocation list - separate allocation lists are used for each defined randomization. If the allocation list is not uploaded, the subject can be randomized in Viedoc Clinic, but no kit is allocated.
  • Global allocation list - one global allocation list is used for all the defined randomizations. This is available only if advanced allocation is enabled in Viedoc Designer (for details on advanced allocation settings in Viedoc Designer, see Setting up the randomization lesson).
    To be able to use Logistics, a Global allocation list must be used.
    If the allocation list is not uploaded, or, in case of using Logistics, if no kits are available at the current defined scope (Study / Country / Study Site), when trying to perform the allocation in Viedoc Clinic, the system will respond with No slots found for allocation.
    Setting up a Global allocation list is described in Configuring the Global allocation list.

This is set up under the RTSM settings in Viedoc Admin, as illustrated in the image below:

Individual allocation list

If individual allocation list(s) are used for each randomization, the allocation list will be uploaded separately for each defined randomization, as described below.

Downloading a template allocation list

Uploading an allocation list

To upload an allocation list, follow the steps below.

1 Click Upload.
2 Select the file containing the slot list and click Open. The file will be uploaded.

Viewing an allocation list

The allocation list can be viewed in a similar way as the randomization list, see Viewing the randomization list.

Editing an allocation list

To edit an active allocation list, follow the steps below.

1 Click the toolbox icon next to the allocation list you would like to edit.
2 Select: Add to list or Upload new list.
  • Add to list - adds new slots to the existing slot list. Empty spots in the existing slot list will still be allocated.
  • Upload new list - discards the existing slot list and replaces it with the new slot list.
3

Select the file containing the slot list and click Open.
The file will be uploaded.

Viewing the randomization list

The randomization list initially indicates status Not initiated and turns to status Active once the first subject has been randomized.

From that moment, the distribution list can be downloaded in Excel format by clicking View.

Restarting a dynamic randomization

If you would like to restart a dynamic randomization, click the toolbox icon in the Randomization List field and select Restart.

Restarting the randomization will reset the slot list. Newly added subjects will be randomized independently of the subjects that were randomized before the restart.

Editing the configuration of a dynamic randomization

If you would like to edit the configuration of an ongoing Pocock and Simon dynamic randomization, click Edit configuration.

A pop-up opens where you can edit the settings for variation method, probability, factor weights, allocation ratio and maximum number of slots per list. For a more detailed explanation, see step 6 in Configuring a dynamic randomization.

You can edit the randomization configuration at any time during randomization.