Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

What is a Formula variable? 

Put your algebra skills to the test!  A Formula variable is a custom variable type that allows you to carry out calculations on other variables.  Put your algebra skills to the test!  With the Formula variable, you can

...

    1. Navigate to Manage Study --> Variables 

    2. Click '+ New Variable'. 



    3. Give the variable a friendly name.  
      1. (lightbulb)Tip! Choose something that you will remember when you are building the variable into target modifications or participant messaging and incidents. 



    4. Select the arm.  If the formula variable is calculating based on other arm-specific variables, you must select that arm.  Otherwise the variable will not be available to use for the formula calculation.

    5. Next select the variable type.  For this example, we want to select Formula. 


    6. Once you select Formula, the formula field will display.   You can use the following operators, +, -, *, or / create equations using any of the following supported characters.  (warning) The formula variable supports order of operations!
      1. Supported characters: 
        1. addition: +
        2. subtraction/negation: -
        3. division: /
        4. multiplication: *
        5. parentheses: ( )
        6. powers: ^ (e.g., 2^3)
    7. To create your formula, copy the variables exactly as listed and add any operators. 



    8. Adjust rounding criteria, if needed. 



    9. Click 'Save Variable' 

    10. Your new variable will be listed on the Variables overview page. 

...

  1. Navigate to Study Arms under Manage Study. Click 'Manage Event Schedule'. For arm specific Formula variables, remember to select the arm for which the new variable was created.



  2. Either create a new event or edit an existing event and then click into the event logic screen. 

  3. Imagine the same scenario as above: I have told the participant that their new goal is going to be 10% higher this week.  Now I have to set their new target to increase to be 10% higher. 

  4. In the 'Then' criteria, under 'Select Action' choose, 'modify the participant's target'. 

     

  5. Next select 'Set' and choose the target.  This will display all targets configured for this arm.  In this scenario, we want to select the Fitbit steps target. 



  6. Then select what to set the target to.  Here we want to set the target to a Variable. 



  7. Once you select 'Variable', all arm specific and study wide variables will display.  Choose {{ @target x 10% }}



  8. (warning) Note! You could also set up the modify target via a calculation.  However, the benefit of using the variable is that it can be included in messaging. 



  9. Click 'Save logic'. 


Creating ramp-up periods from baseline value to target value: 

See Target Value Variable for step by step instructions! 

Allowing participants to choose their own goal:

See Enrollment Run-In Variable for step by step instructions!