Skip to content

Scenario Component Methods

Luke Bailey edited this page Feb 12, 2020 · 1 revision

Component methods can be used when the new value of an intervention variable is calculated by first modifying another related variable and using it's relationship to the intervention variable to calculate it's new value.

E.g., An intervention on the total number of vegetables that an individual consumes in a day (Veg_cont) by first changing the total number of fruits and vegetables that they consume in a day (TotalFruitVeg_cont). In the above example,
Veg_cont is the intervention variable
TotalFruitVeg_cont is the related variable

The relation between the variables is described by the formula below:
TotalFruitVeg_cont = Veg_cont + Fruit_cont
where Fruit_cont is the total number of fruits eaten in a day

There are 3 types of component methods:

  1. Component Attribution
  2. Component Relative
  3. Component Absolute

We will explain each of them by using the diet example above.

Component Attribution

Use this method when the related variable has to be updated to a new value. E.g., if we wanted all the individuals in our scenario to consume 5 total fruits and vegetables in a day (TotalFruitVeg_cont = 5) by only updating the number of vegetables they eat. The scenario object would look like,

{
    "variableName": "Veg_cont", // This is the variable we want to change
    "method": "component attribution", // The method type
    "targetPop": [ 
        {
            "variableName": "TotalFruitVeg_cont",
            "range": [null, 5]
        }
     ], // Only change an individual if they are below or at 5 total fruit and vegetables in a day
     "parentVariable": "TotalFruitVeg", // The related variable
     "scenarioValue": 5 // What the value of the related variable should be 
}

Let's look at how the scenario object would work with the 2 individuals below:

  1. An individual who eats 3 vegetables and 7 fruits per day
  2. An individual who eats 3 vegetables and 1 fruit per day

For the first individual, the value of TotalFruitVeg_cont would be 10, which does not meet the inclusion criteria for this scenario which is that the TotalFruitVeg_cont value should be less than or equal to 5.

For the second individual, the value of TotalFruitVeg_cont would be 4 which meets the inclusion criteria for the scenario. We know that the target value of TotalFruitVeg_cont is 5, which is 1 more than what this individual has. So the new value of Veg_cont will be 4, bringing the TotalFruitVeg_cont value up to 5.

Component Relative

Use this method when the intervention variable is updated by first updating the related variable by a percentage defined in the scenario object.

{
    "variableName": "Veg_cont", // This is the variable we want to change
    "method": "component relative", // The method type
    "targetPop": [ 
        {
            "variableName": "TotalFruitVeg_cont",
            "range": [null, 7]
        }
     ], // Only change an individual if they are below or at 7 total fruit and vegetables in a day
     "parentVariable": "TotalFruitVeg_cont", // The related variable
     "scenarioValue": 15 // Update their total fruits and vegetables count by 15%
}

Here the scenarioValue describes a percentage which can be negative or positive. Let's once again look at how the scenario would be run with the individuals in the component attribution scenario.

For the first individual, once again they would not be included in the scenario since they do not meet the inclusion criteria.

For the second individual, their TotalFruitVeg_cont value is 6 which does meet the inclusion criteria. So we would increase this value by 15% which would bring it up to 6.9 leading to an increase in the intervention variable (Veg_cont) of 0.9 to make up this difference.

Component Absolute

Use this method when the intervention variable is updated by first updating the related variable by a value defined in the scenario object.

{
    "variableName": "Veg_cont", // This is the variable we want to change
    "method": "component absolute", // The method type
    "targetPop": [ 
        {
            "variableName": "TotalFruitVeg_cont",
            "range": [null, 7]
        }
     ], // Only change an individual if they are below or at 7 total fruit and vegetables in a day
     "parentVariable": "TotalFruitVeg_cont", // The related variable
     "scenarioValue": 5 // Update the TotalFruitVeg_cont value by 5
}

Here the scenarioValue describes a number which can be negative or positive. Looking at our individuals again,

For the first individual, once again they would not be included in the scenario since they do not meet the inclusion criteria.

For the second individual, their TotalFruitVeg_cont value is 6 which does meet the inclusion criteria. So we would increase this value by 5 which would bring it up to 11 leading to an increase in the intervention variable (Veg_cont) of 5 to make up this difference.

Things to Note

  1. The relationship between the intervention and related variable should be linear of the form,
    y = x + mv + nz + ....
    where x is the intervention variable, y is the related variable, v, z are other variables and m, n are constants. Notice how the there is no intercept in the equation and no constant term in front of the intervention variable.
  2. The scenarioValue field describes how the parentVariable should be changes, which in turn affects the intervention variable described by the variableName field.