Central Designer: Constants and Their Role in Query Messages

What are Constants?

Constants are that item whose value remains same during the execution of the program from the beginning till the end of a program

Pros:

  • Reusable
  • Integer range checks
  • The value of an item is constant for every subject in a study (i.e lower and upper pulse or height or temperature ranges)
  • It can be referenced in a query message when performing an action
  • Useful when accessing by several forms/checks
constant
constant ranges (min and max value)

Let’s visualize this using a programming language. Define your constant(s). Do some calculation and output the results. Your constant never changes. Only what variables, what the user input into the screen, changes.

...
/* Define a constant to convert from pounds to grams */
5:  #define GRAMS_PER_POUND 454
...
/* Declare the needed variables */
11: long weight_in_grams, weight_in_pounds;
...
/* Perform conversions */
24:
25:    weight_in_grams = weight_in_pounds * GRAMS_PER_POUND;
...
28:   
/* Display results on the screen */
...
Enter your weight in pounds: 182
Your weight in grams = 82628

A couple of points to remember when using constants:

  • drag the constant into the parameters and then drag the parameter into the message box
  • change the prefix from ‘this.’ to ‘constants.’. This will prevent from getting an error message when you check the syntax (i.e. syntax error)

Conclusion: When the parameters change, you only need to change it at the Constant (tab) study object level and avoid hard-coding each query text message. The actual value of the constant needs to be entered only once, when it is first defined.

Reference: Central Designer Best Practices

Your comments and questions are valued and encouraged.
Anayansi Gamboa has an extensive background in clinical data management as well as experience with different EDC systems including Oracle InForm, InForm Architect, Central Designer, CIS, Clintrial, Medidata Rave, Central Coding, OpenClinica, Open Source and Oracle Clinical.

Advertisements

Monte Carlo Simulation? Why?

So why would you use Monte Carlo instead of Decision Tree?

Monte Carlo or Risk Modeling is a simulation using random numbers (computes generate millions of samples quickly).

It’s powerful, simple and realistic.

Cons: It’s hard to incorporate into the overall project, and the probabilities put in may be biased.

In the other hand, Decision Tree analysis is a diagram with options and their probabilities. You would probably want to use Decision Tree over Monte Carlo Simulation when you need to evaluate several options prior to selecting one of them or guide project choices based on costs.

The name Monte Carlo simulation comes from the computer simulations performed during the 1930s and 1940s to estimate the probability that the chain reaction needed for an atom bomb to detonate would work successfully. The physicists involved in this work were big fans of gambling, so they gave the simulations the code name Monte Carlo.

Let us examine this scenario.

Your manager has asked you to use your new knowledge of management science techniques (aka project management) to perform an analysis showing which alternative would be best for the company. She tells you one of the following you may assume during your analysis:

* There are many significant uncertainties and contingencies

* The decision involves a portfolio of projects

* Outcome probability distributions are desired

Since there are many significant uncertainties and contingencies, Monte Carlo simulation is usually preferred over decision tree analysis. But what if you don’t have any sophisticated tools but instead Microsoft Excel?

Well, we have a solution for that.

Let’s assume that a project has five (5) activities. Each activity has a total cost in a specified range. In some cases the value is fixed (activity C), but generally it can assume any value within an interval.

One more important assumption that we can make is that each of these variables is independent of the others. The cost is not influence by the cost of any other activity.

activities

The total cost of a project is a random variable with a value between the minimum and the maximum.

montecarlo
Monte Carlo Simulation

Step 1: Generate random values for each activity cost

Step 2: Add each sequence of random values

Step 3: The expected project cost is the average of these values

montecarlo_formula
Monte Carlo Simulation Iteration 1 example

The random cost activity for A will look like this:

=RAND()*(25,000-20,000)+20,000

This formula will generate a value from 20,000 to 25,000.

If we add this formula to each activity and sum them all, we will obtain the total project cost.

Remember that the RAND () function always automatically recalculates the numbers it generates when a worksheet is opened or when new information is entered into the worksheet or when you press F9 key to recalculate the random numbers.

Conclusion:

Monte Carlo simulation is perhaps the most popular of the various management science techniques. The simple, elegant method provides a means to solve equations with probability distributions. (Schuyler, 2001, p. 81).

For more complex decisions use of Monte Carlo Simulation is desired. So be prepared — you may need to put your thinking cap on.

Reference: Microsoft Excel Monte Carlo Simulation samples.
Schuyler, 2001 Project Risks

Your comments and questions are valued and encouraged.
Anayansi Gamboa has an extensive background in clinical data management as well as experience with different EDC systems including Oracle InForm, InForm Architect, Central Designer, CIS, Clintrial, Medidata Rave, Central Coding, OpenClinica, Open Source and Oracle Clinical.

anayansi gamboa