Changes

Line 125: Line 125:  
You can also use this form to edit previously entered distribution. Do this by clicking on the distribution in the list. The fields in the form will now be dynamically linked to the values in the spreadsheet.
 
You can also use this form to edit previously entered distribution. Do this by clicking on the distribution in the list. The fields in the form will now be dynamically linked to the values in the spreadsheet.
   −
To assist the user in making a defined distribution, which can have many parameters, RRAT has an additional custom form that can be used to help (See Figure 9: Creating a Defined Distribution). This form can be used by entering an outcome/probability combination and then clicking ‘Add Outcome’ repeatedly until all discrete outcomes are added. Once the probability of all outcomes totals 1, the ‘Add Distribution’ button can be clicked and the distribution will be added to the form in the required format (outcome,probability;…). If you are on the last outcome, you can automatically assign the remaining probability of an event happening to that outcome by pressing the ''''Last Outcome'''<nowiki/>' button. For instance if you had already added 2 outcomes each with a probability of 20%, the remaining probability (100%-20%*2 = 40%) could be assigned to it by using this button.
+
To assist the user in making a defined distribution, which can have many parameters, RRAT has an additional custom form that can be used to help (See Figure 9: Creating a Defined Distribution). This form can be used by entering an outcome/probability combination and then clicking ‘Add Outcome’ repeatedly until all discrete outcomes are added. Once the probability of all outcomes totals 1, the ‘Add Distribution’ button can be clicked and the distribution will be added to the form in the required format (outcome,probability;…). If you are on the last outcome, you can automatically assign the remaining probability of an event happening to that outcome by pressing the ''''Last Outcome'''<nowiki/>' button. For instance if you had already added 2 outcomes each with a probability of 20%, the remaining probability (100%-20%*2 = 40%) could be assigned to it by using this button.
 
[[File:Fig 9.png|none|frame|Figure 9: Creating a Defined Distribution]]
 
[[File:Fig 9.png|none|frame|Figure 9: Creating a Defined Distribution]]
   Line 154: Line 154:  
Every time a simulation is run within a Monte-Carlo experiment a new set of model inputs are created from the distributions you create, and a new set of model outputs are calculated.  As the number of simulations needed to get a robust sample of outputs to define a probability distribution will likely run in the thousands the total amount of data such a process generates may be overwhelming. However, not all this data will need to be recorded and it is up to the analyst to decide which sets of inputs and outputs to report.    
 
Every time a simulation is run within a Monte-Carlo experiment a new set of model inputs are created from the distributions you create, and a new set of model outputs are calculated.  As the number of simulations needed to get a robust sample of outputs to define a probability distribution will likely run in the thousands the total amount of data such a process generates may be overwhelming. However, not all this data will need to be recorded and it is up to the analyst to decide which sets of inputs and outputs to report.    
   −
[[File:Fig 12.png|none|frame|Recording Outputs]]
+
[[File:Fig 12.png|none|frame|Figure 12: Recording Outputs|alt=]]
 
      
This is done by using the second worksheet titled “'''Outputs'''” (Figure 10).  In this worksheet all calculations from each simulation can be recorded for later analysis. This is done by:
 
This is done by using the second worksheet titled “'''Outputs'''” (Figure 10).  In this worksheet all calculations from each simulation can be recorded for later analysis. This is done by:
Line 161: Line 160:  
# Entering a formula or a reference to the cell that you want to record from each simulation ('''Row 6''').
 
# Entering a formula or a reference to the cell that you want to record from each simulation ('''Row 6''').
 
# (Optional)  Entering a customized format for the numbers to be recorded ('''Row 7'''). This formatting information is entered in the same way as you would for customized number formats within Excel (see the Excel help file for more information).
 
# (Optional)  Entering a customized format for the numbers to be recorded ('''Row 7'''). This formatting information is entered in the same way as you would for customized number formats within Excel (see the Excel help file for more information).
      
Continuing with our previous example in Figure 10, here we are reporting on the net present value. This is calculated as the sum of the discounted benefits (Cell '''E14''' from sheet1 which was created in stage 2) minus the program costs.  For this example, program costs have been defined as an additional probability distribution (normal) with a mean of $100 million and a standard deviation of $3 million.  In addition to the net present-value we have requested the program to record information for each simulation of the expected statistical lives saved and the reduced risk of premature mortality.
 
Continuing with our previous example in Figure 10, here we are reporting on the net present value. This is calculated as the sum of the discounted benefits (Cell '''E14''' from sheet1 which was created in stage 2) minus the program costs.  For this example, program costs have been defined as an additional probability distribution (normal) with a mean of $100 million and a standard deviation of $3 million.  In addition to the net present-value we have requested the program to record information for each simulation of the expected statistical lives saved and the reduced risk of premature mortality.
    
== Stage 4: Running the Simulation ==
 
== Stage 4: Running the Simulation ==
 +
       
The final stage is simple. First, you need to decide how many simulation runs will be sufficient.  This information is entered in '''cell E1 of the Model Inputs sheet'''.  This cell can be seen in Figure 10.  To ensure a good sampling of the possible outcomes the simulation should be run at least a couple thousand times, although the more simulations you run, the longer it will take RRAT to complete the process.
 
The final stage is simple. First, you need to decide how many simulation runs will be sufficient.  This information is entered in '''cell E1 of the Model Inputs sheet'''.  This cell can be seen in Figure 10.  To ensure a good sampling of the possible outcomes the simulation should be run at least a couple thousand times, although the more simulations you run, the longer it will take RRAT to complete the process.
      
The only thing remaining to be done is to press the “'''Run Simulation'''” button on the '''Inputs''' sheet.  When this button is pressed the simulations begin and a progress bar will appear. Each time a simulation is run a new row of data is entered in the '''Model Outputs''' sheet beginning in '''row 19'''. Both the progress indicator and the data entries can be seen in Figure 13.  For all but the most complicated models this process should only take a few minutes or less. If the model is large you may want to do a test run with only 100 or fewer simulations to get an idea of the time frame you may need to do a larger sampling and to make sure you have done the previous steps correctly.  If the model runs slower than expected, it might be a good idea to close all other spreadsheets and remove any calculations or background data not needed for the Monte-Carlo analysis.
 
The only thing remaining to be done is to press the “'''Run Simulation'''” button on the '''Inputs''' sheet.  When this button is pressed the simulations begin and a progress bar will appear. Each time a simulation is run a new row of data is entered in the '''Model Outputs''' sheet beginning in '''row 19'''. Both the progress indicator and the data entries can be seen in Figure 13.  For all but the most complicated models this process should only take a few minutes or less. If the model is large you may want to do a test run with only 100 or fewer simulations to get an idea of the time frame you may need to do a larger sampling and to make sure you have done the previous steps correctly.  If the model runs slower than expected, it might be a good idea to close all other spreadsheets and remove any calculations or background data not needed for the Monte-Carlo analysis.
 +
[[File:Figure 13.png|none|thumb|716x716px|Figure 13: Running the Simulation]]