Home → Techniques and Tips → Printer Friendly Version
Applies to: All Palisade software versions
Issue: A zeroday exploit was recently identified within the Apache log4j logging library, which can potentially be used by hackers to take over entire servers via logging messages.
Applies to: @RISK and DecisionTools Suite (All versions)
All Palisade software uses and supports all TLS recent versions (versions 1.0/1.1/1.2).
If you are in need of disabling older versions of TLS from your servers to replace it for any newer one, the software will still work without any issues.
In case this article doesn't answer your question, you can email Tech Support, don't forget to include your license serial number.
Last Update: 20210305
Applies to: @RISK 7.x and newer
Dynamic arrays are supported in the latest versions of Excel 365. Dynamic array formulas can automatically populate or "spill" into neighboring blank cells and eliminate the need for legacy Ctrl+Shift+Enter (CSE) array formulas.
When opening a workbook that contains dynamic array formulas in an older version of Excel, they show as a legacy CSE formula. If new dynamic array functions are used, spill range references get prefixed with _xlfn to indicate that this functionality is not supported. A spill range ref sign (#) is replaced with the ANCHORARRAY function.
Most dynamic array formulas (but not all!) will keep displaying their results in legacy Excel until you make any changes to them. Editing a formula immediately breaks it and displays one or more #NAME? error values.
So, if you know you will be sharing dynamic array formula enabled workbooks with someone using nondynamic aware Excel, it’s better to avoid using features that aren't available for them.
When you open a workbook containing @RISK functions in an older version of Excel, it is automatically converted to a conventional array formula enclosed in {curly braces}.
So, there are two possible scenarios to analyze considering the @RISK version used:
One way to solve this problem is inserting the “@” character (aka implicit intersection operator) at the beginning of the @RISK functions when editing the model in Excel 365.
In Excel 365, all formulas are regarded as array formulas by default. The implicit intersection operator is used to prevent the array behavior if you do not want it in a specific formula. In other words, this is done to force the formula to behave the same way as it did in older versions.
So, you can do this manually or programmatically by creating a VBA macro.
There is an alternative option using the SwapOut functionality available in @RISK, the procedure is explained below:
Last Update: 20200908
This page lists the principal changes in the Palisade Technical Support Knowledge Base, from most recent to oldest. Each entry shows the "book", chapter, and article titles, with live links. Titles of new articles are in boldface and marked with ★.
October 5^{th}, 2022 — February 10^{th}, 2023
New Articles:
Updated Articles:
Deleted Articles:
August 5^{th}, 2022 — October 5^{th}, 2022
New Articles:
Updated Articles:
February 11^{th},2022 — August 5^{th}, 2022
New Articles:
Updated Articles:
Home → Técnicas y Consejos → Rendimiento de @RISK → Para simulaciones más rápidas (Spanish version of “For faster simulation” article, updated Office versions described in troubleshooting steps and validate all links are still functional)
November 15^{th}, 2021 — February 11^{th},2022
New Articles:
Updated Articles:
July 29^{th} —November 15^{th}, 2021
New Articles:
Updated Articles:
Home → End User Setup → Further Information (Updated link for EULA to Palisade website)
April 1^{st} 2021— July 29^{th} 2021
New Articles:
Updated Articles:
March 19^{th} 2021— April 1^{st} 2021
New Articles:
March 5^{th} 2021— March 19^{th} 2021
New Articles:
Updated Articles:
December 8th 6^{th} 2020— March 5^{th} 2021
New Articles:
Updated Articles:
Additional Changes:
@RISK and DecisionTools Suite 8.1.1 was released on March 4th, 2021. Automatic updates from the software's previous versions will be turned on early next week. Release notes are now published in https://help.palisade.com/v8_1/en/ReleaseNotes.htm
October 6^{th} 2020— December 8^{th} 2020
New Articles:
Updated Articles:
Additional Changes:
In our website www.palisade.com > Company > Contact there is a section in which you can redirect our customers to fill out a form to open a support ticket, this way they can input their license and issue details to maximize response times in their cases.
July 24 2020— October 6th 2020
New Articles:
Additional Changes:
In the Palisade Help Resources (help.palisade.com) customer’s will be able to find our Knowledge Base link as well, this way they can find all online support information in one place.
July 7 2020— July 24 2020
New Articles:
Updated Articles:
Home → Soluciones → Todos los productos: de inicio → Nada sucede cuando inicio el Software
June 5 2020— July 7 2020
New Articles:
Updated Articles:
April 27 2020— June 5 2020
New Articles:
Updated Articles:
April 17 2020— April 27 2020
New Articles:
Updated Articles:
Home → Troubleshooting → All Products: Startup → "Timeout error starting ... PalFlexServer.exe"
April 2 2020— April 17 2020
New Articles:
Updated Articles:
March 12 2020— April 2 2020
New Articles:
Updated Articles:
Jan 30 2020— March 12 2020
New Articles:
Updated Articles:
Jan 10 2020— Jan 30 2020
New Articles:
Home → Licencias individuales → Activación (6.x/7.x) → Obtener una licencia Individual certificada ★
05 Nov 2019 — 10 Jan 2020
New Articles:
Updated Articles:
29 Aug  4 Nov 2019
New Articles:
17 Aug  28 Aug 2019
New Article:
2 July  16 Aug 2019
New Article:
29 June  1 July 2019
Updated Articles:
18 June  27 June 2019
Article updated:
07 May  17 June 2019
Changes in Stand alone EULA and Network EULA
02 May  06 May 2019
New article:
Updates on Maintenance Policy:
10 March  29 April 2019
New Articles:
3–9 March 2019
24 Feb–2 March 2019
17–23 Feb 2019
10–16 Feb 2019
3–9 Feb 2019
27 Jan–2 Feb 2019
20–26 Jan 2019
13–19 Jan 2019
612 Jan 2019
30 Dec 2018–5 Jan 2019: no updates of note.
23–29 Dec 2018
16–22 Dec 2018
9–15 Dec 2018
2–8 Dec 2018
25 Nov–1 Dec 2018
18–24 Nov 2018: no updates of note.
11–17 Nov 2018
4–10 Nov 2018
28 Oct–3 Nov 2018
21–27 Oct 2018
14–20 Oct 2018
7–13 Oct 2018—These articles have significant updates for software release 7.6.0:
30 Sept–6 Oct 2018: no updates of note.
23–29 Sept 2018
16–22 Sept 2018
9–15 Sept 2018
2–8 Sept 2018
26 Aug–1 Sept 2018
19–25 Aug 2018
12–18 Aug 2018
5–11 Aug 2018
29 July–4 Aug 2018
22–28 July 2018
15–21 July 2018
8–14 July 2018
1–7 July 2018
24–30 June 2018
17–23 June 2018
10–16 June 2018
3–9 June 2018
27 May–2 June 2018
20–26 May 2018
13–19 May 2018: no updates of note.
6–12 May 2018
29 April–5 May 2018
22–28 April 2018
15–21 April 2018
8–14 April 2018
1–7 April 2018
25–31 March 2018
18–24 March 2018
11–17 March 2018
4–10 March 2018
25 Feb–3 Mar 2018
18–24 Feb 2018
11–17 Feb 2018
4–10 Feb 2018: no updates of note.
28 Jan–3 Feb 2018
21–27 Jan 2018
14–20 Jan 2018 (updates for software release 7.5.2)
7–13 Jan 2018
31 Dec 2017–6 Jan 2018
24–30 Dec 2017: no updates of note.
17–23 Dec 2017
10–16 Dec 2017
3–9 Dec 2017
26 Nov–2 Dec 2017
19–25 Nov 2017: no updates of note.
12–18 Nov 2017
5–11 Nov 2017
29 Oct–4 Nov 2017
22–28 Oct 2017
15–21 Oct 2017
8–14 Oct 2017
1–7 Oct 2017
24–30 Sept 2017
17–23 Sept 2017
10–16 Sept 2017
3–9 Sept 2017
27 Aug–2 Sept 2017
20–26 Aug 2017
13–19 Aug 2017: no updates of note.
6–12 Aug 2017
30 July–5 Aug
23–29 July 2017
16–22 July 2017
9–15 July 2017
2–8 July 2017
25 June–1 July 2017
18–24 June 2017
11–17 June 2017
4–10 June 2017
28 May–3 June 2017
21–27 May 2017: no updates of note.
14–20 May 2017
7–13 May 2017
30 Apr–6 May 2017
23–29 Apr 2017
16–22 Apr 2017
9–15 Apr 2017
2–8 Apr 2017
26 Mar–1 Apr 2017
19–25 Mar 2017
12–18 Mar 2017
5–11 Mar 2017
26 Feb–4 Mar 2017
19–25 Feb 2017
12–18 Feb 2017
5–11 Feb 2017
29 Jan–4 Feb 2017
22–28 Jan 2017
INCLUDE
by user and borrowing activatable network licenses.15–21 Jan 2017
8–14 Jan 2017
1–7 Jan 2017
25–31 Dec 2016
18–24 Dec 2017
11–17 Dec 2016
4–10 Dec 2016: no updates of note.
27 Nov–3 Dec 2016
20–26 Nov 2016
13–19 Nov 2016
6–12 Nov 2016: no updates of note.
30 Oct–5 Nov 2016
23–29 Oct 2016
End User Setup → Further Information → Upgrading Palisade Software
Current release is now 7.5.1.
More on Networks → Upgrades → Upgrading to 7.5.1: Network Software 7.x
Standalone Licenses → Upgrades → Upgrading to 7.5.1: Standalone Software 7.x
Current release is 7.5.1; add instructions for upgrading from 7.5.0.
Troubleshooting → All Products: Startup → "Unable to cast COM object"
Troubleshooting → @RISK for Excel: Other Issues → Define Distributions Does Nothing, Results Graph Stuck at "Simulation Starting"
Troubleshooting → @RISK with Projects → After Importing Project, Excel Workbook Isn't Created
Troubleshooting → @RISK for Excel: Optimization (RISKOptimizer) → "Subscript out of range" with Efficient Frontier Optimization
Troubleshooting → PrecisionTree → "Type mismatch" with Linked Node
Troubleshooting → PrecisionTree → "Type mismatch" when Chance Node Probabilities Don't Total 100%
Troubleshooting → Network Server Issues → "Component 'Codejock.Controls.Unicode.v17.1.0.ocx' ... not correctly registered"
These problems can all be solved by upgrading to release 7.5.1, so the hotfixes and workarounds have been replaced with advice to install the new release.
Troubleshooting → All Products: Startup → "FAILURE: License is broken."
Troubleshooting → All Products: Startup → Broken License? DoItYourself Repair (7.5.1 or newer) ★
Troubleshooting → All Products: Startup → Broken License? DoItYourself Repair (7.5.0 or older)
For most users, repairing a license broken by Windows 10 updates is simpler starting with release 7.5.1.
16–22 Oct 2016
9–15 Oct 2016
2–8 Oct 2016
25 Sept–1 Oct 2016
18–24 Sept 2016
11–17 Sept 2016
4–10 Sept 2016
28 Aug–3 Sept 2016
21–27 Aug 2016
14–20 Aug 2016
7–13 Aug 2016
31 July–6 Aug 2016
24–30 July 2016
17–23 July 2016: no updates of note.
10–16 July 2016
Release 7.5.0 of our software was issued this week.
2–9 July 2016
26 June–2 July 2016
19–25 June 2016
12–18 June 2016
5–11 June 2016
29 May–4 June 2016
★ indicates a new article.
Last edited: 20230210
Additional keywords: 1479
Finding Version 8.x serial number
Standalone:
Please launch @RISK or your other Palisade product. In the @RISK ribbon or menu, click About @RISK. The 7digit number next to S/N is your serial number. If you can't start the software, but you have your Activation ID, it begins with three letters (DPS, DNS, RPS, or RNS) and 7 digits; the 7 digits are your serial number. If you don't know your Activation ID, please get your serial number from the email you received when you bought the software. If all those methods fail, your Palisade sales office (not Tech Support) may be able to look up your serial number.
Concurrent Network License (Activatable or Certificate)
To find your license details, open Palisade Server Manager and refer to the section "Active Licenses", the 7 digits serial number can be found after the first 3 letters "DNQ, DNF, DPQ, DPF, RPF, RNF, RNQ or RPQ" and will start with the number 8.
Example: RPQ8XXXXXX...
Textbook:
If you have a textbook license, the textbook details will appear instead of a serial number.
Course License (Academic)
If you have a course license through your college or university, the serial number may or may not appear. If no serial number appears, you can find it in the Palisade_Course.lic file that you received from your school; it's the 7digit number just after "SN=". If you've already installed the DecisionTools Suite course license, the Palisade_Course.lic file will be in C:\Program Files (x86)\Palisade\System or C:\Program Files\Palisade\System.
Finding Version 6.x/7.x Serial Number
Standalone:
Please launch @RISK or your other Palisade product. In the @RISK ribbon or menu, click Help, then About. The 7digit number next to S/N is your serial number. If you can't start the software, but you have your Activation ID, it begins with three letters and 7 digits; the 7 digits are your serial number. If you don't know your Activation ID, please get your serial number from the email you received when you bought the software. If all those methods fail, your Palisade sales office (not Tech Support) may be able to look up your serial number.
Concurrent Network License (Activatable or Certificate)
To find your license details, open Palisade Server Manager and refer to the section "Active Licenses", the 7 digits serial number can be found after the first 3 letters "DNF, DPF, RPF, RNF" and will start with the number 7.
Example: RPF7XXXXXX...
Note: Single DecisionTool products will have their initial letter in their Activation IDs:
Example:
Textbook
If you have a textbook license, the textbook details will appear instead of a serial number.
Course License (Academic)
If you have a course license through your college or university, the serial number may or may not appear. If no serial number appears, you can find it in the Palisade_Course.lic file that you received from your school; it's the 7digit number just after "SN=". If you've already installed the DecisionTools Suite course license, the Palisade_Course.lic file will be in C:\Program Files (x86)\Palisade\System or C:\Program Files\Palisade\System.
Finding Version 5.x Serial Number
Please launch your Palisade product. In the Excel menu, click @RISK (or the appropriate product name), then Help, then License Activation. Look at the Activation ID that appears. The serial number is the group of seven digits starting with a 5.
If no Activation ID appears, then either this is a trial version or it is a bought version that has not yet been activated. Please check your back emails for the serial number.
We have a video illustrating this procedure.
Finding Version 1.x or 4.x Serial Number
Please launch your Palisade software. In the Excel or Project menu line (the one that starts File, Edit, View) click on @RISK (or another Palisade product name). A submenu will drop down. In that submenu, click Help. A third menu will open at the side. Click on About @RISK.
In the About screen, look for S/N. The number after that is your serial number.
Last edited: 20220209
Applies to: DTS and @RISK 8.2 and newer.
Available in version 8.2, Palisade License Manager will have slight changes in its user interface:
Last Update: 20210729
Applies to:
@RISK For Excel 4.5–7.x
BigPicture 1.x(7.x)
Evolver 4.0–7.x
NeuralTools 1.0–7.x
PrecisionTree 1.0–7.x
RISKOptimizer 1.0, 5.x
StatTools 1.1–7.x
TopRank 5.0–7.x
I have multiple versions of Excel on my computer. @RISK (PrecisionTree, StatTools, ...) opens one version of Excel, but I want it to open the other version.
Or,
My Excel was recently upgraded and now when I launch @RISK it can't start Excel.
The simplest solution is to open Excel and then launch the Palisade software. If @RISK (PrecisionTree, StatTools, ...) finds a copy of Excel running, it will attach itself to that copy.
If you want a more permanent solution that will cause your Palisade software to open your desired copy of Excel, you can make an edit to the System Registry, as follows:
Close Excel if it's running. Locate the "Excel.exe" file and take note of the full file path. Caution: you need the full path, including the program name and ".exe" extension. Some examples are
C:\Program Files (x86)\Microsoft Office\OFFICE14\Excel.exe and
C:\Program Files\Microsoft Office\OFFICE11\Excel.exe
To open the Registry Editor, click the Windows Start button, then Run. Type REGEDIT and click the OK button.
When the Registry Editor window appears, navigate to
HKEY_LOCAL_MACHINE\Software\Palisade
in the lefthand pane, or if you have 64bit Windows then navigate to
HKEY_LOCAL_MACHINE\Software\WOW6432Node\Palisade
In the righthand pane, you will see two string values called Main Directory and System Directory, and possibly some additional values.
If Excel Path appears in the righthand pane, doubleclick it and edit the path to match the path you noted in step 1.
If Excel Path does not appear in the righthand pane, rightclick in the righthand pane and select New » String Value. Name the new string value Excel Path, with a space between the two words. Doubleclick the name Excel Path and edit in the path that you saved in Step 1.
Test your edit by launching the Palisade software when no version of Excel is running. If the correct Excel does not come up, edit the value of the Excel Path string. If the correct Excel comes up, close the Registry Editor by clicking File » Exit.
Reminder: This Registry setting is used only when you launch our software while Excel is not running. If Excel is already running and you click a shortcut or icon for our software, it will attach itself to the running copy of Excel, regardless of version.
Last edited: 20171221
Tech Support wants to know which version of Excel I'm running, and whether it's 32bit or 64bit Excel. How do I find that?
There are different menu selections for this in the different versions of Excel, but you can also get clues from the appearance of Excel. Just follow along with this questionnaire.
Do you see oldstyle menus, as opposed to the new ribbon? Then you are running Excel 2003 or earlier, and it is 32bit Excel. (@RISK 7 does not run in Excel 2003. @RISK 6 does, but not in earlier Excels. See the full compatibility matrix.)
Is there a round "Office button" at the top left of the Excel window, as opposed to the word File? Then you are running 32bit Excel 2007.
Does the word FILE, in all capitals, appear at the top left of the Excel window? Then you are running Excel 2013. To find whether it is 32bit or 64bit Excel, click FILE » Account » About Excel, and look at the top line of the "About Microsoft Excel" box that opens.
Otherwise, click File in the ribbon, and look at the selections that appear under File.
See also: Microsoft's documents What version of Office am I using? and Find details for other versions of Office.
Last edited: 20160426
Disponible en español: Conseguir un mayor rendimiento de Excel
Disponível em português: Obtendo o melhor desempenho do Excel
Applies to: @RISK and other Palisade addins to Excel
How much of the calculation time in my model is actually spent by Excel? Can I make my Excel worksheets calculate more efficiently?
The impact varies. @RISK (particularly RISK Optimizer), Evolver, PrecisionTree with linked trees, and TopRank are most affected by Excel calculation speed.
Microsoft has a number of suggestions for how to get better performance out of your Excel model:
Excel 2010 Performance: Tips for Optimizing Performance Obstructions (accessed 20150410) gives many specific techniques for getting better performance out of your Excel model. Most of these apply to other versions of Excel as well as Excel 2010.
Excel 2010 Performance: Improving Calculation Performance (accessed 20150410): See especially "Iteration Settings" and the large sections "Making Workbooks Calculate Faster" and "Finding and Prioritizing Calculation Obstructions".
Excel 2010 Performance: Performance and Limit Improvements (accessed 20150410) also applies to Excel 2007 explicitly and Excel 2013 implicitly.
See also:
Last edited: 20180130
While I'm using Palisade software, can I open a workbook and not have the Palisade software in the ribbon for that workbook?
Yes, you can, and this lets you work in that second copy of Excel while @RISK (Evolver, NeuralTools, ...) is running its analysis in the first copy of Excel. In that second copy of Excel, don't run a Palisade product. (If you want to work on a workbook that contains @RISK functions, they will all appear in the cells as #NAME. However, you can edit the formulas in the formula bar, copy/paste formulas, and so on.)
The terminology is important here—opening a second instance of Excel is not the same thing as opening a second workbook in Excel. If you open a second workbook, the existing copy of Excel opens it, so you have one copy of Excel running and there's one Excel line in Task Manager. You can have multiple workbooks open when running our software, but don't switch workbooks while a simulation or other analysis is running. By contrast, when you open a second instance, Windows loads a fresh second copy of Excel, and Task Manager shows two Excel lines. Our software will fail with "Object initialized twice" or another message if you try to open it in a second instance of Excel.
Confusingly, Excel 2013 and newer look like second instances when you simply open a second workbook. They show multiple taskbar icons, usually stacked. The Windows actions to switch to a different program will switch between those workbooks, even though they're open in the same program. The only way to be sure is to look at Task Manager (Ctrl+Shift+Esc) to determine whether there's one line for Excel, or more than one.
Only these specific actions will open a second instance of Excel:
With Excel 2003 through 2010, launch a second instance in the usual Windows way. The Start menu always works. With Windows 7 and Windows 8, you can also press and hold the Shift key and click the Excel box in the taskbar.
With Excel 2013, 2016, 2019, and 365, press and hold the Alt key, rightclick the Excel icon in the Windows taskbar and click the Excel icon above the Pin or Unpin option. You can release the mouse button right away, but continue holding down the Alt key until you get a prompt asking "Do you want to start a new instance of Excel?" Release the Alt key and click Yes.
Important: Don't attempt to run any Palisade software in that second instance of Excel.
I followed directions, but @RISK appeared in the second copy of Excel anyway.
First, press Ctrl+Shift+Esc to open Task Manager, and verify that there are two Excel lines. If not, you probably let go of the Alt key too soon. Assuming there are two Excels, @RISK opened in the second instance because you have it set to launch whenever Excel launches.
Remember, you can't have two copies of Excel both running palisade software, even different Palisade applications. If you want to use multiple instances of Excel, you must prevent that, as follows:
Last edited: 20181128
Applies to:
@RISK for Excel 5.x–7.x
RISKOptimizer 5.x (6.x and newer are part of @RISK)
Evolver 5.x–7.x
My simulation or optimization takes some time to run. During that time, I would like to work on another workbook. Is there any way I can use Excel for something else during a simulation or optimization?
Yes, you can open a second instance of Excel and do anything in that instance, with one exception: Don't run any Palisade product in that second instance of Excel. (If you want to work on a workbook that contains @RISK functions, they will all appear in the cells as #NAME. However, you can edit the formulas in the formula bar, copy/paste formulas, and so on.)
To open a second instance of your version of Excel, please see Opening a Second Instance of Excel.
Last edited: 20171128
Disponible en español: Ajustes Iguales para Computadores Múltiples
Disponível em português: Utilizando as mesmas configurações para vários computadores
Applies to:
@RISK, Evolver, NeuralTools, PrecisionTree, and StatTools, releases 5.x–7.x
RISKOptimizer 5.x (merged in @RISK starting with 6.0)
I'm a site administrator, and I want to ensure that everyone has the same settings for @RISK or any of the applications in the DecisionTools Suite. Is there any way I can do this?
Yes, this is easy to do. This article will give you the detailed procedure for @RISK, followed by the variations for the other applications.
You can create a policy file, RiskSettings.rsf, in the RISK5, RISK6, or RISK7 folder under your Palisade installation folder. If this policy file is present when @RISK starts up, the program will silently import the Application Settings and users will not be able to change them. Application Settings actually include two types of settings:
Default Simulation Settings, such as number of iterations, whether distribution samples are collected, and whether multiple CPUs are enabled. These are applied automatically to any new model that the user creates. However, the user does have the ability to change the Simulation Settings and save the model with the changed settings. If the user opens an existing model, created by that user or by someone else, @RISK will use the Simulation Settings stored with that model, not the default Simulation Settings from the policy file.
Global options for @RISK itself, such as whether to show the welcome screen and whether to save simulation results in the workbook. These settings are "frozen" by the policy file: the user can't change them, and they're not affected by anything in a workbook.
How to create a policy file for @RISK:
If you want to provide an optional settings file rather than a mandatory policy file, create the RiskSettings.rsf file as above but don't put it in the RISK5, RISK6, or RISK7 folder. Users can then import the settings by opening Application Settings, clicking the Reset/File Utilities icon, and selecting Import from File.
Policy files for other applications:
The procedure is the same; only the locations of the policy files change.
Settings File Name  Settings File Location 

RiskSettings.rsf  RISK7, RISK6, or RISK5 
EvolverSettings.rsf  Evolver7, Evolver6, or Evolver5 
NeuralToolsSettings.rsf  NeuralTools7, NeuralTools6, or NeuralTools5 
PTreeSettings.rsf  PrecisionTree7, PrecisionTree6, or PrecisionTree5 
RISKOptimizerSettings.rsf  RISKOptimizer5 only 
StatToolsSettings.rsf  StatTools7, StatTools6, or StatTools5 
(RISKOptimizer 6 and 7 settings are merged in RiskSettings.rsf. BigPicture and TopRank do not support policy files.) 
See also: Transferring Settings to Other Models or Other Computers
Additional keywords: RSF file, .RSF file, predefined settings
Last edited: 20150608
Applies to: All products, releases 5.x–7.x
After I adjust the Application Settings to my liking, how can I copy these settings into other models, potentially running on other PCs?
If you are concerned only with the settings for one particular model, these are stored in the workbook and there's no need to do anything special to export them. If you want to export defaults to be applied to all new models, follow this procedure:
In the Utilities » Application Settings window, click on the small disk icon at the bottom of the dialog and choose Export to File. Make note of the file location and name that you choose.
In another session or on another computer, first load your model and then click Utilities » Application Settings. Click that same disk icon and choose Import from File to load the file that you saved earlier.
You can also create a policy file with application settings that should be common to all users. Please see Identical Settings for Multiple Computers.
Last edited: 20150608
Applies to:
@RISK 7.5.2 in 32bit Excel 2013 or 2016
@RISK 7.6.x in 32bit Excel 2013, 2016, or 2019
Evolver 7.5.2 in 32bit Excel 2013 or 2016
Evolver 7.6.x in 32bit Excel 2013, 2016, or 2019
NeuralTools 7.5.2 in 32bit Excel 2013 or 2016
NeuralTools 7.6.x in 32bit Excel 2013, 2016, or 2019
PrecisionTree 7.5.2 in 32bit Excel 2013 or 2016
PrecisionTree 7.6.x in 32bit Excel 2013, 2016, or 2019
StatTools 7.5.2 in 32bit Excel 2013 or 2016
StatTools 7.6.x in 32bit Excel 2013, 2016, or 2019
Does not apply to:
BigPicture
TopRank
64bit Excel, or 32bit Excel 2010 or 2007
What does it mean to run out of process or in process, and what difference does it make to me?
@RISK and our other addins are 32bit code, and each product has a bridge to 64bit Excel. Those bridges are called RiskOutOfProcessServer7.exe, EvolverOutOfProcessServer7.exe, NeuralToolsOutOfProcessServer7.exe, PrecisionTreeOutOfProcessServer7.exe, and StatToolsOutOfProcessServer7.exe. We say that @RISK (Evolver, NeuralTools, ...) is running out of process, meaning that it doesn't run directly as part of 64bit Excel's process, but instead routes communications with Excel through the bridge.
When you're interfacing 32bit code with 64bit code, that's normal. However, in 7.5.1 and earlier releases, even with 32bit Excel 2013 and 2016, @RISK and the other tools ran out of process. With 7.5.2, that changed: when running with 32bit Excel, the tools listed above now run in process by default. This removes a layer of code and should provide better performance and greater stability, since there's no longer a separate "out of process server" layer.
If your simulations involve Microsoft Project, you'll notice a very significant speedup from running @RISK 7.6 in process.
But there are many builds of Excel 2016 out there, not to mention future Excel updates, and it's not possible to test with all of them. It's possible, though not likely, that your particular build or configuration might experience a problem with running in process, such as flashing windows or windows not appearing at all, or other issues identified by Palisade Technical Support. If this happens, you can set Palisade software to run out of process and avoid the problems.
How do I set the software to run out of process?
These settings are recorded in the current user's profile. If people log in to this computer under different Windows usernames, the others will continue running in process unless they also follow one of these two methods.
Method A: If you can launch the software, and get into Utilities » Application Settings, it's easy. In the Advanced section at the end of Application Settings, change Operating Mode to outofprocess, and click OK.
TIP: If you have the DecisionTools Suite, and some tools are working, change this setting in one of the working tools, and it will offer to change it in the others, working and nonworking. Remember to close Excel before retesting the tool that has problems.
Method B: If you can't launch the software, or the Application Settings dialog won't come up, you can use the attached OutOfProcess Registry file.
The REG file will set Registry keys for the five products listed above. If you don't have the DecisionTools Suite but only one or more individual products, the extra keys will do no harm.
What if I want to go back to running in process?
In Utilities » Application Settings » Advanced, set Operating Mode to inprocess, or use the attached InProcess file.
Are there any known issues when running in process?
Here's what we've identified so far:
Last edited: 20181128
Disponible en español: Quitar referencias obsoletas de Office del Registro del Sistema
Disponível em português: Removendo referências ultrapassadas para o Office a partir do Editor de Registro
Removing a version of Microsoft Office can sometimes leave behind "orphan" keys in the System Registry. These references to products that are no longer installed can prevent Palisade addins from working correctly with Excel, Project, or both — you may see messages such as "Applicationdefined or objectdefined error", "Automation error: Library not registered", "Error in loading DLL", "Could not contact the Microsoft Excel application", "File name or class name not found during Automation operation", or "Object variable or with block variable not set". Results graphs or other graphs may not appear as expected.
To remove the outdated references, you will need to edit the System Registry, as detailed below. If you'd rather not edit the System Registry, or you don't have sufficient privilege, you may be able to work around the problem by starting Excel first and then the Palisade software. If you'd like to make Palisade software start automatically whenever Excel starts, please see Opening Palisade Software Automatically Whenever Excel Opens. Otherwise, please proceed as follows:
Close Excel and Project.
Click Start » Run, type REGEDIT and click OK.
{0002081300000000C000000000000046} Key for Excel
Click on Computer at the top of the lefthand panel, then press Ctrl+F to bring up the search window. Paste this string, including the curly braces {...}, into the search window:
{0002081300000000C000000000000046}
Check (tick) the Keys box and Match whole string only; clear Values and Data.
Click the + sign at the left of {0002081300000000C000000000000046} to expand it. You will see one or more subkeys:
Identify the one(s) that do not match the version(s) of Excel you actually have installed. If all of them do match installed Excel versions, omit steps 5 and 6.
You are about to delete the key(s) that correspond to versions of Microsoft Excel that you do not have. For safety's sake, you may want to back them up first. Rightclick on {0002081300000000C000000000000046}, select Export, and save the file where you'll be able to find it.
Rightclick the 1.something key that does not belong, select Delete, and confirm the deletion. Repeat for each 1.something key that does not belong.
The {0002081300000000C000000000000046} key can occur in more places. Usually they all have the same subkeys, but not always, so you need to examine each instance. Tap the F3 key to get to each of the others in turn. For each one, repeat steps 4 through 6 (click the + sign, export the key to a new file, and delete the orphaned 1.something entries).
{2DF8D04C5BFA101BBDE500AA0044DE52} Key for Office
Click on Computer at the top of the lefthand panel, then press Ctrl+F to bring up the search window. Paste this string, including the curly braces {...}, into the search window:
{2DF8D04C5BFA101BBDE500AA0044DE52}
Check (tick) the Keys box and Match whole string only; clear Values and Data.
Click the + sign to expand the key. You will see one or more subkeys:
Identify the one(s) that do not match the version(s) of Office you actually have installed. If all of them do match installed Office versions, omit steps 10 and 11.
You are about to delete the key(s) that correspond to versions of Microsoft Office that you do not have. For safety's sake, you may want to back them up first. Rightclick on {2DF8D04C5BFA101BBDE500AA0044DE52}, select Export, and save the file where you'll be able to find it. (Choose a different name for this file, such as Key2.)
Rightclick the 2.something key that does not belong, select Delete, and confirm the deletion. Repeat for each 2.something key that does not belong.
The {2DF8D04C5BFA101BBDE500AA0044DE52} key can occur in more places. Usually they all have the same subkeys, but not always, so you need to examine each instance. Tap the F3 key to get to each of the others in turn. For each one, repeat steps 9 through 11 (click the + sign, export the key to a new file, and delete the orphaned 2.something entries).
Close the Registry Editor.
If you run @RISK with Microsoft Project, please follow the additional steps in Removing Outdated References to Project from the System Registry to find and remove outdated references to Microsoft Project.
The software should now run normally. After verifying @RISK (PrecisionTree, etc.), and running Excel independently of our software, you can delete the saved .REG files.
Last edited: 20160401
Removing a version of Microsoft Project can sometimes leave behind "orphan" keys in the System Registry. These references to products that are no longer installed can prevent Palisade addins from working correctly with Project — you may see messages such as "Applicationdefined or objectdefined error", "Automation error: Library not registered", "Error in loading DLL", "Could not contact the Microsoft Excel application", "File name or class name not found during Automation operation", or "Object variable or with block variable not set". Results graphs or other graphs may not appear as expected.
To search for and remove outdated COM Type Library registrations relating to Microsoft Project, please follow this procedure, which requires administrative rights:
Close Excel and Project.
Click » Start » Run, enter the command REGEDIT and click OK.
If the key does not exist, Microsoft Project may be able to recreate it. Close Registry Editor and open Project. There's no need to open an .MPP file. Close Project, then reopen Registry Editor and search for the key. If the key still does not exist, see Microsoft Project Installation below.
If the key does exist, click the + sign at the left to expand it. You will see one or more subkeys:
Identify the one(s) that do not match the version(s) of Microsoft Project you actually have installed. If all of them do match installed Project versions, omit steps 5 and 6.
You are about to delete the key(s) that correspond to versions of Microsoft Project you do not have. For safety's sake, you may want to back them up first. Rightclick on {A710764094DF1068855E00DD01075445}, select Export, and save the file where you'll be able to find it.
Rightclick the 4.something key that does not belong, select Delete, and confirm the deletion. Repeat for each 4.something key that does not belong.
The {A710764094DF1068855E00DD01075445} key can occur in more places. Usually they all have the same subkeys, but not always, so you need to examine each instance. Tap the F3 key to get to each of the others in turn. For each one, repeat steps 4 through 6 (click the + sign, export the key to a new file, and delete the orphaned 4.something entries).
Close Registry Editor.
Launch @RISK, and you should now be able to import .MPP files. After verifying @RISK, and running Project independently of @RISK, you can delete the saved .REG file.
Microsoft Project Installation
If the {A710764094DF1068855E00DD01075445} key does not exist, and Microsoft Project did not recreate it, you may have a problem with your installation of Project.
In Project, make sure you have the latest service pack installed. If not, download it and install it.
In Control Panel » Programs and Features (or Add or Remove Programs), do a Repair of Microsoft Project. (If Project, Microsoft Project, or Microsoft Office Project does not appear on a separate line, it is part of the Microsoft Office line and you should repair that.)
If all else fails, uninstall and reinstall Project, or uninstall and reinstall Office if Project is part of the Office install. (We had one customer with this issue, and none of the above worked for him, but the uninstall and reinstall solved the problem.)
Excel's COM Registrations
If the above don't solve the problem, the culprit could be Excel's COM registrations rather than Project's. Please see Removing Outdated References to Office from the System Registry to check for incorrect Excel COM registrations and remove them. The procedure is similar to the procedure in the first section of this article, but the keys are different.
Last edited: 20160401
Applies to:
All products, releases 6.x–7.x
I've always wondered  what language are your products written in? What programming language do you use? When was @RISK first released?
Current versions use a mix of C++, Visual Basic 6, Visual Basic for Applications, Visual Basic .NET, and C#.
The first version of @RISK for Lotus 123 was released at the beginning of October 1987. Its predecessor product, PRISM for DOS, was released in April of 1984. Earlier versions of PRISM for Apple II were in use starting in 1982, before Palisade was organized as a company in 1984.
@RISK for Excel first appeared some time before July 1993—the earliest user manual in our archives has that date for @RISK 1.1.1—and @RISK for Project in 1994. In July 2012, @RISK 6.0 integrated support for Excel and Project.
For more Palisade history, please see About Palisade.
Last edited: 20180628
Disponible en español: "Actualización Disponible"
Applies to: All products, releases 7.x
If you have a 6.x release, even if the update message references a 7.x release, see "An update is available." (6.x).
When I launch my Palisade software, I get a popup telling me a product update is available. I'd like to update, but I have to wait for my IT department to install it; or maybe I just prefer not to update at this time. Can I suppress the popup?
If you just click "Don't update", the reminder will appear again the next time you run the software. But you can "snooze" it for about a month by clicking "Remind me in 30 days".
To disable the reminder for yourself alone, download the attached DisablePalisadeUpdateAutoCheck(user).reg and doubleclick it. To check for updates once, click Help » Check for Software Updates. To reenable the automatic check, download EnablePalisadeUpdateAutoCheck(user).reg and doubleclick it.
To disable the reminder for all users on a given computer, follow this procedure:
regedit
and press the Enter key.CheckForUpdatesDisabled
— if it's not there, rightclick an empty area and select New » String Value to create it.CheckForUpdatesDisabled
and enter the value True
to disable update notices.Users can still check for updates when they wish, by running the software and clicking Help » Check for Software Updates.
To reenable the automatic check for updates, change the value to False
or simply delete CheckForUpdatesDisabled
.
Additional keywords: Upgrade available, Upgrade prompt, Update prompt, Upgrade message, Update message
Last edited: 20200728
Disponible en español: "Hay una actualización disponible" (6.x)
Disponível em português: "Há uma atualização disponível" (6.x)
Applies to:
All products, releases 6.2.0–6.3.1
Scenario:
When you launch your Palisade software, you get a message similar to
An update is available.
A newer @RISK (version 6.3.0) was released on 20140630.
Your maintenance contract entitles you to this update free of charge.
You'd like to update, but you have to wait for your IT department to install it. Or perhaps you prefer not to update at this time. Can you suppress the message?
Response:
If you just click "Don't update", the reminder will appear again the next time you run the software. But you can "snooze" it for about a month by clicking "Remind me in 30 days".
If you want to suppress the reminder for a longer time, you can follow this procedure:
The update notice will not appear again until the selected day.
last edited: 20150617
Disponible en español: ¿Qué licencia esta siendo utilizada? (6.x/7.x)
Disponível em português: Múltiplas Licenças  Qual será utilizada? (6.x/7.x)
Applies to: All 6.x/7.x releases, standalone and Concurrent Network client
I have more than one license, possibly even mixed between network client, activated standalone, and trial. How does the software decide which license to use?
In general, each application—@RISK, Evolver, NeuralTools, PrecisionTree, StatTools, TopRank—remembers which license you used last, and tries to reuse it the next time you run that same application. That seems like a simple idea, but in particular situations the rule can work out in surprising ways. This article explains how a Palisade application decides which license to use each time.
The key concept is the "license to use". Each application remembers the license to use, and tries to use the same license that it used last time. If you go into License Manager » Select License and pick a different license, the application remembers the new license to use for you only, not for anyone else who might log in to the same computer.
Each application remembers this separately, so different components of the DecisionTools Suite can use different licenses.
But what about the first time I run @RISK? There's no "license to use" in my user profile, because I've never run the application, so how does @RISK know which license to use?
Each application actually has two "license to use" settings, one at the machine level and one at the user level. The application uses whichever one was set more recently.
The machinelevel license to use is set at install time, and the userlevel license to use is set at run time. Details:
The installer for a standalone license presents a Customer Information screen, and sets the machinelevel license to use depending on your selection. If you select "I am upgrading" on the Customer Information screen, the installer doesn't change the license to use.
The installer for a Concurrent Network client sets the machinelevel license to use to "Network:", which tells the client software to get a license dynamically from servers listed in the System Registry key HKEY_LOCAL_MACHINE\Software\WOW6432Node\FLEXlm License Manager\PALISADE_LICENSE_FILE. (Omit WOW6432Node in 32bit Windows.)
The installer for a course license or a textbook license sets the machinelevel license to use to that license.
License Manager in each application sets the userlevel license to use, when you click OK in Select License or when you activate a license. If you select or activate a DecisionTools Suite license, License Manager sets the userlevel license to use for all products in the Suite.
When you deactivate a license in License Manager, the license to use is not changed, so the next time you run the application License Manager will appear and prompt you to select or activate a license.
Technical detail: Licenses activated during install are remembered in HKEY_LOCAL_MACHINE in the System Registry, but licenses activated or selected in License Manager are remembered only in HKEY_CURRENT_USER.
If I have a DecisionTools Suite license and an @RISK license, or @RISK Industrial and @RISK Professional licenses, what determines which one is used the first time I run @RISK?
(@RISK is just an example here. All the same rules apply to Evolver, NeuralTools, PrecisionTree, and StatTools. TopRank requires a DecisionTools Suite license.)
The first time you run @RISK, when no userlevel license to use has been set, @RISK looks for an available license depending on which installer was run most recently. If the latest or only install was the DecisionTools Suite, then @RISK will try, in order, to use a DecisionTools Industrial license, DecisionTools Professional, @RISK Industrial, @RISK Professional, and @RISK Standard. If the latest or only install was @RISK, then @RISK will try first for an @RISK license and then for a DecisionTools Suite license. Whichever one it finds, it records that as the userlevel license to use and will use the same one next time you run @RISK.
When you run a Concurrent Network client version of @RISK for the first time, it goes through the same process if it was set up to use just one license server. If it was set up with multiple license servers, then it looks on all available servers for each type of license, before moving on to look on all available servers for the next type of license. Whichever one it finds, it records the license type but not the specific server in the userlevel license to use.
Then @RISK can use a DecisionTools Suite license?
@RISK can use a DecisionTools Suite license, even if only @RISK is installed and not the whole Suite. If the Suite is installed, and you have an @RISK license, you can use @RISK on that license but the other components of the Suite can't use the @RISK license.
This gives you a lot of flexibility. For example, you might have an activated license of @RISK but decide to install the DecisionTools Suite as a trial, or on a shortterm training license. Via License Manager » Select License, you can use your activated @RISK license but run the other components of the Suite on your trial or training license.
Concurrent Network "seats" for the DecisionTools Suite are not divisible. If you have a oneuser Concurrent Network license, two people can't use the Suite at the same time, whether they're using the same component or different components. If you have a twouser Concurrent Network license, two people can use the Suite at the same time, but they are taking both "seats" between them, whether they're using the same component or different components.
What if the license I was using becomes unavailable—it expires, or it's a Concurrent Network license and all seats happen to be taken? Is there automatic failover if another license is available?
In a Concurrent Network client, the software will automatically fail over to any unexpired license for the same product and edition, if one exists on any server listed in PALISADE_LICENSE_FILE (above), but it won't automatically use license for a different product or edition on any server. In the latter case, the user can still click Select License in License Manager to see if any suitable licenses are available.
For other license types, there's no automatic failover. The software will tell you that the license is no longer usable. In License Manager, you can then click Select License and select the other license. The application will remember that choice next time.
Can you give some examples?
You have DecisionTools Suite Professional (activated) and you install a trial of @RISK Industrial (trial). Whenever you run Evolver, NeuralTools, PrecisionTree, StatTools, or TopRank, it will continue to use the DecisionTools Suite Professional license. The next time you run @RISK, you will get the Industrial trial license, but you can switch to the activated Professional license by clicking Help » License Manager » Select License.
You have @RISK (activated), and you install a DecisionTools Suite Industrial trial. Whenever you run any application in the Suite, including @RISK, it will use the DecisionTools Suite Industrial trial license. If you are preparing a presentation and want to avoid the Trial watermarks in your graphs, you can switch @RISK to the activated license by clicking Help » License Manager » Select License. After that, @RISK will continue to use the activated license, but the other components will use the trial license.
You install @RISK without activating it, so all user profiles are running on a trial license. Later, you activate the software. @RISK remembers to use the activated license for you, but it still remembers the trial for another user who previously ran on the trial license. That user can select the activated license via Select License in License Manager. See One User Doesn't Get the Activated License.
A Concurrent Network client of the DecisionTools Suite was installed on your computer, and you launch @RISK. Your company's license server has an @RISK Industrial license and a DecisionTools Suite Professional license. Since the last product installed was the Suite, @RISK uses the DecisionTools Suite Professional license. However, you can open License Manager » Select License and select the @RISK Industrial license, and @RISK will remember your selection the next time.
Your company has two license servers, A and B, and the Evolver install on your computer is set up to use both of them in that order. A has a Concurrent Network license for the DecisionTools Suite Professional, and B has Evolver Industrial. The first you run Evolver, even though server A is listed first Evolver will use the Evolver Industrial license from server B, because the software tries to choose a license that matches exactly what was installed.
You are a university IT administrator, and you install standalone copies of the DecisionTools Suite in your computer lab, with the course license. A year later, you place the next year's license on all the lab computers. Each student who tries to run gets a message that no license is available, and must use Select License to elect the new license. (This happens because the license to use is separately stored for each user. To override the old setting for all users, you must reinstall the software with the new license, or use the System Registry edit shown in Changing Standalone Workstation to Concurrent Client.)
Last edited: 20150730
Applies to:
Palisade Custom Runtime (PCR)
Palisade's Excel addins, releases 5.x–7.x
How can I control @RISK or my other products through Visual Basic for Applications (VBA)?
The Excel Developer Kits (XDKs) ship with the Professional and Industrial Editions of our products. These are Visual Basic libraries that let you control @RISK and our other applications. They let you exercise maximum control with minimum development time, but your user must purchase and install the Palisade application. For an introduction to using an XDKs, run the product and click Help » Developer Kit (XDK) » Automation Guide. For a complete reference to all objects, properties, and methods, see the XDK Reference in the same menu.
Can I include the calculations in my own applications with my own user interface instead of Palisade's?
For this requirement, we offer the Palisade Custom Runtime (PCR). The PCR contains the calculation engines of most of our Excel addins. This means that PCR applications can run on computers that don't have @RISK or our other addins, or even Excel. Applications using the PCR are developed as part of a customized development agreement with Palisade. Please visit our Custom Development page or consult your Palisade sales manager or sales@palisade.com for more information about the PCR and custom development.
Additional keywords: Automation of Palisade software
Last edited: 20170619
Applies to these titles:
Decision Making under Uncertainty with RISKOptimizer
Decisions Involving Uncertainty: @RISK for the Petroleum Industry
Energy Risk Modeling
Evolver Solutions for Business
Financial Models Using Simulation and Optimization, v1 or v2
Learning Statistics with StatTools
Modelos Financieros com Simulación y Optimización
RISKOptimizer for Business Applications
El Riesgo en la Empresa: Medida y control mediante @RISK
@RISK Bank Credit and Financial Analysis
I bought a book from Palisade. Where can I download the examples used in the book?
Please follow this link to download the examples from any of the listed books.
Last edited: 20190305
Applies to:
All products
Question:
I've been hearing about this Heartbleed security problem in OpenSSL code. Are @RISK and the other Palisade products vulnerable?
Response:
No. The only Internet operations are Automatic Activation (if you select it) and checking for updates, both of which connect with our server. Our server does not use OpenSSL to support these operations. We have checked with Flexera Software, which provides our licensing software, and they have verified that the modules that we use are clean.
See also:
Heartbleed is listed as CVE20140160 by the U.S. Department of Homeland Security, for example on these pages:
Alert (TA14098A): OpenSSL 'Heartbleed' vulnerability (CVE20140160) from USCERT, the United States Computer Emergency Readiness Team, provides a brief introduction and links to several sites including Heartbleed.com.
Vulnerability Summary for CVE20140160 from NIST National Vulnerability Database lists many technical references.
last edited: 20140507
Applies to:
All releases 7.x
BigPicture releases 1.x and 2016
If you have earlier software, these diagnostics won't work. Use Troubleshooter for Releases 6.x: PalDiagnostics6 or Troubleshooter for Releases 5.x: PalDiagnostics5.
Exception: Enhanced testing for system DEP status and process DEP status, introduced on 20170109, is available only in PalDiagnostics7. Those tests will work even if you have release 5.x or 6.x Palisade software, though many other tests will fail.
This utility will take a snapshot of the license and other settings on your computer for Palisade software release 7.x and for Excel, to help us figure out just what's wrong and how to fix it. Nothing is installed or changed on your computer. This utility simply copies the relevant settings and information to a file called PalDiagnostics7.txt in your temporary folder.
Download the attached file to your desktop. (In your browser, select Save, not Open or Run.)
If you have Windows 7, 8, 10, or Vista, rightclick on the file and select Run As Administrator. If you have an earlier version of Windows, doubleclick on the file to launch the utility. (Either way, it's important to run the diagnostics within the end user's login, because some settings vary from one user profile to another. Ask an IT person to help you if you are the end user and unable to run the utility.)
Click the button Run Tests. (Enable Runtime Logging is not needed.)
When the utility finishes, you'll see a window on your desktop that contains a file called PalDiagnostics7.txt. Click File » Save As, and save the file to your desktop or any convenient location.
Attach the saved PalDiagnostics7.txt file to your email to Tech Support; don't paste the contents of the file into the body of your email.
Please note: The diagnostics utility is meant for your use in conjunction with Palisade Technical Support. While you're certainly free to look at the output, it's not presented in a userfriendly way.
Last edited: 20180726
Applies to: All products, releases 6.x
If you have earlier or later software, these diagnostics won't work. Use Troubleshooter for Releases 7.x: PalDiagnostics7 or Troubleshooter for Releases 5.x: PalDiagnostics5.
Please note: The diagnostics utility is meant for your use in conjunction with Palisade Technical Support. While you're certainly free to look at the output, it's not presented in a userfriendly way.
This utility will take a snapshot of the license and other settings on your computer for Palisade software release 6.x and for Excel, to help us figure out just what's wrong and how to fix it.
Nothing is installed or changed on your computer. This utility simply copies the relevant settings and information to a file called PalDiagnostics6.txt in your temporary folder.
Click this link.
In your browser, select Save, not Open or Run, and save the file to your desktop.
If you have Windows 7, 8, 10, or Vista, rightclick on the file and select Run As Administrator. If you have an earlier version of Windows, doubleclick on the file to launch the utility. (Either way, it's important to run the diagnostics within the end user's login, because some settings vary from one user profile to another. Ask an IT person to help you if you are the end user and unable to run the utility.)
Click the button Run Tests. (Enable Runtime Logging is not needed.)
When the utility finishes, you'll see a window on your desktop that contains a file called PalDiagnostics6.txt. Click File » Save As, and save the file to your desktop or any convenient location.
Attach the saved PalDiagnostics7.txt file to your reply email; don't paste the contents of the file into the body of your email.
Last edited: 20180521
Applies to: All products, releases 5.x
If you have later software these diagnostics won't work. Use Troubleshooter for Releases 7.x: PalDiagnostics7 or Troubleshooter for Releases 6.x: PalDiagnostics6.
Please note: The diagnostics utility is meant for your use in conjunction with Palisade Technical Support. While you're certainly free to look at the output, it's not presented in a userfriendly way.
This utility will take a snapshot of the license and other settings on your computer for Palisade software release 5.x and for Excel, to help us figure out just what's wrong and how to fix it.
Nothing is installed or changed on your computer. This utility simply copies the relevant settings and information to a file called PalDiagnostics5.txt in your temporary folder.
Click this link.
In your browser, select Save, not Open or Run, and save the file to your desktop.
If you have Windows 7, 8, 10, or Vista, rightclick on the file and select Run As Administrator. If you have an earlier version of Windows, doubleclick on the file to launch the utility. (Either way, it's important to run the diagnostics within the end user's login, because some settings vary from one user profile to another. Ask an IT person to help you if you are the end user and unable to run the utility.)
Click the button Run Tests.
When the utility finishes, you'll see a window on your desktop that contains a file called PalDiagnostics5.txt. Click File » Save As, and save the file to your desktop or any convenient location.
Attach the saved PalDiagnostics5.txt file to your reply email; don't paste the contents of the file into the body of your email.
Last edited: 20160601
Applies to:
All products, releases 7.5.x/7.6.x
This file is intended for use under guidance of Palisade Tech Support.
We have seen one or two cases where the installer ran without error, but the interfaces for our software were not registered. We don't know what prevented the registrations from being made during install or broke them after install, but we have a batch file that should reregister everything without running the installer. It also contains extra error checking aimed specifically at this issue. However, it doesn't diagnose missing files–it assumes those are part of products you haven't installed.
If Palisade Technical Support representatives direct you to this article, please follow the directions and report the results back to them.
If the registrations all run successfully, you'll get "Success!" in the window. In that case, retry the operation that was a problem before.
If you get "FAILURE" in the window, make a screen shot of the command window and of any popup window and send them to the Palisade representative.
Last edited: 20181009
I've just installed @RISK. How do I learn to use it? Where do I start?
Welcome to @RISK! If you can represent your problem as a base case in Excel, you can add @RISK to that model to analyze and model uncertainty.
We have videos for every stage of your learning:
@RISK also comes with numerous examples preinstalled. (In the @RISK menu, click Help » Example Spreadsheets.) These are generally small "toy" models to show you particular techniques or illustrate various applications or features of the software.
You'll find answers to a lot of frequently asked questions under Techniques and Tips in our searchable Knowledge Base. And if you see a message you don't understand, chances are good you'll find it, with a solution, in our Troubleshooting section. Tech Support can also help you with messages that aren't clear, or with particular features of the software.
More intensive training is available in ondemand webinars and live webinars. We also offer inperson regional training.
Last edited: 20181214
Question:
I'd like to connect with other @RISK users on line. Do you have any kind of user group?
Response:
Yes, there is a LinkedIn group here: "Palisade Risk and Decision Analysis".
There are also Palisade's own blogs for all products.
For other venues like Facebook and Twitter, please visit our corporate directory and hover your mouse on SUBSCRIPTION near the top of the page.
last edited: 20210928
Applies to:
@RISK 6.x/7.x ("Trials" applies to @RISK Industrial)
What's the difference between iterations and simulations in Simulation Settings? Which one should I set to which number?
An iteration is a smaller unit within a simulation. At each iteration, @RISK draws a new set of random numbers for the @RISK distribution functions in your model, recalculates all open workbooks or projects, and stores the values of all designated outputs. At the end of a simulation, @RISK prepares any reports you have specified.
For example, if you run 5000 iterations and 3 simulations, then at the end of the analysis you can look at three histograms for each @RISK output. Each histogram summarizes the 5000 values for the 5000 iterations of one of the three simulations.
You can set the numbers of iterations and simulations in the @RISK ribbon, or on the General tab of Simulation Settings. For most analyses, you will want N iterations and 1 simulation. If you use the same set of assumptions for all simulations, you will usually get better results with one simulation of 15000 iterations than with three simulations of 5000 iterations.
But setting simulations greater than 1 is useful in several situations, such as these examples:
I'm running an optimization with RISKOptimizer. How to trials relate to simulations or iterations? Why is the number of valid trials different from the number of trials?
RISKOptimizer places a set of values in the adjustable cells that you designated in the Model Definition, then runs a simulation. At the end of the simulation, RISKOptimizer looks at the result and decides whether enough progress has been made o declare the optimization finished. That is one trial. On the next trial, RISKOptimizer places a different set of values in the adjustable cells—using the results of earlier trials to decide which values—and then runs another simulation.
The difference between trials and valid trials depends on your hard constraints. A valid trial is one that meets all hard constraints. If a trial is not a valid trial, RISKOptimizer throws away the result of that simulation. If your proportion of valid trials to total trials is small, you may want to look at restructuring your model so that the optimization can make progress faster. For more, see For Faster Optimizations.
Additional keywords: Simtable
Last edited: 20180611
Applies to:
@RISK 5.x and newer, Industrial Edition
Evolver, all releases
What's the difference between simulation and optimization? Does a simulation just add stochasticity to an optimal value?
It kind of goes the other way, actually.
Initially, you probably have a deterministic model in mind. If you want to know what choices you should make in a deterministic setting, you use Evolver to do a deterministic optimization.
But it's more common to take that deterministic model and replace some constants with probability distributions. This reflects your best estimates of the effects of chance — events you can't control. These probability distributions are inputs to @RISK. You also identify outputs of @RISK, Excel cells that are the results of your logic, and whose values you want to track in the simulation. Then, you run an @RISK simulation to determine the range and likelihood of outcomes, taking chance effects into account. This can be done in any edition of @RISK.
See also: Risk Analysis has much more about deterministic and stochastic risk analysis.
An optimization asks a higherlevel question while still keeping the probabilistic elements: what about the things you can control? What choices can you make that improve your chances of a favorable outcome? You identify in your model the constants that represent choices you can make; these are called adjustable cells. You can place constraints on those cells, and additional constraints on the model if appropriate. Your model still keeps the probability distributions mentioned above for events that are outside your control. Now you run an optimization in the RISKOptimizer menu within @RISK Industrial Edition.
RISKOptimizer starts with one possible set of choices — one set of adjustable cell values — and then runs a simulation to find out the probabilistic range of outcomes if you made those choices. It chooses another set of adjustable cells and runs a new simulation. The optimizer continues this process, making different sets of choices for the adjustable cells and running a full simulation on each set. Some sets of choices have a better outcome than others, as measured by the target you specified for optimization; this guides @RISK in deciding which sets of choices to try because they're more likely to improve the outcome. Every set of choices gets a full simulation.
At the end of the optimization, you have a set of best values for your adjustable cells. These tell you the choices to make so as to maximize your chance of getting the most favorable outcome, based on your target. And the simulation with that set of adjustable cells tells you the range and probabilities of your outcomes.
Last edited: 20160314
También disponible en Español: Resultados diferentes con la misma semilla fija para varias distribuciones
Problem:
When comparing the random numbers sequence generated for each distribution in a model, they are different when simulated with these scenarios:
Explanation:
The difference can occur because distributions in the model are defined differently. One model could have more distributions or the same number of distributions, but these were defined in a different order.
Since @RISK is sampling a different number of distributions or a list of distributions ordered differently, they are effectively distinct models, and the same results should not be expected. The same model will always produce the same results using the same fixed seed.
For example, suppose I am using a fixed seed that happens to generate the following numbers using RiskUniform(0,1): 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7. (Of course, a pattern like this is enormously unlikely; it's just chosen to make the example easy to follow.)
If I use that same fixed seed and run a simulation with seven iterations, I will always get those values precisely in that order. In other words:
Iteration value of RiskUniform(0,1)
1 0.1
2 0.2
3 0.3
4 0.4
One difference is the number of distributions. So, if I add another RiskUniform(0,1) to the spreadsheet and run seven iterations, the results will be different. The same seed list is generated and used, but now two distributions are sampled from it. In other words:
Iteration Value of first RiskUniform(0,1) Value of second RiskUniform(0,1)
1 0.1 0.2
2 0.3 0.4
3 0.5 0.6
4 0.7 [next value in seeded list]
Another reason for the difference is distributions were defined in a different order. So if I add a RiskPoisson(5) and another RiskUniform(0,1), or first a RiskUniform and then a RiskPoisson and run seven iterations, the results will be different. The same fixed seed is used, but now three distributions are sampled from it, and these are the numbers generated for the RiskPoisson: 2,4,7,5,1,3,6.
In other words:
Iteration 
Value of first RiskUniform(0,1) 
Value of second RiskUniform(0,1) 
value of RiskPoisson(5) 

1 
0.1 
0.2 
7.0 

2 
0.4 
0.5 
3.0 

3 
0.7 
[next value in seeded list] 







Or, with a different order
Iteration 
Value of first RiskUniform(0,1) 
Value of RiskPoisson(5) 
Value of second RiskUniform(0,1) 

1 
0.1 
4.0 
0.3 

2 
0.4 
1.0 
0.6 

3 
0.7 
[next value in seeded list] 
The first model with only one distribution will always produce the same results for the same fixed seed.
The other models with two or three distributions will always have the same random number sequence for the same fixed seed. But the samples will not be the same because they are assigned differently. Ultimately, all samples converge to the same desired distributions, that is, the same statistics, making their results correct and comparable.
Also, consider that If Latin Hypercube sampling is in effect, we can no longer draw purely random samples since we need to ensure that a random sample is drawn from each Latin Hypercube bin. For this reason, you can see that samples will not be identical after a few iterations and will only match the last digits. Read more about this in: Latin Hypercube Versus Monte Carlo Sampling
If identical answers are critical, perhaps another approach is in order. These are some possible solutions:
Last update: 20230209
Applies to: @RISK for Excel 4.x–7.x
@RISK puts the number of iterations into reports and windows, but how can I get it into my worksheet? I need to use it in calculations.
With @RISK 6.x/7.x, use the formula =RiskSimulationInfo(4).
With @RISK 5.7 and below, place =RiskCurrentIter( ) in any convenient cell, say for example AB345, and then the formula =RiskMax(AB345) in any other cell will give you the number of iterations upon completion of the simulation.
Additional keywords: SimulationInfo, CurrentIter
Last edited: 20150608
Applies to: @RISK for Excel 5.x–7.x
How many iterations do I need to run in my simulation so that the estimate of the mean is calculated within a specific confidence interval?
The answer depends on whether you're using traditional Monte Carlo sampling or the default Latin Hypercube sampling.
Monte Carlo Sampling:
(This part of this article is adapted from "How Many Trials Do We Need?" in the book Simulation Modeling Using @RISKby Wayne L. Winston [Duxbury, 2000].)
The attached example, ConfIntervalWidth2.xls, uses traditional Monte Carlo sampling. Let's suppose that we want to use simulation to estimate the mean of the output in cell B11 and be accurate within 5 units 95% of the time. The number of iterations needed to meet these requirements can be calculated using the following formula:
n = [ z_{α/2} S / E ] ²
In this formula,
For a 95% confidence level, as shown in the attached example, 95 = 100(1α). Then α is 0.05 and α/2 is 0.025. To compute z_{α/2} in Excel, use the NORMSINV function and enter =NORMSINV(1α/2, 0, 1). Cell E13 of the attached example shows a Z value of approximately 1.96 for a 95% confidence interval.
To obtain an estimate for the standard deviation of the output, the @RISK statistics function RiskStdDev was placed in cell B14 and a simulation was run with just 100 iterations. This gave us a standard deviation of approximately 53.5. If we plug the above information into our formula, we get
n = [ 1.96 × 53.5 / 5 ] ² = 440
Thus, if you use Monte Carlo sampling, you should run at least 440 iterations to be 95% sure that your estimate of the mean of the output in cell B11 is accurate within ±5 units.
Latin Hypercube Sampling:
The Latin Hypercube method produces sample means that are much closer together for the same number of iterations. With the Latin Hypercube method, a smaller number of iterations will be sufficient to produce means within the desired confidence interval, but there's no simple calculation to predict the necessary number. See Latin Hypercube Versus Monte Carlo Sampling, and the section "Confidence Interval with Latin Hypercube Sampling" in Confidence Intervals in @RISK.
Convergence:
Rather than try to precompute the necessary number of iterations, you may find it simpler just to set your convergence criteria and let @RISK run until the desired level of confidence has been reached. In Simulation Settings, on the General tab, set the number of iterations to Automatic. Then on the Convergence tab, set your convergence criteria. Notice that the margin of error ("Convergence Tolerance") is set to a percentage of the statistic being estimated, not to a number of units.
Last edited: 20150608
Applies to: @RISK Professional and Industrial Editions, releases 6.2, 6.3, and 7.x
Do I need SQL on my computer to read and write @RISK libraries on other computers?
Yes, the @RISK Library on the local computer needs compatible SQL software to talk to the remote database. If you're not storing @RISK Library databases on your local computer, you could use SQL Native Client or SQL Server to access the remote databases. A computer that hosts an @RISK Library database needs SQL Server, and it must be running a Server version of Windows. Please see SQL Versions and Installation: SQL with @RISK 6.2 and later for more.
Connecting to an existing database on a remote computer:
Make the appropriate selection to open the @RISK Library window:
Once in the @RISK Library window, click the books icon near the middle of the screen. The icon displays "Connect, Create, or Attach to Databases" if you hover your mouse over it.
Click Connect.
On the SQL Connection screen, select an authentication method. "Microsoft Authentication" means your standard Windows login will be used; this is correct for most users. If necessary, change to "SQL Server Authentication" and enter your user name and password.
@RISK will search your network for installed SQL servers; this can take some time. The list includes all computers with SQL server software installed, whether they actually have any databases or not.
When the list appears, click the name of the computer where you want to access an @RISK Library database. @RISK will then query that server for available databases.
If no databases appear, either none exist on that server, you don't have privilege to access them, or you didn't specify the correct user name and password. Please see Library Can't Connect to Networked Database for troubleshooting.
Select the desired database and click Connect. The database will be added to your list of Current SQL Server Connections, and @RISK will remember the connection next time.
Creating a new database on a remote computer:
Make the appropriate selection to open the @RISK Library window:
Once in the @RISK Library window, click the books icon near the middle of the screen. The icon displays "Connect, Create, or Attach to Databases" if you hover your mouse over it.
Click Create.
On the SQL Connection screen, select an authentication method. "Microsoft Authentication" means your standard Windows login will be used; this is correct for most users. If necessary, change to "SQL Server Authentication" and enter your user name and password.
@RISK will search your network for installed SQL servers; this can take some time.
When the list appears, click the name of the computer where you want to create an @RISK Library database.
Type a database name and click Create. The database will be added to your list of Current SQL Server Connections, and @RISK will remember the connection next time.
If the screen closes when you click Create, but the new database is not shown on the Current SQL Server Connections screen, it was not created. Either you don't have the necessary access rights on that computer, or you didn't enter the correct authentication information. Please see Library Can't Connect to Networked Database for troubleshooting.
See also: "Library" in the Guided Tour of @RISK is a short video that shows you how to save distributions and results in a library and how to make use of them in your model.
Last edited: 20150326
Applies to:
@RISK 5.x–7.x, Professional and Industrial Editions
Since the @RISK Library is an SQL database, can I use SSAS (SQL Server Analysis Services) or SSRS (SQL Server Reporting Services) with it?
The @RISK Library is an SQL database, and to use the @RISK Library you must have SQL Server installed. Since SSAS or SSRS can work with SQL databases, in principle they could work with the @RISK Library. However, it's hard to see what useful information they could obtain.
The @RISK Library is really intended to be accessed only by @RISK, and not by external programs. Therefore, we have not prepared any documentation about the organization of the @RISK Library. External programs definitely should not alter the @RISK Library databases in any way. Technical Support is unable to assist with setting up or debugging SQL database queries, but we have a Custom Development department that can assist you if there is some reason why you need readonly access to the @RISK Library outside of @RISK. Please contact your Palisade sales manager if that is of interest to you.
Last edited: 20180806
Disponible en español: Compartir modelos de @RISK con Colegas que no poseen @RISK
Disponível em português: Compartilhar modelos do @RISK com colegas que não possuem @RISK
I have @RISK for Excel. I would like to ship my worksheet with results to a colleague who has Excel but not @RISK. Can I do this?
If you have @RISK 5.0 or later, your colleague doesn't need any special software. The Swap Out Functions feature makes it very easy to share workbooks with colleagues who don't have @RISK.
After you swap out functions, the @RISK functions are all replaced with numbers. Save your workbook, and your colleague can view it in Excel with no need for other software. (This replaces the Spreadsheet Viewer that was used with @RISK 4.x.)
When you reopen the workbook, the functions should be swapped back in automatically. If you have any difficulties, please see @RISK Functions Don't Reappear after Swapping Out.
If you have an earlier version of @RISK and you'd like to use this feature, please contact your Palisade sales manager to obtain the current version.
Which numbers does @RISK place in the cells in place of the distribution functions?
By default, @RISK will replace functions with the displayed static values of the functions, as defined in Setting the "Return Value" of a Distribution. But when you request the swap, you can open the Swap Options dialog to override this. In Swap Options, you can specify expected values, most likely values (mode), or a percentile for all functions that don't have RiskStatic property functions defined.
See also: Sharing @RISK Models with Colleagues Who Don't Have @RISK
Last edited: 20170106
Also available in Spanish: Verificación de precedentes (análisis de sensibilidad inteligente)
Applies to: @RISK for Excel version 5.x–7.x
When I run my model in @RISK, it seems to take a long time before the first iteration. The status bar shows that it is checking precedents. Is something wrong?
Precedent checking (also known as precedent tracing or Smart Sensitivity Analysis) is a new feature in 5.0 and later versions. Its purpose is to prevent @RISK inputs from incorrectly showing up in Regression/Sensitivity analysis such as tornado graphs.
For example, consider a simple model with two inputs. The two inputs are correlated – let's say to the full extent, with a correlation coefficient of 1.0. One input is used in a calculation for a RiskOutput. The other input is not involved in any calculation which impacts the RiskOutput. In earlier versions, both inputs would be displayed as having equal impact on the output. With precedent checking, @RISK determines that only one of these inputs contributes, and filters out the other one from graphs, reports, etc.
The tradeoff is that it may take quite a bit of time to go through the full precedent tree before a simulation is run. By turning off data collection for some or all inputs, that process can be sped up, though at the cost of not being able to analyze those inputs.
If you set Collect to None, you can still collect certain inputs by designating them as outputs. You will then be able to get statistics and iteration data on them, but they won't be available for sensitivity analysis.
You can disable Precedent Checking while still collecting inputs. In Simulation Settings, on the Sampling tab, change Smart Sensitivity Analysis to Disabled to disable precedent checking for a particular model. If you want to change the default for all models, open Utilities » Application Settings and look in the Default Simulation Settings section.
You could also use RiskMakeInput( ) functions to exclude some particular inputs from precedent tracing. See Combining Inputs in a Sensitivity Tornado, Excluding an Input from the Sensitivity Tornado, and Same Input Appears Twice in Tornado Graph.
Does Smart Sensitivity Analysis have any limitations?
Certain formulas are correct Excel formulas, but Smart Sensitivity Analysis cannot work with them. Either their values can change at run time in ways that @RISK can't predict, or they are too complex and would take too much time when the simulation starts. These include:
INDIRECT( ) functions.
OFFSET( ) functions.
INDEX( ) when used to return a reference. (When used to return a value, INDEX( ) does not interfere with Smart Sensitivity Analysis.)
VLOOKUP( ) and HLOOKUP( ) functions.
These are a special case in that they don't actually prevent Smart Sensitivity Analysis from happening. However, @RISK can't know in advance which values in the lookup table Excel will return, so it considers every nonconstant cell in the cell to be a precedent of the output.
3D references such as a sum across multiple worksheets.
Structured references in tables, such as [column name]—a problem only with @RISK 6.2.1 and older.
(@RISK 5.x cannot handle through any structured references. @RISK 6.x can trace precedents through all structured references, except that @RISK 6.0.0–6.2.1, in Excel 2010 and 2013 only, cannot trace precedents through formulas that use @ for [#This Row].)
References to external workbooks.
(@RISK 6.1.1 and later don't display a message for these.)
References to Internet resources, such as http links.
(@RISK 6.1.1 and later don't display a message for these.)
In all the above cases, calculations are still done correctly during your simulation; it's just that for these cases @RISK cannot trace precedents.
If your model contains one of these formulas, when you start simulation a message will pop up: "could not be parsed", "invalid formula", or similar. To proceed with the simulation, click the Yes button in the message. If you want to prevent this message from appearing in the future, either change the formula (if you can), or disable Smart Sensitivity Analysis for this model. To disable Smart Sensitivity Analysis, click the Simulation Settings icon, select the Sampling tab, and change Smart Sensitivity Analysis to Disabled. Click OK and save the workbook.
Last edited: 20200320
Applies to:
@RISK 5.7.1–7.x
TopRank 5.7.1–7.x
Can @RISK and TopRank work with Excel tables?
There are actually three types of tables in Excel: tables, data tables, and pivot tables.
Excel tables and data tables:
@RISK and TopRank can handle Excel tables and data tables without any special action on your part.
If the table contains @RISK functions, it will get reevaluated in every iteration, which can be time consuming. Also, if you have @RISK functions in a data table, as @RISK rewrites formulas while setting up the simulation, the data table will get reevaluated once for each @RISK function, and therefore the simulation will take longer to start. (For why @RISK must do this, see @RISK Changes Worksheet Formulas.)
If your model's logic really does not need @RISK functions inside a data table, removing them may speed up your simulations.
If you have release 5.7.0 or earlier, you should know about an Excel behavior that looked like a problem in @RISK. When you enter or edit a formula in a cell adjacent to a table, Excel may expand the table to include the additional row or column. As mentioned above, when starting a simulation or analysis, @RISK and TopRank rewrite all formulas that include @RISK or TopRank functions. That rewrite sometimes triggers Excel to expand the table. This doesn't affect 5.7.1 and newer releases, but if you have an earlier release, either upgrade your software or structure your models with at least one blank row or column between your table and the rest of your model.
Pivot tables:
Pivot tables are not automatically recalculated in an @RISK simulation, and in fact you don't want to recalculate a pivot table if it doesn't depend on any @RISK functions. If you have any pivot tables that do depend on @RISK functions, create an afteriteration macro that calls Excel's RefreshTable method for each pivot table, and register that macro on the Macros tab of @RISK's Simulation Settings. A very basic example is attached.
TopRank does not provide for executing macros within an analysis. If you have pivot tables that depend on any of your TopRank inputs, the analysis may not be correct because those pivot tables are not recalculated. If your pivot tables don't depend on your TopRank inputs, then the analysis will be performed correctly.
Last edited: 20150608
Applies to: @RISK for Excel 5.x–7.x
When I open certain Excel files, I get the message
The workbook workbookname has @RISK simulation settings stored in it. Do you want to change the current @RISK settings to match those stored in this workbook?
I try to clear all data via @RISK utilities before opening the workbook, but I still get this message. I need to get rid of this message as it makes all my VBA code stop. How can I suppress it?
The message is telling you that the workbook you're about to open has simulation settings inconsistent with the currently open workbook or with your defaults stored in Application Settings. It wants you to decide which set of settings should be in effect, since all open workbooks must have the same settings. You may be able to eliminate or at least reduce these warnings by adjusting your Application Settings, if you always make the same choices for all models. That is the simplest and safest approach.
You can suppress the warning and either accept or ignore the new workbook's settings by executing a line of Visual Basic code. Please see the @RISK for Excel Developer Kit manual for instructions on setting the required reference to @RISK to allow this code to execute.
(In addition to the specific code functions mentioned below, you will need to create one or more references in the Visual Basic Editor. Please see Setting References in Visual Basic for the appropriate reference and how to set it.)
To suppress the message and load settings from the new workbook, use the Risk.SimulationSettings.LoadFromWorkbook method. For details and an example, please see "LoadFromWorkbook Method" in the @RISK for Excel Developer Kit manual referenced above.
To suppress the warning and ignore the settings in the new workbook, execute the following code in a macro before opening the workbook:
Risk.DisplayAlerts = False
After you open the workbook, we strongly recommend(*) executing this code:
Risk.DisplayAlerts = True
(*) Caution: Setting DisplayAlerts to False is potentially dangerous, because it suppresses all warnings from @RISK. Therefore, we strongly recommend that your macro set it back to True immediately after opening the workbook.
My problem is similar, but I'm getting that prompt when I open workbooks that didn't have any @RISK functions in them. I don't want to insert this macro in every workbook; what can I do?
Here is how that situation can arise: When you save a workbook while @RISK is running, if the current simulation settings are different from the current Application Settings, @RISK stores the current simulation settings in a hidden sheet in the workbook. This occurs whether or not the workbook contains any @RISK functions (because for all @RISK knows you might intend to add some @RISK functions to it later). If you later open your @RISK model and change some settings, the new stored settings in the @RISK workbook are different from the old stored settings in your non@RISK workbook, so when you open the non@RISK workbook you get the prompt.
To solve this, you need to remove the @RISK settings from the non@RISK workbooks and ensure that they are not written again in the future:
If later you want to change simulation settings in your @RISK workbook, do it by changing Application Settings. Remember, when you store a non@RISK workbook, you want Application Settings and simulation settings to be the same, so that simulation settings don't get stored in the non@RISK workbook. As an alternative, you can unload the @RISK addin before storing the non@RISK workbooks.
See also: @RISK Changes Simulation Settings When Non@RISK Workbook Is Opened (only with @RISK 6.3)
Last edited: 20151204
Question:
Can I use @RISK to build a model with Markov chains?
Response:
With @RISK, either alone or in combination with PrecisionTree, you can create a Markov chain. But you have to create the statefulness yourself, either in Visual Basic code or possibly in RiskData worksheet functions. Please see the attached example, Price Evolution in Markov Chain.
In the @RISK help file and user manual, the section "Reference: Time Series Functions" says "GBM processes have the Markov (memoryless) property, meaning that if the current value is known, the past is irrelevant for predicting the future." But those are unrelated Markovs, not useful in creating a Markov chain.
last edited: 20131022
Applies to: @RISK 5.x–7.x
Can I use @RISK to test for stochastic dominance?
Yes. The basic technique is overlaying the two cumulative ascending curves.
In @RISK 6.x/7.x, click Help » Example Spreadsheets » Statistics/Probability and select the last highlighted example, Stochastic Dominance. If you have @RISK 5.x, the Stochastic Dominance example is not included, but you can download the attached copy.
Last edited: 20150608
Applies to:
@RISK 5.x–7.x
TopRank 5.x–7.x
How do @RISK and TopRank deal with circular references?
@RISK and TopRank are fully able to cope with them, if you have set Excel's option to perform iterative calculations:
For more about appropriate settings for this option, see Microsoft's Knowledge Base article Make a circular reference work by changing the number of times that Excel iterates formulas (accessed 20150608, part of Remove or allow a circular reference).
Microsoft provides more detailed information about circular references, including troubleshooting tips and a tutorial on iterative calculation in a different Microsoft Knowledge Base article with the same title: Remove or allow a circular reference (accessed 20150608).
How @RISK and TopRank respond to circular references:
During precedent tracing: When @RISK or TopRank hits a cell that has been previously encountered, it stops tracing precedents in that particular path, to avoid an infinite loop. For example, if A1 depends on B1, and B1 on C1, and C1 on A1, and the program starts tracing at A1, it will find B1 and C1 as precedents, but stop tracing when it hits A1 again. However, when it starts tracing precedents of B1, it will find C1 and A1 as precedents, and so forth. The net result is that when there is a circular reference, @RISK and TopRank treat all members of the circle as precedents of each other.
During calculation: If there are circular references, Excel calculates the model multiple times within each @RISK or TopRank iteration, depending on your Excel settings for circular references. Each @RISK or TopRank function returns the same value through all the recalculations within any given iteration. In other words, Excel recalculations to resolve circular references all use the same samples within any one iteration of @RISK or TopRank.
Last edited: 20150608
Applies to: @RISK 6.x/7.x
I have developed a model in Crystal Ball, but I would like to run it in @RISK. Can @RISK run Crystal Ball models?
Starting with @RISK release 6.0, an automatic converter in @RISK lets you open and run risk models that were created in Crystal Ball 7.3 or later. (You must have Crystal Ball and @RISK on the same computer.)
When you open a Crystal Ball spreadsheet, @RISK will ask if you want to convert your model; or you can start a conversion with the Utilities » Convert Workbook command. @RISK will convert Crystal Ball distributions and other model elements to native @RISK functions.
Requirements:
@RISK 6.0 or newer.
If you have @RISK 5.7 or earlier and you want to convert Crystal Ball models, please see Upgrading Palisade Software.
32bit Excel and 32bit Crystal Ball installed on this computer.
Model was developed in Crystal Ball 7.3 or newer.
If your model was developed in Crystal Ball 7.0 or earlier, you cannot do an automated conversion but our consultants may be able to help. Please contact your Palisade sales manager for more information.
Certain features cannot be converted automatically. See the topic "Restrictions and Limitations" in the @RISK help file (Help » Documentation » Help). If @RISK finds one of these features, it will display an error or warning message in the conversion summary.
Last edited: 20200528
Applies to: @RISK 4.5–7.x
I have some models that were developed with an older version of @RISK. Will they work in @RISK 7?
@RISK 4.5, 5, 6, and 7 model files (Excel workbooks) are generally compatible. Models created in an older version of @RISK should run just fine in a later version. Simulation results between the two, on the same model, should be the same within normal statistical variability. They will typically not be identical, iteration for iteration, because of precedent checking and other features introduced in newer releases. (See Random Number Generators for more details on this point.)
There are three caveats with using older models in @RISK 5, 6, or 7:
Models created in a newer version of @RISK should run fine in an older version, as long as they use only features that were available in the older version. If you define a model using new features of @RISK, you probably will not be able to use that model with older versions of @RISK. Two notes:
I saved simulation results with the older version of @RISK. Can the new version read them?
@RISK 5, 6, and 7 can read each other's simulation results, whether stored in the Excel workbook or in an external .RSK5 file, but they cannot read @RISK 4.5 simulation results.
Exception: If you filtered simulation results (Define Filter command) in @RISK 5 or @RISK 6 and stored the filtered results in the Excel workbook, @RISK 7.0.0 can't read the file. This is fixed in 7.0.1, but if you still have 7.0.0 please see "Could not read data from file ...tmp." for a workaround.
@RISK 4.5 cannot read simulation results that were created by later releases, whether stored in the Excel workbook or in an .RSK5 file.
See also:
Last edited: 20160817
The @RISK and RISKOptimizer manuals state, "We recommend using Latin Hypercube, the default sampling type setting, unless your modeling situation specifically calls for Monte Carlo sampling." But what's the actual difference?
About Monte Carlo sampling
Monte Carlo sampling refers to the traditional technique for using random or pseudorandom numbers to sample from a probability distribution. Monte Carlo sampling techniques are entirely random in principle — that is, any given sample value may fall anywhere within the range of the input distribution. With enough iterations, Monte Carlo sampling recreates the input distributions through sampling. A problem of clustering, however, arises when a small number of iterations are performed.
Each simulation in @RISK or RISKOptimizer represents a random sample from each input distribution. The question naturally arises, how much separation between the sample mean and the distribution mean do we expect? Or, to look at it another way, how likely are we to get a sample mean that's a given distance away from the distribution mean?
The Central Limit Theorem of statistics (CLT) answers this question with the concept of the standard error of the mean (SEM). One SEM is the standard deviation of the input distribution, divided by the square root of the number of iterations per simulation. For example, with RiskNormal(655,20) the standard deviation is 20. If you have 100 iterations, the standard error is 20/√100 = 2. The CLT tells us that about 68% of sample means should occur within one standard error above or below the distribution mean, and 95% should occur within two standard errors above or below. In practice, sampling with the Monte Carlo sampling method follows this pattern quite closely.
About Latin Hypercube sampling
By contrast, Latin Hypercube sampling stratifies the input probability distributions. With this sampling type, @RISK or RISKOptimizer divides the cumulative curve into equal intervals on the cumulative probability scale, then takes a random value from each interval of the input distribution. (The number of intervals equals the number of iterations.) We no longer have pure random samples and the CLT no longer applies. Instead, we have stratified random samples.
The effect is that each sample (the data of each simulation) is constrained to match the input distribution very closely. This is true for all iterations of a simulation, taken as a group; it is usually not true for any particular subsequence of iterations.
Therefore, even for modest numbers of iterations, the Latin Hypercube method makes all or nearly all sample means fall within a small fraction of the standard error. This is usually desirable, particularly in @RISK when you are performing just one simulation. And when you're performing multiple simulations, their means will be much closer together with Latin Hypercube than with Monte Carlo; this is how the Latin Hypercube method makes simulations converge faster than Monte Carlo.
Comparisons
The easiest distributions for seeing the difference are those where all possibilities are equally likely. We chose five integer distributions, each with 72 possibilities, and a Uniform(0:72) continuous distribution with 72 bins. The two attached workbooks show the result of simulating with 720 iterations (72×10), both the Monte Carlo sampling method and the Latin Hypercube method. For convenience, the workbooks already contain graphs, but you can run simulations yourself too.
Of course, those are artificial cases. The other attached workbooks let you explore the how the distribution of simulated means is different between the Monte Carlo and Latin Hypercube sampling methods. (Select the StandardErrorLHandMC file that matches your version of @RISK.) Select your sample size and number of simulations and click "Run Comparison". If you wish, you can change the mean and standard deviation of the input distribution, or even select a completely different distribution to explore. Under every combination we've tested, the sample means are much, much closer together with the Latin Hypercube sampling method than with the Monte Carlo method.
If you'd like to know more about the theory of Monte Carlo and Latin Hypercube sampling methods, please look at the technical appendices of the @RISK manual.
See also:
Last edited: 20230210
Which random number generator does @RISK use? Can I choose a generator?
By default, @RISK/RISKOptimizer 5.0 and later use the Mersenne Twister. Earlier versions of @RISK and RISKOptimizer used RAN3I.
In @RISK 5.0 and later, you can select a random number generator on the Sampling tab of the Simulation Settings dialog. The random number generator is not user selectable in RISKOptimizer 5.x or in earlier versions of either product.
Mersenne Twister is superior to RAN3I in that it has been more extensively studied and characterized. It has been proved that random numbers generated by the Mersenne Twister are equidistributed up to 623 dimensions, and that its period is 2^19937  1, which is more than 10^6000. Please see What is Mersenne Twister (MT)? (accessed 20130409) for more information.
Can I duplicate @RISK 4.5 simulation results by setting the random number generator to RAN3I?
If you run an @RISK 4.5 model in @RISK 5.x or 6.x with any random number generator, simulation results should be the same within normal statistical variability. But the simulation data will typically not be identical iteration for iteration, even with a fixed seed and the RAN3I generator, because of @RISK 5.x's new precedent checking and other features.
See also Random Number Generation, Seed Values, and Reproducibility.
What about versions within 5.x, 6.x, and 7.x?
From one version to the next, new features, and improvements in our code, may cause distributions to be evaluated in a different order. Thus, you cannot count on reproducing @RISK 5.0 results iteration for iteration in 5.5, or reproducing @RISK 5.7.1 results iteration for iteration in 6.0.1, and so forth. Of course, the results will always match within normal statistical variability.
last edited: 20150616
Applies to:
@RISK for Excel 4 and newer
@RISK for Project 4.x
@RISK Developer's Kit 4.x
Tell me more about the algorithm that generates random numbers in @RISK. What is the difference between a fixed seed and a random seed? How does this work when executing a multiple simulation run? Why might my model not be reproducible even though I am using a fixed seed?
Generation Algorithm:
The random number generator used in @RISK is a portable random number generator based on a subtractive method, not linear congruential. The cycle time is long enough that in our testing the cycle time has had no effect on our simulations. Press et al (References, below) say that the period is effectively infinite. The starting seed (if not set manually) is clock dependent, not machine dependent. The method used to generate the random variables for all distributions is inverse transform, but the exact algorithms are proprietary.
Seed Values:
In the @RISK Simulation Settings dialog box, you can set the random number seed. The seed value may be chosen randomly in Simulation Settings by activating the Choose Randomly option, or you can specify a fixed seed by activating the Fixed option and then entering a seed value that is an integer between 1 and 2147483647. If the Fixed option is chosen, the result from your simulation will not change each time it is run (unless you have changed your model or added some random factor out of @RISK's control). If the Choose Randomly option is active, a random seed is chosen based on the computer's clock.
Why choose a fixed seed? There are two main reasons. When you are developing your model, or making changes to an existing model, if you have a fixed random number seed then you can see clearly how any changes in your model affected the results.. With a finished model, you can send the model to someone else and know that if they run a simulation they will get the same results you got. (Both of these statements assume that you're using the same release of @RISK on the identical model and that nothing in the model is volatile; see Reproducibility, below.)
You can also use a RiskSeed() property function on an input distribution to give that distribution its own sequence of random numbers, independent of the seed used for the overall simulation. (RiskSeed() is ignored when used with correlated distributions.)
Multiple @RISK Simulation Runs:
@RISK Monte Carlo vs. Latin Hypercube:
The sampling done to generate random numbers during a simulation in @RISK may be Monte Carlo, or it may be Latin Hypercube, depending on which Sampling Type is chosen in the @RISK Simulation Settings dialog. See Latin Hypercube Versus Monte Carlo Sampling or the @RISK manual for more details.
Number of Iterations:
If you change the number of iterations, you have a different model even if nothing else has changed. The overall results will be similar (within normal statistical variation) but not identical. Even the data drawn during the initial iterations may not be the same. For example, if you have a 100iteration model and increase the number of iterations to 500, the distributions in the new model may sample different values in the first 100 iterations than they had in the 100 iterations of the old model.
If you have a RiskSeed() property function in any distributions, those will preserve the same sequence. For example, if you have a 100iteration model and increase the number of iterations to 500, the distributions with their own RiskSeed() functions will show the same data for the first 100 iterations as they did for the 100 iterations of the original simulation. (RiskSeed() is ignored when used with correlated distributions.)
Reproducibility:
The results of a simulation are reproducible from run to run if you use a fixed seed value, if your model has not been changed between runs, and if you avoid the following pitfalls:
Any @RISK inputs that have RiskSeed() property functions will be reproducible, even if the model is changed. Exception: RiskSeed() has no effect in correlated distributions.
See also: Different Results with Same Fixed Seed, Different Results with Multiple Workbook Copies, and What Was My Random Number Seed?
Single or Multiple CPU:
Assuming the model is otherwise reproducible, results should be identical whether the simulation runs with multiple CPU enabled or disabled.
There's an important exception. When you're running multiple CPUs, the master CPU parcels out iterations to one or more worker CPUs. During a simulation, one CPU doesn't know the data that were developed by another CPU. So if you have anything in your model that refers to another iteration, directly or indirectly, a simulation with multiple CPUs will not behave as expected. (It won't just be irreproducible; it will be wrong.) Examples would be RiskData() functions that are used in formulas, statistics functions like RiskMean( \) and RiskPercentile() that are used in formulas if you have them set to be computed at every iteration, and macro code that stores data in the workbook or in static variables. In such cases, it is necessary to disable multiple CPU in Simulation Settings.
Versions of @RISK:
Results from a given release of @RISK Standard, Professional, and Industrial should be the same, assuming the model is otherwise reproducible. Trial version versus activated version makes no difference.
Results from different versions of @RISK on the same model will typically match within normal statistical variation, if you use the same random number generator. For the relationship between @RISK 4.x and 5.x random number generation, please see Random Number Generators.
References:
Last edited: 20190215
También disponible en Español: Resultados diferentes con múltiples copias de libros de trabajo
Applies to: @RISK 5.x–newer
I'm simulating multiple copies of a workbook in one @RISK session. There are no links between the workbooks, so I'd expect every workbook to get the identical results that it gets when it's simulated alone. Why doesn't that happen?
All open workbooks are part of an @RISK simulation, and @RISK draws all the random numbers for iteration 1, then all the random numbers for iteration 2, and so on. These numbers all come from a single stream, which you can specify as a fixed seed on the Sampling tab of Simulation Settings. (It's more complicated if any inputs are correlated, but the principle is the same.)
Suppose you have 100 distribution functions in your workbook. When you simulate that workbook by itself, iteration 1 gets the first 100 random numbers from the stream, iteration 2 gets random numbers 101–200, iteration 3 gets random numbers 201–300, and so in. But when you simulate two copies in the same run, those two copies together consume the first 200 random numbers in iteration 1, random numbers 201–400 in iteration 2, and so on. Thus the results will be different, though still within expected statistical variability for your number of iterations.
You can overcome this by putting RiskSeed( ) property functions in the distributions. RiskSeed( ) gives that input its own randomnumber sequence, separate from the single stream for the simulation. Two identical distributions with identical seeds will produce the same identical sequence of data, iteration by iteration. For instance,
=RiskTriang(15,30,70,RiskSeed(1,271828))
will always produce the same sequence of random numbers, no matter what other formulas the workbook may contain. If you have two open workbooks that contain that same function, both copies will produce an identical sequence of iterations.
RiskSeed( ) is not effective with correlated inputs.
See also: Random Number Generation, Seed Values, and Reproducibility
Last edited: 20230210
Applies to:
@RISK, all releases
Question:
I have come across a research paper that details some problems in Excel's statistical calculations. Is there anything to this, and is @RISK affected? How can I validate the generation of random numbers in various distributions by @RISK?
Response:
The computations in all @RISK functions are done by Palisade's own program code and do not rely on Excel's numerical functions in any way. By way of example, here are some details about the two types of functions we are most often asked about:
Probability distributions (@RISK inputs): @RISK generates all its own random numbers, and these calculations are completely independent of Excel. During a simulation, @RISK produces the random numbers using Palisade program code. Excel's role in a simulation is simply to perform the computations in the Excel formulas in your worksheet.
You can easily examine the random numbers produced by @RISK. After a simulation, open the Simulation Data window (xsubscripti icon). This will give one column per input or output variable. You can copy these numbers in the usual way and perform any desired statistical tests on them.
Summary statistics functions such as RiskMean, RiskPercentile (also called RiskPtoX), and RiskCorrel: @RISK uses Palisade program code, not Excel, to compute all of these. Again, you can verify these calculations from the raw data in the Simulation Data window.
Microsoft has acknowledged some issues with some statistical calculations in Excel 2007 and earlier, but has addressed these beginning in Excel 2010. Microsoft gives details in the paper Function Improvements in Microsoft Office Excel 2010 (PDF). But again, none of these issues affect @RISK in any version of Excel, because @RISK does its own statistical calculations for every @RISK finction and does not use Excel functions for them.
last edited: 20130320
All editions of @RISK can easily model time series according to the Wilkie model, using parameters that you select. With @RISK Industrial, you also have the option to fit to historical data using Time Series. The attached prototype builds two Wilkie models, Retail Price Index (RPI) and Share Dividend Yield (SY), to illustrate those techniques.
Let's start with the RPI model. Here you can either set the parameters yourself — recommended values from the literature are shown on the 'Wilkie Models' sheet — or use @RISK to estimate them using Time Series fitting with the AR1 model. @RISK lets you estimate the parameters for the price index model (mean, standard deviation, and autoregressive parameter), but in this case we fitted the transformed historical data set in column C of the 'Data' sheet and extracted those parameters from the AR1 fit; see the 'Parameters RPI' sheet. Notice that Wilkie model requires a logarithmic transformation and first order differencing detrend. Once you have found the parameters by running a fit, or picked them from the table, you can easily create the time series model with @RISK, as shown on the 'RPI' sheet.
For the SY model, we used parameters that are recommended in the literature and constructed the model directly. Please see the 'SY' sheet.
last edited: 20140313
Applies to:
@RISK, all releases
Question:
How can I obtain the geometric mean of an output in @RISK?
Response:
Unfortunately, @RISK doesn't have a function to get the geometric mean from an output directly but it is possible to compute it using the arithmetic mean of logarithms; it can be expressed as the exponential of the arithmetic mean of logarithms as described in the model attached.
last edited: 20190416
How do I know which probability distribution I should use? Do you have some book you can refer me to?
Different industries tend to prefer a different selection of distributions. We don't have any one book that directly addresses your question, but we do have a number of resources to offer, both within @RISK and externally.
One very powerful tool, assuming you have the Professional or Industrial Edition, is distribution fitting. This lets you enter historical data; then @RISK attempts to fit every relevant distribution to the data. You can instantly compare different distributions to see which one seems best suited to the data set.
If you're not fitting to existing data, here are some things to think about:
Your first decision is whether you need a continuous or discrete distribution. Continuous distributions can return any values within a specified range, but discrete distributions can return only predefined values, usually whole numbers. The Define Distributions dialog has separate tabs for discrete and continuous distributions.
Then ask whether your distribution should be bounded on both sides, bounded on the left and unbounded on the right, or unbounded on both sides. The thumbnails in Define Distributions will give you an idea of whether each distribution is bounded,
Finally, do you have a general idea of the shape of distribution you want — symmetric or skewed? strong central peak or not? The shapes in Define Distributions are just a partial guide for this, because changing the numeric parameters of some distributions can change the shape drastically.
There's more than one way to specify a distribution. Every distribution has standard parameters that you can enter explicitly, as numbers or cell references. But you might prefer to specify distributions by means of percentiles, as a way of specifying those parameters implicitly. To do this, in Define Distributions select the Alt Parameters tab, and you'll see the distributions that can be specified by means of percentiles. On the other hand, if you know the mean, standard deviation or variance, skewness, and kurtosis that you want, the RiskJohnsonMoments distribution may be a good choice.
After you select a distribution, the Define Distribution window gives you instant feedback about the shape and statistics of the distribution as you alter the parameters or even the functions themselves.
Additional resources:
Additional keywords: Johnson Moments, Choose a distribution, Picking a distribution
Last edited: 20170619
Applies to: @RISK 8.2 onward
I'm not sure about which distribution would be best for my input, is there a quick way to compare several distributions at once?
Starting in version 8.2, @RISK allows for overlays to be swapped in the Define Distribution. To do this you first need to add an overlay to the currently defined distribution. This is done by clicking the Overlays button in the bottom left hand corner of the window, and choosing Add Overlay from the menu.
You then add the desired distribution from the window, and edit the parameters on the left hand side of the window. The original distribution will remain as a solid image, and the overlay will appear over the top as an unfilled line. You can include many overlays if this is useful for you to compare the shape and limits of multiple distributions.
To change the distribution you click the three dots next to the overlay you think fits your needs best, and then choose Set as Main Distribution. This will change the overlay to the solid filled distribution on the graph. You can either close the Define Distribution window at this stage, or you can remove the overlays by choosing Clear Overlays from the Overlays button.
Last edited: 20210723
Applies to: @RISK 4.x–7.x
Must I specify the X's and P's as fixed numbers in the RiskDiscrete, RiskCumul, RiskCumulD, RiskDUniform, RiskHistogrm, or RiskGeneral distribution, or can I replace them with cell references? What about RiskSimtable — can I use cell references instead of fixed numbers?
You can replace the list of numbers with cell references without braces, but the referenced cells must be a contiguous array in a row or a column. It's not possible to collect cells from multiple locations in the workbook.
Example 1:
=RiskCumul(0, 10, {1,5,9}, {.1,.7,.9})
If the probabilities are in cells C1, C2, C3, then you replace the second set of braces and numbers with an array reference, like this:
=RiskCumul(0, 10, {1,5,9}, C1:C3)
If the numbers (X values) are in cells D1, D2, D3, then you replace the first set of braces and numbers with an array reference, like this:
=RiskCumul(0, 10, D1:D3, {.1,.7,.9})
And you can replace both the X's and the P's with array references, like this:
=RiskCumul(0, 10, D1:D3, C1:C3)
Example 2:
=RiskSimtable({10,20,30,40})
If the scenario numbers are in cells IP201 through IS201, then you replace the braces and numbers with an array reference, like this:
=RiskSimtable(IP201:IS201)
These rules might seem arbitrary, but they're actually standard Excel. The @RISK distribution functions mentioned above take one or two array arguments. Excel lets you specify a constant array, which is a series of numbers enclosed in braces; or you can specify a range of cells, which is a contiguous series of cells in one row or one column. Excel doesn't have any provision for making an array out of scattered cells.
Additional keywords: Simtable, Discrete distribution, Cumul distribution, CumulD distribution, DUniform distribution, Histogram distribution, General distribution
Last edited: 20150619
Applies to: @RISK 5.x–7.x
For cells in my model that are probabilistic (directly or indirectly), how do I change the value that is displayed in the cell when a simulation is not running?
By default, when a simulation is not running you will see static values: the displayed values of @RISK distributions won't change during an Excel recalculation. The default static value for continuous distributions is the mean value (expected value). For discrete distributions, the default static value is not the true expected value but rather the value within the distribution that is closest to the expected value: for example, RiskBinomial(9,0.7) will display 6 rather than 6.3.
Outputs, and other values computed from the inputs, generally don't display their own mean or expected value but rather the value computed from the displayed values of inputs. Please see Static Value of Output Differs from Simulated Mean.
There are several ways you can change the displayed values of input distributions, and the resulting displayed values of outputs. None of these methods will affect a simulation in any way.
Which static values are displayed?
@RISK lets you choose to display the expected value, true expected value, mode, or a selected percentile for all distributions. You can make this choice in either of two places:
What's the difference between "expected value" and "true expected value"?
For continuous distributions, "expected value" and "true expected value" are the same, the mean of the distribution.
For discrete distributions, "true expected value" is the mean of the distribution, but "expected value" is the mean rounded to the nearest value that is a member of the distribution. For example, RiskBinomial(3, .44) has a mean = "true expected value" of 1.32, but an "expected value" of 1 because that is the nearest to the mean out of the distribution's possible values 0, 1, 2, 3. In other words, for the mean or expected value of discrete distributions, as defined in textbooks, you need to set @RISK to display the "true expected value".
You can also put a RiskStatic( ) function in an individual distribution to override the general settings, for that distribution only. Example:
=RiskNormal(100, 10, RiskStatic(25) )
Display random values instead of static values
You can suppress the static values and have @RISK generate new random values for each distribution when Excel does an automatic recalculation or when you press F9 to force a manual recalculation. To switch between random and static values for all open workbooks use either method:
You can also change @RISK's default from static values to random values in the Application Settings dialog, as mentioned above.
Last edited: 20171010
Applies to: @RISK 4.x and newer
I'd like to generate 10,000 sample values from a particular distribution, for example RiskLogLogistic(0.0044898, 0.045333, 2.5862). Is there some way to do it?
Here is a choice of five methods.
Simulation methods:
Create an empty workbook and put that distribution in a cell. Set iterations to the desired number of values, and run a simulation. Then, do one of the following:
Since you are running an actual simulation, these methods use the Sampling Type you have set in Simulation Settings. By default, that is Latin Hypercube, which is better than traditional Monte Carlo sampling at matching all percentiles to the theoretical cumulative probability of a distribution. Also, correlations are honored in a simulation.
Nonsimulation methods:
You can also sample a distribution without running a simulation. In this case, the Sampling Type is always Monte Carlo, regardless of your Simulation Settings, and any correlations are disregarded.
Here are two methods that don't involve running a simulation:
If you have @RISK Industrial or Professional, you can write a simple loop in Visual Basic to perform the sampling and save the random numbers. The Risk.Sample method is explained in Sampling @RISK Distributions in VBA Code.
Click the Random/Static "rolling dice" icon to make it active. Insert your distribution function in a cell, and then click and drag to create as many duplicates as you need random numbers. Highlight those values, and press Ctrl+C to copy, then Paste Special » Values. (You can either paste the values in the same cells to overwrite the formulas, or paste them in other cells if you want to keep the formulas.)
Last edited: 20151109
Applies to: @RISK 4.x–8.x
In the sensitivity analysis or tornado charts, I'm observing some odd descriptions for the bars. My model is built with the cell description in the cell to the left of that cell's formula. After running the simulation, in the tornado graphs I usually see the respective cell descriptions. However, I'm currently observing that some parameters seem to be using other text from the worksheet instead of the description next to the cell formula. Is there some way to tell @RISK what descriptions to use for the bars in tornado charts?
Every @RISK input distribution has a name for use in graphs and reports as well as the @RISK Model Window. When you first define a distribution, either in the Define Distribution window or by directly entering a formula in the worksheet, @RISK assigns it a default name. This default name comes from text that @RISK finds in your worksheet and interprets as row and column headings. If the name is acceptable, you don't need to do anything. If it's not acceptable, or if it's blank because @RISK couldn't find any suitable text, you can easily change it, using any of these methods:
In the first box in the Define Distribution window, enter the desired name. (You can do this when first creating the distribution. For an existing distribution, click on the cell and then click Define Distribution to reopen the window.)
Enter or change the name in the Model Window. Click anywhere in the row for the desired input, rightclick, and select Function Properties. The Name box is first in the Properties dialog.
Edit the formula directly, in Excel, to insert a RiskName property function. For example,
=RiskPoisson(.234)
might become
=RiskPoisson(.234, RiskName("Number of claims"))
or, with the name in a separate cell,
=RiskPoisson(.234, RiskName(A17))
Avoid complex name formulas that use Excel Table Notation as not all versions of @Risk are able to interpret it correctly. You can use regular cell specification as below
=RiskPoisson(.234, RiskName(A17&" "&A18))
Save your workbook after entering or editing any names. The new names will be used in subsequent graphs and reports. (Graphs and reports of simulation results will use the new names when you run a new simulation.)
Last edited: 20210930
Applies to: @RISK 4.x–7.x
What is the shift factor of a distribution, and why it is used?
The shift factor of a distribution is shown in the RiskShift( ) property function. It moves the function toward the right on the xaxis (positive shift factor) or toward the left on the xaxis (negative shift factor). In other words, it shifts the domain of the distribution. This is equivalent to taking every point on the distribution and adding the shift factor to it, in the case of a positive shift. With a negative shift, that amount is subtracted from every point on the distribution.
Shift factor in defined distributions
When you're defining a distribution, click the down arrow next to "Parameters: Standard", and select Shift Factor on the popup dialog. The shift factor is now added to the Define Distributions dialog for this distribution, and you can enter various values and see how they change the distribution. If you don't want to have to do that, go into Utilities » Application Settings » Distribution Entry and change Shift Factor to Always Displayed.
You can always add a shift factor to an existing distribution by editing the Excel formula directly. For example, if you change =RiskLognorm(10,10) to RiskLognorm(10,10,RiskShift(3.7)), the entire distribution shifts 3.7 units to the right.
In general the shift factor should only be used in cases where the distribution function itself does not contain a location parameter. For example, you shouldn't use a shift factor for a normal distribution, since the mean of the normal is already a location parameter.
Shift factor in fitted distributions
In fitting distributions to data, the purpose of the shift factor is to allow fitting a particular distribution type because it has the right shape, even though the values in the fitted distribution might actually violate the defined parameter limits for that distribution.
For example, the 2parameter lognormal distribution defined in @RISK cannot return negative numbers. But suppose your data have a lognormal shape but contain negative numbers. @RISK inserts a negative shift factor in the fitted distribution, thus shifting it from the usual position of a lognormal to the position that best approximates your data. In effect, this makes a 3pararameter version of the lognormal distribution.
See also: Truncate and Shift in the Same Distribution
Additional keywords: log normal, Lognorm, RiskLognorm
Last edited: 20170329
Applies to: @RISK 5.x–7.x
I have a regular distribution, but I want to truncate one tail. For example, maybe I have a RiskNormal(50,10) and I want to ensure that it never goes below 0.
The RiskTruncate property function limits the sampling of a distribution. Specify only a lower bound, only an upper bound, or both lower and upper bounds. With any such truncation, the "lost" probability is redistributed proportionally across the remaining range of the interval. This is better than using Excel's MIN and MAX functions, which distort the distribution by taking all the probability beyond the truncation point and adding it to the truncation point.
You can set truncation limits by editing formulas, or in the Define Distribution dialog (later in this article). Either way, the limits can be fixed numbers or cell references, although the examples in this article all use fixed numbers.
To specify only a minimum, with maximum unbounded, just omit the maximum argument of the RiskTruncate function. For example, in the RiskTruncate function below, the minimum has been specified as 0, but the maximum is +∞:
RiskNormal(10, 5, RiskTruncate(0, ) )
The comma is optional when you specify only a minimum:
RiskNormal(10, 5, RiskTruncate(0) )
Likewise, you can specify only a maximum, with minimum unbounded, by omitting the minimum argument. (Notice the required comma before the maximum.) This example specifies a minimum of −∞ and maximum of 15:
RiskNormal(10, 5, RiskTruncate(, 15) )
Finally, you can specify both minimum and maximum, by supplying both arguments. This example specifies a minimum of 2 with a maximum of 15:
RiskNormal(10, 5, RiskTruncate(2, 15) )
You're not limited to naturally unbounded functions; you can also truncate a bounded function like a RiskTriang. For example, if you want a RiskTriang(100,200,300) shape, but with no values above 250, code it this way:
RiskTriang(100, 200, 300, RiskTruncate(, 250) )
If you prefer not to edit property functions in formulas, you can enter onesided or twosided truncations in the Define Distribution window:
Rightclick the Excel cell with the distribution function you want to truncate, and choose @RISK » Define Distributions from the popup menu; or, leftclick the cell and then click the Define Distributions icon in the ribbon. The Define Distribution dialog appears.
In the lefthand section of the dialog, find the Parameters entry and click into the box that says Standard.
A dropdown arrow appears at the right of that box; click the arrow.
Check (tick) the "Truncation Limits" box, and select Values or Percentiles at the right. Click OK.
Specify a minimum by entering it in the box labeled "Trunc. Min", or specify a maximum by entering it in the box labeled "Trunc. Max". Again, these can be fixed numbers or cell references. If you leave the minimum empty, the distribution will not be truncated at left; if you leave the maximum empty, the distribution will not be truncated at right.
As soon as you enter either a minimum or maximum, the RiskTruncate function appears as an argument of the distribution function in the cell formula displayed at the top of the Define Distribution window. Because the default minimum parameter is −∞, and the default maximum parameter is +∞, the parameter you do not specify is automatically omitted from the RiskTruncate function.
Click the OK button to write the formula to Excel.
If you often use truncation limits in your distributions, you can configure @RISK to make the "Trunc. Min" and "Trunc. Max" boxes a regular part of the Define Distributions dialog box. In @RISK, click Utilities » Application Settings » Distribution Entry and change Truncation Limits to Always Displayed (Values) or Always Displayed (Percentiles).
See also:
Last edited: 20160901
Applies to: @RISK for Excel, all releases
My @RISK distribution function is not obeying the minimum and maximum set by the truncation function. Here is the function I am using:
=RiskPearson5(47, 6018, RiskShift(78), RiskTruncate(11,100))
But in a simulation, I am getting many values below 11. What is the problem?
We tend to think of truncation as applying limits after shifting. However, when simulating a distribution function, @RISK always truncates first and then shifts, regardless of the order of these arguments in the distribution function. In your example, after truncating at 11 and 100, @RISK shifts the distribution left 78, so that the actual min and max for your Pearson5 are –67 and 22.
You need to take this into account when figuring out how to manipulate the function to get the desired result. Subtract your desired shift factor from your desired final limits for the distribution.
For example, if you want a Pearson5 that is truncated at 11 and 100 after shifting left by 78 units, compute the preshift truncation limits as 11–(–78) = 89 and 100–(–78) = 178, and code your function this way:
=RiskPearson5(47, 6018, RiskShift(78), RiskTruncate(89,178))
The truncation limits 89 to 178 before shifting become your desired limits 11 to 100 after shifting.
See also:
Last edited: 20150619
Applies to: @RISK 5.x–7.x
How can I place the mean or a given percentile of an input distribution in my workbook? Can I choose between simulation results and the perfect theoretical statistics?
@RISK has two sets of statistic functions that can be applied to inputs. The statistics of the theoretical distributions all have "Theo" in their names — RiskTheoMean( ), RiskTheoPtoX(), and so forth. You can get a list by clicking Insert Function » Statistic Functions » Theoretical. All the same statistics are available for simulated results; click Insert Function » Statistic Functions » Simulation Result.
The theoretical ("Theo") return the correct values before a simulation runs, during a simulation, and after a simulation, and they don't change unless you change the distribution parameters.
The simulation results (non"Theo") change with each simulation, within ordinary statistical variability. Before the first simulation, they don't return meaningful numbers; during a simulation, they return #N/A. You can change them to be computed at every iteration, except in @RISK 5.0 — see "No values to graph" Message / All Errors in Simulation Data — but if you need those statistics during a simulation the better approach is usually to use the "Theo" functions.
Last edited: 20150626
Applies to: @RISK 5.x–7.x
I want to get the mean and standard deviation for just part of my input distribution. If I enter truncation limits in the Define Distribution window or include RiskTruncate( ) in the distribution formula, then the mean and standard deviation of my distribution change and that is not what I want. I want the regular distribution to be simulated, but then after simulation I want to consider only part of it when computing the statistics.
OR,
I have applied a filter, but the statistics functions are still computed on the whole of the output distribution. Is there a way to get the mean of the filtered data set using RiskMean?
To use the whole distribution in simulation but then get the statistics of just a portion of it, put a RiskTruncate( ) or RiskTruncateP( ) function inside the RiskMean( ). A very minimal example is attached.
A1 contains: =RiskNormal(100,10).
A2 contains: =RiskMean(A1, RiskTruncate(95)), which computes the mean of the part of the distribution from 95 to infinity. This is equivalent to =RiskMean(A1, RiskTruncate(95, 1E+99)). RiskTruncate( ) specifies truncation limits by values.
A3 contains: =RiskMean(A1, RiskTruncateP(0.8,1)), which computes the mean of the part of the distribution from the 80th to the 100th percentile, the top 20% of the distribution. RiskTruncateP( ) specifies truncation limits by percentiles.
The other statistics functions can have RiskTruncate( ) or RiskTruncateP( ) applied in the same way. This you can get the mean of part of a distribution, percentiles of part of a distribution, standard deviation of part of a distribution, and so on.
About accuracy of theoretical statistics: Most distributions have no closed form for the mean of a truncated distribution. Therefore, if you're using a statistic function such as RiskTheoMean( ) with RiskTruncate( ) or RiskTruncateP( ), @RISK has to do a little minisimulation to approximate the theoretical mean of the truncated distribution. This may differ from the actual theoretical mean by a small amount, usually not more than a percent or two. With a truncated simulated distribution, using a statistic function such as RiskMean( ) with RiskTruncate( ) or RiskTruncateP( ), @RISK uses actual simulation data. Thus results are accurate with respect to that simulation, but another simulation with a different random number seed would of course give slightly different results.
See also: Cutting Off a Distribution at Left or Right for truncating an input distribution and using only the truncated distribution in simulation.
Last edited: 20180509
Applies to:
@RISK 5.x–7.x
The RiskMakeInput( ) function seems to have a lot of capabilities. Can you give me an overview?
The short answer is: RiskMakeInput lets you treat a formula as though it were an @RISK input distribution. That seemingly simple statement has a lot of implications, which we explore in various Knowledge Base articles:
Special applications:
Limitations:
Last edited: 20190215
Applies to:
@RISK 5.x–7.x
A risk has a certain chance of occurring, let's say 40%. If it does occur, there's a probability distribution for its severity; let's say a Triang. I've been multiplying RiskBinomial(1, 0.4) by my RiskTriang. Should I do anything in my risk register beyond just multiplying?
Caution: The technique in this article will is intended only for "lightswitch" risks that either happen once or don't happen. For risks that could happen multiple times in one iteration, please see Combining Frequency and Severity and use RiskCompound.
Probably you should. You probably want to wrap the multiplication inside a RiskMakeInput function. If probability is in cell C11 and impact in C12, your function for actual impact in any given iteration would look like this:
=RiskMakeInput(C11*C12)
If you wish, you can give it a name:
=RiskMakeInput(C11*C12, RiskName("my name for this risk") )
Why introduce an extra distribution instead of just multiplying? Don't they get the same answers?
Nearly the same, though not identical. Here's why. Suppose your simulation has 10,000 iterations, and your risk has a 40% probability of occurring. There are 10,000 values of your RiskTriang for the 10,000 iterations. Only 4,000 of them (40% of the 10,000) get used. but statistics and graphs will all report based on all 10,000 values. RiskMakeInput treats the product as a distribution, so that now you have 6,000 zero values and 4,000 nonzero values, and the statistics reflect that.
But using RiskMakeInput can make the greatest improvement in your tornado graphs. Without RiskMakeInput, you might get a bar in your tornado for the RiskBinomial, or for the RiskTriang, or both, or neither. With RiskMakeInput, if the risk is significant you get one bar in the tornado, and if the risk isn't significant there's no bar for it.
The attached example shows a risk register, both with plain multiplication and with improvement by way of RiskMakeInput. Run a simulation. Though the two output graphs don't look very different, the two tornado graphs show very different sets of bars. (In this particular example, most of the tornado bars in Method A come from the RiskBinomial functions, which probably isn't helpful.) Also, with plain multiplication in method A, there's no way to get an accurate graph of the impacts in all 10,000 iterations; with RiskMakeInput, just click on one and click Browse Results.
Can I correlate RiskMakeInput?
Unfortunately, no. This is a limitation of RiskMakeInput, and of the plain multiplication method also. There is a workaround in Correlating RiskMakeInput or RiskCompound, Approximately.
See also: All Articles about RiskMakeInput
Additional keywords: Event risk, operational risk, Risk register
Last edited: 20181024
Applies to: @RISK 5.x–7.x
I have a risk that may or may not occur, or it might occur a variable number of times. But the impact or severity of each occurrence is a probability distribution, not a fixed number. How can I model this in @RISK?
The RiskCompound function, available in @RISK 5.0 and later, is the solution. It takes two arguments: a discrete function for frequency or probability, and a discrete or continuous function to govern severity or impact. (Two additional arguments are optional; see How are the deductible and limit applied, below.)
Suppose the impact or severity is according to RiskNormal(100,10). If you want to say that the risk may or may not occur, and has 40% probability of occurrence, code it this way:
=RiskCompound(RiskBinomial(1,0.4), RiskNormal(100,10))
(For more about a risk that can occur only zero times or one time, see Event or Operational Risks.)
If you want to say that the risk could occur a variable number of times, choose one of the discrete distributions for frequency. For example, if you choose a Poisson distribution with mean 1.4 for the distribution of possible frequencies, then your complete RiskCompound function would be
=RiskCompound(RiskPoisson(1.4), RiskNormal(100,10))
In any iteration where the frequency is greater than 1, @RISK will draw multiple random numbers from the severity distribution and add them up to get the value of the RiskCompound for that iteration. (There is no way to get at the individual severity values that were drawn within one iteration.)
Must frequency and severity be @RISK distributions, or can they be references to cells that contain formulas?
You can embed the frequency and severity distributions within RiskCompound( ), as shown above, or to use cell references for frequency and severity and have those distributions in other cells. There are two caveats:
Performance: If your frequency is large, or if you have many RiskCompound functions, your simulation will run faster — possibly much faster — if you embed the actual severity distribution within the RiskCompound( ). Using a cell reference for the frequency distribution doesn't hurt performance. (The attached CompoundExploration.xls uses cell references to make the discussion easier to follow, but it is a very small model and so performance is not a concern.)
Calculation: If the severity argument is a cell reference, and the referenced cell contains an @RISK distribution, then the severity will be evaluated multiple times in an iteration, just as if the severity were physically embedded in the RiskCompound( ) function. For instance, suppose that the severity argument points to a cell that contains a RiskTriang( ) distribution, either alone or within a larger formula. If the frequency distribution has a value of 12 in a given iteration, then the referenced formula will be reevaluated 12 times during that iteration, and the 12 values added together will be the value of the RiskCompound( ).
But if the referenced cell does not contain any @RISK distributions, it will be evaluated only once every iteration, even if the cell contains a formula that ultimately refers to an @RISK distribution. For example, consider the function =RiskCompound(F11,S22), and suppose that on one particular iteration the frequency value in F11 is 12. If the severity cell S22 contains a formula such as =RiskNormal(B14,B15)+B16*B17, it will be evaluated 12 times during this iteration, and the value of the RiskCompound will be the sum of those twelve values. But if the severity cell S22 contains a formula such as =LOG(B19), and B19 contains a RiskNormal( ) function, the formula will be evaluated only once in his iteration, and the value of the RiskCompound( ) for this iteration will be 12 times the value of that formula. You can think of it this way: RiskCompound( ) will drill through one level of cell referencing to find distributions, but only one level.
What if the frequency distribution is a continuous distribution? How does @RISK decide how many severity values to add up?
"Frequency" implies a number of occurrences, which implies a whole number (0 or a positive integer). Therefore we recommend a discrete distribution, returning whole numbers, for the frequency. But if you use a continuous distribution, or a discrete distribution returning nonintegers, @RISK will truncate the value to an integer.
For example, if your frequency distribution returns a value of 3.7, @RISK will draw three values from the severity distribution, not four.
How are the deductible and limit applied in a RiskCompound( ) function? Is it on a peroccurrence or an aggregate basis?
RiskCompound( ) takes up to four arguments:
RiskCompound(dist1, dist2, deductible, limit)
Both deductible and limit are applied per occurrence. For example, suppose that the frequency distribution dist1 has a value of 6 in a particular iteration. Then the severity distribution dist2 will be drawn six times, and deductible and limit will be applied to each of the six.
The limit argument to RiskCompound( ) is meant to be the actual maximum payout or exposure per occurrence. If the actual maximum payout is the policy limit minus the deductible, then you should use the actual maximum payout for the fourth argument to the RiskCompound( ) function.
For each sample drawn from dist2, out of the multiple samples during an iteration, the result returned is
MIN( limit, MAX( sample  deductible, 0 ) )
In words:
1. If sample is less than or equal to deductible, zero is returned.
2. If sample is greater than deductible and (sample minus deductible) is less than limit, (sample minus deductible) is returned.
3. If (sample minus deductible) is greater than or equal to limit, limit is returned.
Again, limit and deductible are applied to each of the samples of dist2 that are drawn during a given iteration. Then the values of all the occurrences are summed, and the total is recorded as the value of the RiskCompound( ) function for that iteration. (It's not possible to get details of the individual occurrences within an iteration.)
You can download the attached workbook to try various possibilities for RiskCompound.
See also: All Articles about RiskCompound
Last edited: 20180809
Applies to:
@RISK 5.x–8.x
The RiskCompound( ) function seems pretty complex. Can you give me an overview?
The short answer is: RiskCompound lets you model a risk that could occur a varying number of times, with different severities—and model it in one function. The main article is first in the list below, and the others explore specialized issues.
Special applications:
Correlation:
Last edited: 20211118
Applies to: @RISK 4.x–7.x
I have several continuous distributions that vary independently, but I need them always to add up to a certain value. Is there any way to accomplish this?
Please see the attached example.
The technique is to let the distributions vary randomly, but have an equal number of helper cells. Each helper cell is a scaled version of the corresponding distribution. "A scaled version" means that the first helper cell equals the first actual distribution multiplied by the desired total and divided by the actual total, and similarly for each of the helper cells. In this way you are guaranteed that the helper cells always add up to the desired value.
Your workbook formulas should all refer to the helper cells, and not to the original distributions. If you want to record the values of the helper cells during a simulation, you can designate them as @RISK output cells.
Please note that this technique is suitable for continuous distributions. If you need discrete distributions to add up to a fixed total, you can't use this technique because the scaled versions usually won't be whole numbers.
Additional keywords: Total of distributions equals constant, Fixed value for total
Last edited: 20161215
Applies to: @RISK 5.x and newer
Does @RISK have a multinomial distribution?
The multinomial distribution is a generalized form of the binomial distribution. In a binomial, you have a fixed sample size or number of trials, n. Every member of the population falls into one of two categories, usually called "success" and "failure". The probability of success on any trial is p, and the probability of failure on any trial is 1–p. The RiskBinomial distribution takes the parameters n and p, and at each iteration it returns a number of successes. The number of failures in that iteration is implicitly n minus the number of successes.
In a multinomial, you have three or more categories, and a probability is associated with each category. The total of the probabilities is 1, since each member of the population must be a member of some category. As with the binomial, you have a fixed sample size, n. At each iteration you want the count of each category, and the total of those counts must be n.
@RISK doesn't have a multinomial distribution natively, but you can construct one using binomial distributions and some simple logic. This workbook shows you how to do it.
Last edited: 20160318
Applies to: @RISK 5.x and newer
Excel has functions like NORM.DIST (NORMDIST in older Excels) to return the cumulative probability in a normal distribution. Does @RISK have anything like that?
Yes, @RISK has functions to find the cumulative probability for any distribution. Instead of a separate cumulativeprobability function for each distribution, @RISK uses the same function for cumulative probability of any distribution.
Actually, there are two functions, one to obtain simulation results and one to query the theoretical distribution.
Suppose you have an @RISK input or output, or even just an Excel formula, in cell AB123. To obtain the cumulative probability to the left of x = 14, for the most recent simulation, use the function =RiskXtoP(AB123,14). This function won't return a meaningful value until after a simulation has been run.
For @RISK distributions, you can access the theoretical distribution. For example, if you have =RiskNormal(100,10) in cell XY234, the function =RiskXtoP(XY234,120) will return 0.97725, give or take, but varying from one simulation to the next. But the "theo" function, =RiskTheoXtoP(XY234,120) will return the exact theoretical cumulative probability, limited only by the accuracy of floating point. The theoretical value is not dependent on running a simulation. With the "theo" functions, you can even embed the distribution right in the function, as for instance =RiskTheoXtoP(RiskNormal(100,10), 120).
Instead of the probability from –∞ to an x value, how can I get the probability between two x values?
Just subtract the two cumulative probabilities. For example, the cumulative probability of cell PQ456 between x = 7 and 22 would be =RiskXtoP(PQ456,22) – RiskXtoP(PQ456,7).
How do I get the probability density, which Excel returns when the last argument of NORM.DIST is FALSE?
The probability density is simply the height of the curve at a given x value. Use RiskTheoXtoY instead of RiskTheoXtoP. (The RiskTheoXtoY function was added in @RISK 6.0 and is not available in @RISK 5.x.)
Last edited: 20170504
Applies to: @RISK 5.x–7.x
I know what distribution I want to use, but I want to specify it in terms of percentiles rather than with the usual parameters. Is there a way?
For many distributions, you can. We use the term "Alternate Parameters" for specifying at least one percentile in place of a usual parameter like mean, most likely, alpha, and so forth.
In the Define Distributions dialog, select the Alt. Parameters tab, and you'll see the distributions that can be specified in terms of percentiles. Doubleclick your desired distribution to select it.
A dialog will open with some suggested percentiles, and you can change the values in that dialog as usual. But quite possibly you'll want to specify different percentiles from the suggested ones — for example, the 10th and 90th instead of the 5th and 95th. To change which percentiles are used, click the dropdown arrow at the right of the word Alternate to open the Parameters dialog. If you open the Parameters dialog, you can change which percentiles are used, and by selecting the radio buttons you can even define the distribution based on a mix of percentiles and standard parameters. For more, with a screen shot, please search for Alternate Parameters in @RISK's help file.
How do percentile parameters work internally? Does @RISK convert them to standard parameters?
Yes, @RISK resolves percentile parameters into standard parameters. This has to be done in every iteration in a simulation, because it's possible for your workbook's logic to change the parameters of a distribution from one iteration to the next.
In general terms, resolving alternate parameters is a kind of optimization problem. Say you have a potential candidate for the resolved (nonAlt) distribution. You can calculate an error for this candidate by computing the difference between the desired percentiles specified in the Alt function, and the percentile values your candidate actually has. Finding the correct nonAlt distribution requires juggling the parameters until that error goes to zero. That's the simplest method, and indeed you could use Palisade's Evolver or RISKOptimizer, or Excel Solver, to resolve alternate parameters yourself using this method.
But there's a problem with this method: it's just not fast enough, especially for complicated cases like the BetaGeneralAlt with its four parameters. The time to solve an optimization problem goes way up as you increase the dimensionality. If you were resolving parameters just one time, it would probably be fine to do it in this bruteforce way; but, given the possibility of different parameters in each iteration, the resolution process needs to be really fast. Fortunately, we can usually reduce the dimensionality of the optimization. For example, with BetaGeneralAlt, some tricky math reduces the problem from four dimensions to two. (The differing mathematical tricks for each distribution are proprietary. Our developers put a lot of work into making them as efficient as possible.)
Can I see the standard parameters that @RISK computes from the percentiles?
Yes, please see Distribution Parameters from "Alt" Distributions.
Last edited: 20180702
Applies to:
@RISK 4.x–7.x
RISKOPTIMIZER 1.x–5.x
I want a BetaGeneral distribution with a given mean and standard deviation. What α1 and α2 (alpha1 and alpha2) should I enter in the Define Distribution window?
Can I do this if I know other statistics, such as the mode and the variance? Can I do this for other types of distribution?
Let's take the easiest alternatives first.
If you have @RISK 5.5.0 or newer, the JohnsonMoments distribution is available. It lets you specify mean, standard deviation, skewness, and kurtosis, and it comes up with an appropriate distribution shape for those parameters.
If you have a particular distribution in mind and you want to target percentiles (including the median), you may be able to use a form of the distribution that specifies percentiles in place of one or more parameters. In Define Distribution select one of the distributions from the Alt. Parameters tab in the Define Distribution dialog. @RISK will then calculate the needed parameters automatically.
If those alternatives don't meet your needs, you may be able to solve for the distribution parameters that give the desired mean and standard deviation (or other statistics) for your desired distribution. It all depends on whether closed forms exist for your desired statistics. (A closed form, for this purpose, is an algebraic formula that can be implemented in Excel. If you're targeting standard deviation, use the square root of the variance formula.)
There are two places to look for these closed forms. In @RISK 5.x and newer, and in RISKOptimizer 5.x, look in the product's help topic for the particular distribution function that is of interest. In @RISK 4.x or RISKOptimizer 1.x, click the Windows Start button, then Programs or All Programs, then Palisade DecisionTools, then Online Manuals, then Distribution Function Summary.
Example:
The attached example shows how to find alpha1 and alpha2 for a BetaGeneral that give a desired mean and standard deviation. Please download FindDistributionParams.xls and open it in RISKOptimizer or in Excel. All constraints and options are already set as needed.
The green cells are the desired statistics for the distribution, here minimum, maximum, mean, and standard deviation. The red cells are the adjustable cells for Solver or RISKOptimizer; they're arbitrarily set to 1 at the start. The purple cells are the formulas for mean and standard deviation, in terms of the adjustable red cells.
As you see, when α1 = α2 = 1 in a BetaGeneral distribution, the mean is 57.5 and the standard deviation is 24.5. These deviate from the desired values by a total of 27.04 units, the "error to minimize" in blue. RISKOptimizer or Solver is given the blue cell as the target to minimize.
When you run RISKOptimizer or Solver, it adjusts the red α1 and α2 until it converges on parameters that give the desired mean and standard deviation, or as close as possible to them.
Variations on the example:
If you want to target different statistics, such as kurtosis and mode or skewness and mean, change the captions A21:A24 and the formulas E27 and H27.
If you're interested in a different distribution, you may need to change the captions D21:D22 in addition to the above, and you may also need to edit the constraints in RISKOptimizer or Solver. (In a BetaGeneral distribution, α1 and α2 must be positive, but parameters for many other distributions have different constraints.) If the distribution has three parameters or more, insert the additional parameters and add appropriate RISKOptimizer or Solver constraints.
Additional keywords: RiskJohnsonMoments distribution, Johnson Moments
Last edited: 20150619
Applies to: @RISK 5.x–7.x
Several people gave me their assessments of the likely impact of a risk or a benefit, but naturally their estimates vary. Also, I have higher confidence in some opinions than others. How can I combine these assessments in @RISK?
We often say in ordinary language that we give more weight to one thing than another in making a decision, and it's the same in this situation. You want to set up a little table of weights and @RISK probability distributions, and the question then is how to give each distribution the appropriate weight. It would be easy to take the weighted average of the distributions, but that causes the extreme opinions to be underrepresented. There are many possible approaches that don't have that problem, and the attached workbook shows four of them.
Sheet1 lets the contributors specify different distributions, not just different parameters to the same distribution. The weights are converted to percentages, and then using the number of iterations (which you specify) each distribution is sampled for the appropriate number of iterations.
Sheet1A is similar, and in fact it uses the exact same distributions as Sheet1. But it uses a RiskDiscrete function to sample the individual distributions in the appropriate proportions. This one does not need you to place the number of iterations in the workbook.
Sheet2 takes a different approach, computing weighted averages of the cumulative probabilities (the CDFs, not the PDFs. This could have been done with different distributions like Sheet1, but we also took the opportunity to show how you could set up a table of pessimistic, most likely, and optimistic cases and use the same distribution for all of them.
Sheet3 uses a multinomial distribution. Over the course of the simulation, each of the five distributions is samples in the appropriate proportion, based on the weights.
In all four cases, the combined function is wrapped in a RiskMakeInput function. That ensures that only the combined distribution, not the individual assessments, will show up in sensitivity graphs and figures. See also: All Articles about RiskMakeInput.
Last edited: 20160328
Applies to: @RISK 5.5.0–7.x
The @RISK documentation says, "RiskJohnsonMoments(mean,standardDeviation,skewness,kurtosis) chooses one of four distributions functions (all members of the socalled Johnson system) that matches the specified mean, standard deviation, skewness, and kurtosis. This resulting distribution is either a JohnsonSU, JohnsonSB, lognormal, or normal distribution." How does @RISK choose among the four underlying distributions?
We use Algorithm AS 99, Journal of the Royal Statistical Society Series C (Applied Statistics) vol. 25, p. 180–189 (1976). This article is available through JSTOR.
Additional keywords: JohnsonMoments distribution, Johnson Moments
Last edited: 20150619
Applies to:
@RISK 5.x–7.x
When I specify a distribution in terms of percentiles or "alt parameters", how does @RISK figure out the parameters of the distribution?
That's a good question. If you have a RiskPertAlt or RiskTriangAlt, for example, @RISK finds what parameters of a standard RiskPert or RiskTriang would give the percentiles you specified. But there's no formula. Instead, @RISK has to use a process of successive approximations to find the right parameters for the RiskPert. And it's the same for all the other Alt distributions, as well as RiskTrigen, which specifies two of a triangle's three parameters as percentiles. RiskUniformAlt is the exception; see below if you want to know the theory.
How can I find out what standard parameters @RISK computes for Alt functions?
For example, paste this formula into an empty cell:
=RiskBetaGeneralAlt(5%,3,25%,2,75%,12,95%,16)
Press Enter, and then click Define Distributions. (As an alternative, you could click Define Distributions on an empty cell, select the distribution, and enter the parameters in the dialog.)
Click the dropdown arrow to the right of Alternate, remove the check mark for Alternate Parameters, and click OK just once. The display now shows the equivalent regular parameters, α1=1.295682, α2=1.121222, Min=4.990886, Max=17.204968. (Because these are rounded values, some statistics and percentiles may be slightly different from their values in the Alt distribution.) The full nonAlt distribution is shown in the Cell Formula box near the top of the Define Distributions dialog:
=RiskBetaGeneral(1.295682,1.121222,4.990886,17.204968)
If you now click OK, @RISK will replace the Alt distribution in your worksheet with that nonAlt distribution; if you click Cancel, the Alt distribution will remain in your worksheet.
I have to convert a number of Alt functions to standard parameters. Is there some way to do this with worksheet functions?
For some Alt functions, yes. The attached workbook gives examples.
If the standard parameters of a distribution are statistics like min, max, and mean, you can use RiskTheoMin and other "Theo" statistic functions to find those parameters. The triangular distribution, for example, has parameters of min, mode (most likely), and max, and you can get them by applying those "Theo" functions to the TriangAlt or Trigen.
If the parameters don't map directly to statistic functions, but there are formulas in the help file, you can solve those formulas to find the parameters. For instance, the help file says that the mean and variance of a BetaGeneral are
μ = min + α_{1}(max−min)/(α_{1}+α_{2})
σ² = α_{1}α_{2} (max−min)² / ( (α_{1}+α_{2})² (α_{1}+α_{2}+1) )
Solving for α_{1} and α_{2} gives
α_{2} = ( (μ−min)(max−μ)/σ² − 1 ) (max−μ) / (max−min)
α_{1} = α_{2} (μ−min) / (max−min)
The attached workbook shows about a dozen examples, mostly less complicated than that. Unfortunately, not all distributions have closedform expressions for the statistics in terms of the distribution parameters; for those, the only choice is the method above using the Define Distribution window.
What about RiskUniformAlt? I'm curious how @RISK can use a formula to convert it to standard parameters, when the other Alt distributions require successive approximations.
This section shows the algebraic solution for those who are interested, although the techniques given above are quicker and simpler. Unlike all the other Alt functions, @RISK uses formulas to convert RiskUniformAlt to the equivalent nonAlt function. Consider RiskUniformAlt(C1,x1,c,x2) where C1 and C2 are cumulative ascending percentiles >0 and <1. How is that converted to the equivalent RiskUniform(min,max)?
The CDF (cumulative distribution function) for RiskUniformAlt is a straight line passing through your desired percentiles (x1,C1) and (x2,C2). But the same straight line also passes through (min,0) and (max,1), although you don't yet know the values of min and max. Therefore the equation of the CDF is
C = (x − min) / (max − min)
Substituting your two desired percentiles (x1,c1) and (x2,C2) gives C1⋅(max − min) = x1 − min and C2⋅(max − min) = x2 − min. Solving those as simultaneous equations in min and max gives the formulas
min = (x1⋅C2 − x2⋅C1) / (C2 − C1)
max = min + (x2 − x1) / (C2 − C1)
Additional keywords: Standard parameters, Alt parameters, Standard distributions, Alt distributions
Last edited: 20180705
Applies to: @RISK 5.x–7.x
Is there an easy way to turn input variables on and off? I would like to try a simulation with some of the variables turned off, but I don't want to replace the distribution formulas with constants because I will want the distributions to vary again in later simulations.
Yes, you can lock any inputs. To lock an input, do any of these:
During a simulation, a locked input always returns its static value (if specified) or alternatively, its expected value, or the value specified through the options under When a Simulation is Not Running, Distributions Return of the Simulation Settings dialog.
Last edited: 20150619
Applies to: @RISK 5.x–7.x
Where should I use the RiskSixSigma( ) property function? Should it be part of RiskOutput( ) or RiskCpk( )?
The standard way is to use RiskSixSigma( ) with RiskOutput( ). That tells @RISK to put sixsigma labels on the graphs, and extra statistics in the statistics grid. It also lets you use the sixsigma worksheet functions to calculate Cpk and many other statistic functions. (In @RISK, click Insert Function » Statistic Functions » Six Sigma.)
For example, suppose you have an output in cell A1 that looks like this:
=RiskOutput(,,,RiskSixSigma(0,1,.5))+
formula
If you put the formula =RiskCpk(A1)
in another cell, @RISK will do the Cpk calculation using those LSL/USL/Target values. By doing it this way, you associate the sixsigma properties with the calculated output, and all statistic functions will use the same values.
Does that mean that I should never put a RiskSixSigma( ) inside RiskCpk( )?
There are two situations where you would want to place a RiskSixSigma( ) property function inside a statistic function such as RiskCpk( ):
You may have an output you don't want to apply sixsigma properties to, but you still want to compute the Cpk for it with a certain set of parameters. For example, you have a regular output in cell A2 with no sixsigma properties. In another cell, you can place the formula =RiskCpk(A2,,RiskSixSigma(0,1,.5))
to get the Cpk assuming those LSL, USL, and Target values.
You may want to calculate the Cpk for an output with a different set of parameters — for instance, to make a table of different Cpk values for different LSL/USL pairs. Using the sample output formula mentioned above for cell A1, you might have RiskCpk(A1,,RiskSixSigma(0,1,1.5))
. This would override the sixsigma parameters the output normally has in favor of the ones embedded in the Cpk function.
How are the arguments to RiskSixSigma( ) used in computing Six Sigma statistic functions?
In @RISK, please click Help » Example Spreadsheets » SixSigma » Six Sigma Functions.docx. The first section of that document explains where each pf the five arguments to RiskSixSigma( ) is used. Following that are technical details of each of the 19 statistic functions, including computational formulas.
Additional keywords: Cp, RiskCp, Cpk, RiskCpk, Cpm, RiskCpm, DPM, RiskDPM
Last edited: 20150619
Applies to: @RISK, all releases
I use the Excel RAND function a lot in my spreadsheet, but it is causing some problems. For example, I am not getting the same results when I run my simulation a second time, even though I am using a fixed seed. And when I use shoeprint mode, the numbers in the worksheet are different from what the Data Window shows for the same iteration.
Use an @RISK distribution like RiskBernoulli or RiskUniform instead of Excel's RAND function. If you have a fixed random number seed, @RISK functions will produce a reproducible stream of random numbers. See Random Number Generation, Seed Values, and Reproducibility for more about this.
Sometimes people use RAND in an IF function to decide whether to draw a value from an @RISK distribution:
=IF( RAND()<0.4, RiskNormal(100,10), 0 )
The direct @RISK equivalent to Excel's RAND is RiskUniform(0,1):
=IF( RiskUniform(0,1)<0.4, RiskNormal(100,10), 0 )
However, RiskBernoulli is a simpler choice for IFtests because it puts the probability right in the function:
=IF( RiskBernoulli(0.4), RiskNormal(100,10), 0 )
You can simplify this expression even further. Since RiskBernoulli returns a 0 or 1, you can replace the IF with a multiplication:
=RiskBernoulli(0.4) * RiskNormal(100,10)
All four of these formulas say that a given risk is 40% likely to occur, and if it does occur it follows the normal distribution. But the @RISK functions give you a reproducible simulation, which RAND does not.
Which of those is the recommended way to model an event risk or operational risk?
The last one is the simplest, but all four have the same problem: you're modeling one risk with two distributions. This means that sensitivity measures won't be accurate, and graphs of simulated results will either show a lot of errors or show a lot of values that weren't actually used. To solve all of these problems, you want to wrap the expression in a RiskMakeInput, like this:
=RiskMakeInput( RiskBernoulli(0.4) * RiskNormal(100, 10) )
See Event or Operational Risks for more information about using RiskMakeInput in this way.
Additional keywords: Bernoulli distribution, MakeInput distribution, Uniform distribution
Last edited: 20190215
Applies to: @RISK, all releases
I'd like to use the triangular distribution in @RISK, but I don't know the mode (m.likely), only the mean. Can I specify a triangular distribution using the mean?
Yes. The mean of a triangular distribution equals (min+m.likely+max)/3. Therefore
m.likely = 3*mean – min – max
Compute m.likely using that formula, and enter it along with min and max in the Define Distribution window.
(If the formula yields a value for m.likely that is less than min or greater than max, then mathematically no triangular distribution exists with the specified min, mean, and max.)
I'd like to use the triangular distribution in @RISK, but I don't know the mode (m.likely), only the median (50th percentile). Can I specify a triangular distribution using the median?
Yes. Many distributions, including RiskTriang( ), let you specify one or more parameters as percentiles. Here's one method:
Here's an alternative method:
Last edited: 20150619
Do @RISK distributions include the Double Triangular Distribution that has been recommended by AACE at http://www.aacei.org/resources/rp/?
(The relevant article is AACE recommendation number 41R08, "Risk Analysis and Contingency Determination Using Range Estimating" by Dr. Kenneth K. Humphreys.)
With @RISK 6.x–7.x:
Use the RiskDoubleTriang(min,mode,max,lower_p) distribution.
For example, suppose that you have a 76% probability of underrun (0 to 4) and a 24% probability of overrun (4 to 10). Then you want this formula:
=RiskDoubleTriang(0, 4, 10, 0.76)
With @RISK 5.x and earlier:
You can create a double triangular distribution by using a RiskGeneral distribution.
Suppose that you have a 76% probability of underrun (0 to 4) and a 24% probability of overrun (4 to 10). Then the RiskGeneral function would be
=RiskGeneral(0,10,{4,4},{0.38,0.08})
Please paste this into an empty cell and then click the Define Distribution icon to see the graph.
Where do the 0.38 and 0.08 come from? In this example, the minimum (greatest possible underrun) is 0, maximum (greatest possible overrun) is 10, and the most likely value is 4 (common side between the two triangles, repeated in {...,...}). 0.38 is the maximum probability density of the first triangle, and 0.08 is the maximum probability density of the second triangle. These are found by
You don't necessarily have to use these formulas. @RISK will automatically adjust the probability densities proportionally so that the total probability of the double triangle is 1.
Additional keywords: DoubleTriang distribution
Last edited: 20150619
Applies to:
@RISK 6.x/7.x
I'm trying to use a RiskGamma distribution, but the parameters don't seem to match what I found in another source.
A twoparameter gamma distribution has one shape parameter and one scale parameter. @RISK specifies them in that order, as shape = α (alpha) and scale = β (beta).
But there are other ways to specify the parameters, simply by using different Greek letters or even by using different parameters. Wikipedia, for instance, lists three ways: shape k and scale θ (theta), shape α or k and rate β (β = 1/θ, rate= 1/scale), or shape k and mean μ = kθ = k/β.
Don't be confused by the different letters. Comparing to Wikipedia, @RISK α (alpha) matches Wikipedia's k, and @RISK β (beta) matches Wikipedia's θ (theta), not Wikipedia's β (beta). @RISK's β is a scale parameter, but Wikipedia's β is a different parameter called rate, which is the reciprocal of the scale parameter θ. Thus @RISK reports the mean of the gamma distribution as αβ, considering β as a scale parameter, and that matches Wikipedia's αθ. Wikipedia also gives a mean of α/β, because the rate β is 1/θ where θ is the scale parameter corresponding to @RISK's β parameter.
I have parameters from an outside source. How do I enter them in @RISK?
Here's what to enter for the α and β parameters of the RiskGamma distribution;
Last edited: 20181228
Applies to:
@RISK, all releases
RISKOPTIMIZER, all releases
RDK and RODK, all releases
The RiskLognorm( ) function doesn't behave like the lognormal function in the books. When I enter μ=4, σ=2, I expect the simulated distribution to have a mean of 54.6 and standard deviation of 2953.5, but instead the mean and standard deviation are very close to 4 and 2. What's wrong?
@RISK, RISKOptimizer, and the developer kits have two lognormal distributions. RiskLognorm2( ) is the traditional distribution and behaves in the way described in statistics books. We also offer RiskLognorm( ), where the μ and σ (mu and sigma) you enter are the actual mean and standard deviation of the distribution, subject to the usual sampling fluctuation. The two distributions are the same except for the way you enter parameters.
If you know the desired actual mean and standard deviation, use RiskLognorm( ). For RiskLognorm(μ,σ):
Actual mean of the distribution = μ
Actual standard deviation of the distribution = σ
If you want to use parameters that match the lognormal distribution in many textbooks, use RiskLognorm2( ). For RiskLognorm2(μ,σ):
Actual mean of the distribution = exp(μ+σ²/2)
Actual standard deviation of the distribution = exp(μ+σ²/2)·sqrt(exp(σ²)−1) = (actual mean)·sqrt[exp(σ²)−1]
Finally, if you know the desired geometric mean and standard deviation of a lognormal distribution, use RiskLognorm2( ) but set μ to the natural log of the desired geometric mean, and σ to the natural log of the desired geometric standard deviation. For details, please see Geometric Mean and Geometric SD in Lognormal.
These three methods are illustrated in the accompanying workbook.
Additional keywords: Lognorm distribution, Lognorm2 distribution
Last edited: 20150619
Applies to: @RISK 5.x–7.x
In @RISK, is there any other way to generate a lognormal distribution with two percentile parameters, even if the lognormal automatically generates a third percentile parameter based on the other two?
Yes, you can do this easily.
Additional keywords: LognormAlt, RiskLognormAlt
Last edited: 20150619
Applies to: @RISK 5.0 and newer
I want to create a left skewed (negatively skewed) lognormal distribution function with @RISK, using three percentiles. Using the @RISK Define Distribution window with alt parameters, I put in 0 as my 5th percentile, .018 as my 70th percentile, and .021 as my 95th percentile. But then the Define Distribution window says "Unable to graph distribution", and the function returns a #VALUE error. Can you explain why @RISK won't allow this to be done?
This is based on the definitions for skewness and the domains for mu and sigma in a lognormal (mu > 0 and sigma > 0, μ and σ both positive). The skewness will never be negative if all terms in the expression are always positive.
You do have several workarounds, however:
Enter 100 minus the percents, minus the percentiles, and minus the RiskLognorm, like this:
=RiskMakeInput( RiskLognormAlt(5%,0.021, 30%,0.018, 95%,0) )
The 95th percentile of 0.021 becomes a 5th percentile of minus 0.021, and so on for the others. The RiskMakeInput wrapper tells @RISK to collect data and statistics on the final formula, not just the RiskLognorm. See also: All Articles about RiskMakeInput.
With this technique, the Define Distribution window will show the "backwards" lognormal, with the negative percentiles. But after a simulation, the Browse Results window will show the desired distribution with +0.021 in the 95th percentile.
Enter those three (x,p) pairs in your worksheet and then fit a lognormal distribution. @RISK comes up with RiskLognorm(0.013156,0.0022747, RiskShift(0.0038144) ).
You could also use a different distribution, such as the BetaGeneral distribution, which can take on the left skewed shape.
Additional keywords: RiskBetaGeneral, RiskLognorm
Last edited: 20150619
Applies to: @RISK, all releases
I want to use a lognormal distribution. I have the geometric mean and geometric standard deviation. How can I set up this distribution?
Use RiskLognorm2, but wrap each of the two parameters in a naturallog function. Example:
=RiskLognorm2( LN(2.1), LN(1.8) )
You can type the function directly in Excel's formula bar, or use @RISK's Insert Function button, or use Define Distribution and select Lognorm2 from the Continuous tab. You can type the LN function right into the boxes in the Define Distribution dialog, as shown in the attached illustration.
Please note: In this application you want Lognorm2, not Lognorm. For the difference between them, please see Entering Parameters for Lognormal Distribution.
Last edited: 20150619
Applies to: @RISK 5.5 and newer
I have a RiskDiscrete distribution, and I want to ensure that each iteration gets a unique value from that distribution: no duplicates across iterations, in other words. How can I accomplish this?
The RiskResample distribution provides an easy solution for this requirement. For the first argument of RiskResample, use sampling method 1 if you want @RISK to go through your list of values in a specified order, or sampling method 3 for random sampling from your list of values without replacement.
With either sampling method 1 or method 3, if your simulation has more iterations than the number of values in your list, the RiskResample function will return an error for those extra iterations.
Additional keywords: Discrete distribution, Resample distribution
Last edited: 20160421
Applies to: @RISK 5.x–7.x
I have a RiskPoisson(3) distribution, and I click Define Distributions, or Browse Results after a simulation. I set the delimiters to 0 and 6, and @RISK shows a probability of 91.7% between them. But Excel's POISSON.DIST(6,3,TRUE) shows a cumulative probability of 96.6%. Which one is right?
This seems strange at first, but there's an explanation. This is nothing special about the Poisson distribution; it applies to RiskBinomial, RiskDiscrete, and all the other discrete distributions.
@RISK and Excel are both right, but they're measuring different things. Excel is reporting the cumulative probability from x=minus infinity to x=6. @RISK reports the cumulative probability from x=0 to x=6. But the Poisson distribution doesn't extend to negative x, so why aren't those two the same?
It's clearer if you look at the cumulative distribution. It's a step function, and x=0 and x=6 are right on the steps. So how is @RISK to allocate the probability for x=0 and the probability for x=6? The answer is that if a delimiter is directly on a discrete x value, @RISK allocates all the probability for that x value to the region to the left of the delimiter. So the 5% probability of x=0 (lefthand delimiter) goes in the lefthand region, and the 5% probability of x=6 (righthand delimiter) goes into the middle region. The probability shown for the middle region is thus P(L < x ≤ R), not P(L ≤ x ≤ R) as you might expect.
This convention avoids some anomalies. For example, suppose you set both delimiters to 3. If the rule were P(L ≤ x ≤ R), then the middle region, which has zero width, would have a probability of 22.4%, equal to P(x=3), and the visible probabilities would add up to only 77.6% instead of 100%.
Given that this is mathematically valid, it still looks odd at first glance. If you need to make the graph look "right" for a presentation, you can do it easily. Delimiters are rounded to two decimal places, so set them to −0.001 and 6.001. Then x=0 and x=6 will both be inside the center region, but @RISK will display 0.00 and 6.00 for the delimiters.
I clicked in an empty cell, clicked Define Distributions, and selected Poison with λ=3. Initially the graph showed delimiters of 1 and 6, with probability 90% between them. I just clicked on the delimiters, without moving them, and the probability changed to 76.7%. Why?
By default, the Define Distribution graph sets delimiters at the 5th and 95th percentiles. (You can change this default in the Simulation Graph Defaults section of Application Settings.) To show the delimiters, @RISK finds the x values of those percentiles. If you change the percentages, @RISK finds new x values; and if you change the x values, @RISK finds new percentages. When you click on a delimiter, even if you don't actually change it, @RISK takes that as a signal that it should adjust the percentage to the x value instead of the other way around. So it recomputes the percentages based on the x values 1 and 6.
But why should the probability change? Once again, the explanation is in the cumulative graph. One percentile can only be one possible x value, but one x value can be any of a range of percentiles. Thus, computing a percentile from an x value may not give a consistent result with computing an x value from a percentile. This is a feature of any discrete distribution, not just the Poisson.
Last edited: 20150619
Applies to: @RISK 5.0 and newer
Does @RISK have a Cauchy distribution?
Yes, beginning with @RISK 7.5 you can specify a Cauchy distribution (also known as a Lorentz or Lorentzian distribution) in the regular Define Distributions dialog: RiskCauchy(γ,β) where γ is the location parameter and β is the scale parameter.
@RISK 7.0 and earlier did not have a Cauchy distribution among the preprogrammed list. If you can't upgrade to the current version of @RISK, you can easily create one yourself from a t distribution. According to Evans, Hastings, Peacock Statistical Distributions 3/e (Wiley, 2000), pages 49–50:
"The Cauchy variate C:a,b is related to the standard Cauchy variate C:0,1 by C:a,b ~ a+b(C:0,1). ... The standard Cauchy variate is a special case of the Student's t variate with one degree of freedom."
Therefore, to get a Cauchy distribution with location parameter (median) in cell A1 and scale parameter in A2, use this formula in @RISK 5.5 through 7.0:
=RiskMakeInput(A1 + A2*RiskStudent(1))
In @RISK 5.0, use:
=RiskMakeInput(A1 + A2*RiskStudent(1), RiskStatic(A1))
Notes:
The RiskMakeInput( ) wrapper tells @RISK that graphs, reports, and sensitivity analysis should show the Cauchy distribution from the formula, as opposed to the Student's t distribution.
The mean of a Cauchy distribution is undefined, so when a simulation isn't running you would normally see #VALUE in the cell. By using the RiskStatic property function, you tell @RISK to display the median in the cell when a simulation isn't running. Beginning with @RISK 5.5, the RiskStatic function is not necessary because @RISK will use 0 as the mean for RiskStudent(1).
The output graph may look like just a spike, because the default automatic scaling includes the few extreme values as well as the great mass in the center. If that happens, rightclick on the x axis labels and select Axis Options to adjust the scaling.
The attached workbook illustrates the Cauchy distribution for @RISK 7.0 and earlier.
Last edited: 20160712
Applies to: @RISK 5.x and newer
@RISK does not use the type of Extreme Value distribution that I need. Is there any way I can get the other type of Extreme Value distribution out of @RISK?
The Extreme Value distribution falls into two major types: Type I is also called Gumbel, and Type II is also called Fréchet; both are offered in @RISK.
Gumbel Distribution (Type I Extreme Value)
There are two subtypes of Gumbel distribution.
The Maximum Extreme Value distribution is implemented in @RISK's RiskExtValue(α,β) function, which has been available since early versions of RISK.
The Minimum Extreme Value distribution is implemented in @RISK 6.0 and newer as the RiskExtValueMin(α,β) function. In earlier versions of @RISK, use RiskExtValue( ), but put a minus sign in front of the function and another minus sign in front of the first argument. For example, for a Minimum Extreme Value distribution with α=1, β=2, use RiskExtValueMin(1,2) in @RISK 6.0 and newer, or –(RiskExtValue(–1,2)) in @RISK 5.7 and earlier.
Fréchet Distribution (Type II Extreme Value)
The Fréchet distribution is defined in @RISK 7.5 and newer.
If you have an older @RISK and can't upgrade to the latest, you can use the technique in Add Your Own Distribution to @RISK to create one. You'll need the CDF, which is exp[–z^{–α}], where z = (x–γ)/β. γ is the location parameter, β is the scale parameter, and α is the shape parameter.
Additional keywords: ExtValue distribution, ExtValueMin distribution
Last edited: 20160712
Applies to: @RISK 5.0 and newer
Does @RISK have an F distribution?
With @RISK 6.0 and newer:
Select Define Distributions » Continuous » F, or Insert Function » Continuous » RiskF.
With @RISK 5.x:
Before release 6.0, @RISK did not have an F distribution (FisherSnedecor distribution, variance ratio distribution) among the preprogrammed list. If you still have @RISK 5.x, you can easily create one yourself with a ratio of chisquared distributions. According to Evans, Hastings, Peacock Statistical Distributions 3/e (Wiley, 2000), page 92:
The variate F:n,m is related to the independent Chisquared variates χ²:ν and χ²:ω by
F:n,m ~ [(χ²:ν)/ν] / [(χ²:ω)/ω]"
Therefore, to get a distribution of F(A1,A2), you can program
=RiskMakeInput( (RiskChiSq(A1)/A1) / (RiskChiSq(A2)/A2) )
The attached workbook shows this, and requires @RISK 5.0 and later. (In earlier versions of @RISK, you can still do the calculation, but the RiskMakeInput wrapper isn't available. RiskMakeInput, which lets you treat a calculation as a distribution for most purposes, was new in @RISK 5.0.)
Last edited: 20150619
Does @RISK handle a generalized Pareto distribution?
Yes, with the restriction that the shape parameter must be positive.
The generalized Pareto distribution takes three parameters: location μ (mu), scale σ (sigma), and shape k. The RiskPareto2 distribution takes three parameters: scale b, shape q, and optionally a location shift in the RiskShift( ) property function.
Conversion between the parameters:
Conversion between the functions:
Last edited: 20170502
Applies to: @RISK 5.x–7.x
Does @RISK have a fourparameter Pert distribution, with a shape parameter?
The RiskPert distribution has three parameters: min, mode (most likely), and max. Some authorities, such as Wolfram, mention a fourparameter Pert distribution, the fourth parameter λ being the shape, and you may see references to a "BetaPert" on some Web sites. Implicitly, with RiskPert the value of λ is 4.
The Pert distribution is closely related to the Beta distribution, and in fact RiskPert is a special case of RiskBetaGeneral.
@RISK doesn't let you enter a shape parameter directly, but you get the equivalent of a fourparameter Pert distribution with a RiskBetaSubj(min, mode, μ, max) function, where
μ = (min + max + λ·mode) / (λ + 2).
To modify a regular threeparameter RiskPert(min, mode, max) by adding a shape parameter λ, change it to
RiskBetaSubj(min, mode, (min+max+λ*mode)/(λ+2), max).
If you have the min, mode, max, and λ in cells B1 through B4, then you can put the formula
=(B1 + B3 + B4*B2)/(B4 + 2)
in cell B5, and use =RiskBetaSubj(B1,B2,B5,B3). A simple example is attached.
Last edited: 20160829
Applies to: @RISK 5.x–7.x
As you know, @RISK sensitivity analysis lets you see the impact of uncertain model parameters on your results. But what if some of the uncertain model parameters are under your control? In this case the value a variable will take is not random, but can be set by you. For example, you might need to choose between some possible prices you could charge, different possible raw materials you could use or from a set of possible bids or bets. To properly analyze your model, you need to run a simulation at each possible value for the "usercontrolled" variables and compare the results. A Sensitivity Simulation in @RISK allows you to quickly and easily do this, offering a powerful analysis technique for selecting between available alternatives.
In @RISK, any number of simulations can be included in a single Sensitivity Simulation. The RiskSimtable( ) function is used to enter lists of values, which will be used in the individual simulations, into your worksheet cells and formulas. @RISK will automatically process and display the results from each of the individual simulations together, allowing easy comparison.
To run a Sensitivity Simulation:
=RiskSimtable({100,200,300,400})
This will cause simulation #1 to use a value of 100 for price, simulation #2 to use a value of 200, simulation #3 to use a value of 300 and simulation #4 to use a value of 400. (If you have too many values to place comfortably in the formula, see Cell References in Distributions.)
Each simulation executes the same number of iterations and collects data from the same specified output ranges. Each simulation, however, uses a different value from the RiskSimtable( ) functions in your worksheet.
@RISK processes Sensitivity Simulation data just as it processes data from a single simulation. Each output cell for which data was collected has a distribution for each simulation. Using the functions of @RISK, you can compare the results of the different alternatives or scenarios described by each individual simulation. The Distribution Summary graph summarizes how the results for an output range change. There is a different summary graph for each output range in each simulation, and these graphs can be compared to show the differences between individual simulations. In addition, the Simulation Summary report is useful for comparing results across multiple simulations.
The values entered in the RiskSimtable function can be distribution functions, so you can also use Sensitivity Simulation to see how different distribution functions affect your results. For example, you may wish to see how your results change if you alternately try RiskTriang( ), RiskPert( ), or RiskNormal( ) as the distribution type in a given cell. For more, see RiskSimtable with Distributions as Arguments.
Caution:
It is important to distinguish between controlled changes by simulation (which are modeled with the RiskSimtable( ) function), and random variation within a single simulation (which is modeled with distribution functions). RiskSimtable( ) should not be substituted for RiskDiscrete( ) when evaluating different possible random discrete events. Most modeling situations are a combination of random, uncertain variables and uncertain but "controllable" variables. Typically, the controllable variables will eventually be set to a specific value by the user, based on the comparison conducted with a Sensitivity Simulation.
Caution:
Each simulation executed when the number of simulations is greater than one in the Simulation Settings uses the same random number generator seed value. This isolates the differences between simulations to only the changes in the values returned by RiskSimtable( ) functions. If you wish to override this setting, select Multiple Simulations Use Different Seed Values in the Random Number Generator section of the Sampling tab prior to running multiple simulations.
Additional keywords: Simtable, Sensitivity analysis
Last edited: 20150619
Applies to: @RISK, all releases
The @RISK manual says that RiskSimtable( ) can take distributions as arguments, but I can't get the syntax right. How should I code my RiskSimtable( ) function?
RiskSimtable( ) actually has one argument. It's an array, either a list of values in curly braces like {14,33,68,99} or an Excel range reference without curly braces like C88:C91. To use distribution functions as arguments to RiskSimtable( ), put them in a range of cells in Excel and then specify the range as the argument to RiskSimtable( ).
Please download the attached example, KB55_SimtableArguments.xlsx. It shows two methods to use RiskSimtable( ) to modify distributions from one simulation to the next. In each case, cell references are the key to making the behavior vary. In the example, Simulation Settings » Sampling specifies that multiple simulations all use the same seed. Thus, any differences between simulations are completely due to the different distributions chosen.
Method 1: There is only one distribution function, RiskBinomial( ), in this example. Its second argument, p, is a cell reference to a RiskSimtable( ) function that lists the value of p for each simulation. Other formulas would use the value of the distribution function, not the RiskSimtable( ) function.
Method 2: Each simulation uses a different distribution function. Those functions are defined in an array of cells, and the RiskSimtable( ) function has that array reference as its argument. Other formulas would use the value of the RiskSimtable( ) function, not the individual distribution functions.
There's one potential problem with that second method. Since the RiskSimtable( ) function refers to the three cells containing the three distribution functions, all three of them are precedents of the RiskSimtable. If one of your @RISK outputs refers to that RiskSimtable(), directly or indirectly, all three of the distributions will show as precedents of the output. Logically, in each of the three simulations, a different one of the functions is a precedent of your output. But since the RiskSimtable( ) function argument refers to all three, all three show up as precedents in each of the three simulations.
The solution is to wrap the RiskSimtable( ) inside a RiskMakeInput( ), as was done in the last block in the example. Then @RISK will not consider the precedents of the RiskSimtable( ) as precedents of the output, and the tornado diagram for the output will show just one bar in each of the three simulations, which makes sense logically. See also: All Articles about RiskMakeInput.
Additional keywords: Simtable
Last edited: 20151006
Applies to: @RISK, all releases
I'm using several RiskSimtable functions because I want to vary multiple variables. Variable A has two values and variable B has five values. How do I set up the 2×5 = 10 simulations to use all combinations of the variables?
When you have multiple RiskSimtable functions, the first simulation uses the first value of every RiskSimtable, the second simulation uses the second value of every RiskSimtable, and so on. If the number of simulations is greater than the number of values, that RiskSimtable will return error values for the extra simulations.
This means that if you want 2×5 = 10 combinations, each RiskSimtable needs 10 values. There are two ways to accomplish this: list all ten combinations of values, and have your RiskSimtable functions access each list, or select values of the variables yourself based on the current simulation number without using RiskSimtable. The first method is easier, especially if you have a small number of variables and they have a small number of values. The second method is more flexible and can be extended easily, but it's more complicated. The attached workbook shows both methods, using the same three variables for each.
Additional keywords: Simtable
Last edited: 20141017
Applies to:
@RISK, all versions
Question:
I have N items, and every iteration I need to select exactly two of them. Let's say N = 25, for example. I can't just use two RiskIntUniform(1,25) because they might come up with the same number in a given iteration. I need two unique items in every iteration. (I'm not worried about repetitions between iterations, just that the two numbers I get in any particular iteration are always different from each other.)
Response:
The attached workbook shows two methods to accomplish this. Each method varies the two selections independently but guarantees that they'll never be equal in any one iteration. You can tap F9 repeatedly to see how each method selects two numbers, and each time the two are different. If you run a simulation, it will count the number of occurrences where the two numbers are the same; that is zero because they are always different, as desired.
In Method A, you use RiskIntUniform(1,25) to select the first one. Therefore, 24 items have not been selected as the first item, so you use RiskIntUniform(1,24) to help you find the second one. Specifically, to find the second one you add the two RiskIntUniform functions together and then, if the total is greater than N, you subtract N. For example, suppose that on one iteration you get 16 from RiskIntUniform(1,25) and 19 from RiskIntUniform(1,24). Then your second selection is number 35 ( = 16+5–10).
Method A is fairly straightforward, but it has a small problem: the 25 numbers are not quite equally likely to occur over the course of the whole simulation. (See the 'Method A Results worksheet in the attached workbook.) Why does this happen? Adding two independent distributions, as Method A does, tends to lose some of the advantage you normally get from the stratified sampling method of Latin Hypercube.
Method B overcomes this problem, but at the cost of some complexity. Start with the number of ways to draw two numbers from N without replacement: that is N(N–1)/2. For N = 25, there are 300 possibilities, which you can think of as numbered from 1 to 300. Therefore, Method B uses a RiskIntUniform(1,300). In each iteration, the integer value is "decoded" to a pair of unique integers 1–25. (If you look at the formulas, you'll see some pretty involved algebra.)
Now the bumpiness of the results of Method A is gone. On the 'Method B Results' sheet, you can see that all 25 numbers come up exactly the same number of times.
Looking at the formulas on the 'TWO METHODS' sheet, you might be suspicious of the formulas for first and second selection with Method B. Maybe they work for 25 items but not for other numbers of items? That's the purpose of the last sheet, 'Method B Verify'. It shows that, for any number of items from 3 to 100, the RiskIntUniform of Method B does cover all possible draws of two different numbers.
last edited: 20140530
Applies to: @RISK 5.0 and newer
I need a particular distribution that isn't in the Define Distributions dialog. Can I just give @RISK a formula for the CDF and have @RISK draw the random numbers?
If you have a formula for the inverse CDF, you can use it with @RISK to create your own distribution. The input to that formula is a RiskUniform(0,1), which provides a randomly selected cumulative probability; then your inverse CDF formula converts that to an x value. By enclosing the formula in RiskMakeInput( ), you tell @RISK to treat the formula as a regular distribution for purposes like sensitivity analysis and graphing.
We'll illustrate this with the Burr distribution. (Starting with release 7.5, the Burr12 distribution is built into @RISK, but you would use the same method if you need to create a distribution that's not in @RISK.) Wikipedia gives the CDF of a Burr Type XII as
F(x; c,k) = 1  (1 + x^{c})^{k}
where c and k are positive real numbers. A little algebra gives the inverse as
x = [ (1F)^{1/k}  1 ]^{1/c}
To draw random numbers for its standard distributions, @RISK first draws a random number from ithe uniform distribution 0 to 1, which represents a cumulative probability; then it finds the x value corresponding to that percentile — in other words, it uses that cumulative probability as input to an inverse CDF. (@RISK uses special techniques for distributions that don't have a closed form for their inverse CDFs.) Therefore, your Excel formula for a Burr distribution is the combination of RiskUniform and the inverse CDF above:
=( (1RiskUniform(0,1))^(1/k)  1 )^(1/c)
Finally, you want to wrap that in a RiskMakeInput, so that @RISK will store iteration values of this formula, let you make graphs, treat it as an input in sensitivity analyses, and so on. Your final Excel formula is:
=RiskMakeInput( ( (1RiskUniform(0,1))^(1/
k)  1 )^(1/
c), RiskName("Burr"))
You'll replace the parameters c and k with numbers, or more likely with cell references.
To see the formula in action, open the attached workbook in @RISK. The four graphs were made with the four combinations of c and k shown in the worksheet; you can compare these to the PDF curves show in the Wikipedia article. You can also enter your desired values of c and k in any of columns A through D, and run a simulation.
See also: All Articles about RiskMakeInput
Last edited: 20160712
Note: This article illustrates solutions to very specific problems, but you can modify them to create many different custom distributions.
Example 1:
I need a distribution where there's a 75% chance of a value between 0 and 8 and a 25% chance of a value between minus 12 and minus 7. A competing product does this as a "custom distribution". Can I do it in @RISK?
Response:
Yes, the RiskCumul function can represent this distribution for you. In RiskCumul, you specify an array of points and a second array of cumulative probabilities at those points.
Here is the function:
=RiskCumul(minimum, maximum, array of x, array of cump)
and specifically for your distribution:
=RiskCumul(12, 8, {7,0}, {0.25,0.25})
Try pasting this formula into an Excel cell and then clicking Define Distribution to see the histogram.
Here's how to read the arguments:
x  cump  explanation 

−12  0  minimum value of distribution is −12 
−7  0.25  25% probability between −12 and −7 
0  0.25  0% probability between −7 and 0 
8  1  maximum value of distribution is 8 
The first two arguments to RiskCumul are the lowest and highest possible values in your distribution. You specified minus 12 and plus 8 in your problem statement.
The array of x's and the array of cump's are enclosed in curly braces { }. (Alternatively, you could put the numbers in cells of your Excel sheet, and then reference the array in the form D1:D4 without braces.)
The 0.25 cumulative probability for x=0 might seem a bit strange. The explanation is that you specified zero probability between minus 7 and 0. If the probability in that region is zero, then the cumulative probability at every point in the region is the same as the cumulative probability at the left edge, namely 0.25 (25%).
The cumulative probability of 1 is not specified anywhere in the RiskCumul function, because it's implicit in the listing of 8 as the maximum for the distribution.
Example 2:
I need to set up a probability distribution as follows:
Response:
Here's how to analyze it:
Paste this formula into a cell:
=RiskCumul(15, 5, {5,0}, {0.25,0.25})
and press the Enter key.
To see the distribution, click into the cell and click Define Distribution.
RiskCumul takes four arguments: the minimum x, the maximum x, an array of intermediate x's, and an array of the cumulative probabilities for those x's. (Arrays are enclosed in { } curly braces.) The 75% probability for the region 0 to 5 doesn't appear explicitly — it's implied by the fact that cumulative probability is 0.25 at x=0 and is 1.00 at x=5.
These particular examples show three regions (divided by two x's) between the minimum and maximum, but you could have any number of regions.
Additional keywords: Cumul distribution
last edited: 20130411
Applies to: @RISK 5.5.0 and newer
The help text for RiskSplice( ) says
The two pieces of the distribution will be reweighted since the total area under the (spliced) curve still has to equal 1. Thus the probability density of any given x value in the resulting spliced distribution will probably be different from what it was in the original distribution.
How exactly does RiskSplice( ) work? How are the density functions adjusted to make the new distribution?
Please see the attached Word document for the mathematical details and a complete example.
Additional keywords: Splice
Last edited: 20150423
Applies to:
@RISK 5.5.0 and newer
Can I splice together more than two distributions with RiskSplice? I understand how to use RiskSplice( ) to combine two distributions into one, but is there a way to combine more?
It is possible to splice together three or more distributions by nesting RiskSplice functions. For example, if you had distributions in cells A1, B1, C1, and D1, you could do:
=RiskSplice(A1,B1,X) in cell A3, =RiskSplice(C1,D1,X) in cell B3, and then splice those in another cell, which would be =RiskSplice(A3,B3,X).
You can also nest the distributions without using cell references if you prefer:
=RiskSplice(RiskNormal(30,1), RiskSplice(RiskWeibull(2,10), RiskGamma(2,10), 10), 40)
However, while splicing together more than two distributions is possible, the define distribution window is unable to graph it. It does simulate normally and you can see the results in the Browse Results window.
If you want to graph a distribution with an unusual shape, you might be better off with the RiskGeneral or RiskCumul distributions, which let you define the dataset manually, or the Artist feature under Distribution Fitting, which creates a RiskGeneral distribution for you.
Last edited: 20181102
Applies to: @RISK 5.x–7.x
How can I create a bimodal distribution in @RISK? I want a distribution that is a mix of one distribution some percentage of the time, and a different distribution the rest of the time.
Although it's possible to do the whole thing in one cell, it's clearer if you use several "helper cells". That will also make it easier to find what is wrong if the final distribution doesn't behave as you expected.
Please refer to the attached example in conjunction with these steps:
Place the two desired distributions in two cells (B15:B16).
In a third cell (C16), place the proportion of the final mix that should come from the first distribution. The rest will come from the second distribution.
In a fourth cell (B18), place a RiskBernoulli( ) to determine which distribution gets used in that iteration. (RiskBernoulli returns 1 the stated percentage of the time, and 0 the rest of the time.)
Finally (B20), construct an IF(fourth cell, first cell, second cell). That is the final mixed distribution.
Recommendation: Wrap the final distribution in a RiskMakeInput( ). That way, any sensitivity analysis that you do will treat the final distribution as an input and will not go back to the original inputs or the RiskBernoulli( ). See also: All Articles about RiskMakeInput.
I have a similar requirement, but instead of choosing a distribution probabilistically, I need to use one distribution below a certain x value and a different distribution above that value.
The RiskSplice( ) function is designed for this application. In the @RISK ribbon, click Insert Function and find RiskSplice( ) among the special distributions.
Last edited: 20150619
Applies to:
@RISK 6.x/7.x
I want to password one sheet in a workbook. How can I do that, and still run a simulation?
@RISK can store and remember the password after you provide it once. See "Protected Workbook: This operation cannot be performed ...".
I want to protect the whole workbook, and the above technique doesn't work. Is there another option?
If you protect the workbook by File » Save As » Tools next to the Save button) » General Options, you can write a VBA function to provide @RISK with the password. See "GetPassword cannot be found." This technique will not work if you protect the workbook with the Protect Workbook command on Excel's Review tab.
Last edited: 20180309
Applies to: @RISK 5.x–8.x
When creating a RiskCompound function, I notice that the results are the same if the entire distribution is defined within the function or if one of the component distributions is defined in another cell that the RiskCompound function references. However, if the function references another cell which references a third cell, the results are different.
The RiskCompound function is not designed to work the same with references to references as it does with a single cell reference. Please see the attached worksheet for a complete explanation.
See also: All Articles about RiskCompound
Last edited: 20211118
Applies to: @RISK 6.x/7.x, Professional and Industrial Editions
How many points can be used to fit a distribution? How many variables (columns) can be included in a batch fit?
@RISK requires at least five points, and it allows up to 10 million points in a fit.
Batch fits can include up to 256 variables. If you are fitting more than a few variables in a batch fit, for faster performance you may want to tell @RISK not to produce detailed reports. In the Batch Fit dialog, on the Report tab, turn off the option "Include Detailed Report Worksheet for Each Fit".
Time Series batch fits are limited to 255 variables.
Last edited: 20150619
Applies to: @RISK 6.x/7.x, Professional and Industrial Editions
I am a user of @RISK, and I wonder if it might be used for a nonparametric bootstrap method for analyzing a data set.
Beginning with release 6.0, @RISK offers parametric bootstrapping. Compared to nonparametric bootstrapping, parametric bootstrapping requires less resampling and is more robust with smaller data sets. You can get parameter confidence intervals as well as goodnessoffit statistics.
Because it is computationally intensive, parametric bootstrapping is turned off by default in @RISK. You can select it on the Bootstrapping tab of the dialog for fitting distributions. Please see "Appendix A: Distribution Fitting" in the @RISK user manual or help file. There's also a nice picture in 15.3 Bootstrapping from Penn State's Eberly College of Science.
See also: N/A in Results from Parametric Bootstrapping
Last edited: 20181109
Applies to: @RISK 5.x and newer, Professional and Industrial Editions
When I fit my data in @RISK, I get a very different result from the ________ software. Maybe @RISK fails to converge at all, or maybe it converges on a fit but the parameters are very different. Is there some setting I need to change?
Probably there is. Specifically, if the process that generated the data has a natural lower bound, you should specify that lower bound on the Distributions to Fit tab of the fitting dialog.
Why is this necessary? Many software packages assume a lower bound of zero for distributions that don't have a lefthand tail. Other packages, including @RISK, take a more general approach and make the lower bound subject to fitting also, as a shift factor. This allows, for instance, a distribution shaped like a lognormal but offset to left or right, if that matches the data best. But sometimes that is actually too much freedom, and @RISK fails to converge on a fit. (In general, "convergence failed" means that the numerical process of homing in on an answer for the MLE got stuck in a loop and couldn't finish.)
When the data have a natural lower bound, and you specify that lower bound to @RISK, it can do a better job of fitting more efficiently. Specifying the lower bound may even make the difference between "convergence failed" and a successful fit, as for example in some Weibull distributions with shape parameter less than 1.
On the Distributions to Fit tab of the fitting dialog, "bounded but unknown" restricts the fit to distributions that don't have lefthand tails, but it doesn't affect the fitting algorithm for those distributions. But when you specify a specific lower bound, then @RISK uses that as a fixed shift factor, and the mathematics of doing the fit are simplified.
Last edited: 20150601
Applies to: @RISK 5,x–7.x
Why won't @RISK allow me to specify that I want to fit a discrete distribution (e.g. a Binomial, Geometric, HyperGeo, IntUniform, NegBin, Poisson) in the "Distributions to Fit" dialog?
@RISK lets you choose distributions that are appropriate for the type of data you specify. On the "Data" tab, change the data type to a discrete type, and then the discrete distributions will be available to you on the "Distributions to Fit" tab.
Last edited: 20150619
Applies to: @RISK 5.x–7.x
My data set is as follows:
x  p 

0  0.14 
50  0.35 
100  0.30 
200  0.15 
500  0.06 
I calculate the mean in Excel by summing the product of each data value multiplied by its probability, and I get 107.5. But if I do a fit on this data, the Input column in the Fit tab shows the mean as 183.74. Have I used a correct method to calculate the mean for density data? If not, what is the correct way to do this?
Probability is quite different between discrete and continuous distributions. In a continuous distribution, there are an infinite number of points on a continuous distribution (not just 0 and 1, for instance, but also all values in between), and therefore the probability of getting any one of those values is infinitely small. That is why we always look at the probability that something will be within a certain range, not the probability that it will be equal to a single value. For discrete distributions, the probability of each possible outcome is nonzero; for example, a coin toss has only two, not infinite, possible values, so we can talk about the probability of a single value. When you do a fit, one thing you tell @RISK is the data type, so that it can apply the proper rules for probability.
The way you have the fit set up, you are specifying 5 points on a continuous density curve, which is not the same as specifying the probability at those points. Since it doesn't have any more information, @RISK assumes a linear change in density between each of these points (it connects the dots with straight lines). In effect, it treats the data as describing a RiskGeneral distribution.
When you manually calculated the mean, however, you assumed a discrete distribution: it only has values 0, 50, 100, 200, 500, and nothing else. If this is what you intended, then you want to select a data type of "Discrete Sample Data (Counted Format)" in the fitting dialog, on the first tab. As the name "counted format" suggests, the second column must be whole numbers, so you need to multiply all your probabilities by the same number. In this case, since the probabilities are all two decimal places, multiply them all by 100 to get whole numbers in the same proportion.
Last edited: 20150619
Applies to: @RISK 5.x–7.x
How does @RISK calculate the RMS error that it uses for fit ranking?
For curve data—x values with associated probability densities or cumulative probabilities—@RISK computes the rootmeansquare error as a measure of goodness of fit. The equation is in the help file, but it can be hard to relate that to the computations for your particular data set.
The attached example shows how @RISK computes the RMS error for (x,p) data, where p is the cumulative probability or area under the curve for all values less than or equal to that x value.
See also: RMS Error Calculation in Distribution Fitting with (x,y) Pairs.
Last edited: 20150619
Applies to: @RISK 5.x–7.x
How does @RISK calculate the RMS error that it uses for fit ranking?
For curve data—x values with associated probability densities or cumulative probabilities—@RISK computes the rootmeansquare error as a measure of goodness of fit. The equation is in the help file, but it can be hard to relate that to the computations for your particular data set.
The attached example shows how @RISK computes the RMS error for normalized or unnormalized (x,y) data, where y is the height of the probability density curve or relative frequency curve. Although the RMS calculation is the same in @RISK 5.x and 6.x, the example requires @RISK 6.0 or higher because it uses the new RiskFit functions that were introduced in @RISK 6.0.
See also: RMS Error Calculation in Distribution Fitting with (x,p) Pairs.
Last edited: 20150619
Applies to: @RISK 5.x–7.x
How do I get pvalues, critical values, and confidence intervals of parameters of fitted distributions?
In the Fit Distributions to Data dialog, on the Bootstrap tab, tick the box labeled "Run Parametric Bootstrap". You can also specify the number of resamples, and your required confidence level for the parameters. Bootstrapping will take extra time in the fitting process, particularly if you have a large data set.
Click the Fit button as usual. You'll see a popup window tracking the progress of the bootstrap.
When the fit has finished, you can click the Statistical Summary icon (last of the small icons at the bottom) to see an exhaustive chart. Or you can select one distribution in the list at the left and click the Bootstrap Analysis icon (second from right) to see just fit statistics and pvalues, or just parameter confidence intervals, for that one distribution. If the information is not available because the bootstrapping failed, you will see a box "Unable to refit one or more bootstrap resamples."
Why doesn't @RISK give pvalues for the KolmogorovSmirnov and AndersonDarling tests for most fits? Why do the ones that @RISK does give disagree with other software packages?
Basically, the pvalues require knowledge of the sampling distribution of the KS or AD statistic. In general this sampling distribution is not known exactly, though there are some very particular circumstances where it is.
While we don't know the exact methodology that other packages use, it is true that there are a number of ways to deal with this problem. The method @RISK takes is very cautious. If we cannot report the pvalue, either we report a possible range of values it could be (if we can determine that) or we don't return a value at all. Some people will choose the "noparametersestimated case", which can be determined in many cases, but which returns an ultraconservative answer. A good reference for how @RISK handles this can be found in the book GoodnessofFit Techniques by D'Agostino and Stephens.
Do you have any cautions for my use of pvalues?
Sometimes too much stress is laid on pvalues in distribution fitting. It's really not valid to select a pvalue as a "brightline test" and say that any fit with a higher pvalue is good and any fit with a lower pvalue is bad. There is no substitute for looking at the fitted distribution overlaid on the data.
We recommend against using the pvalues for your primary determination of which distribution is the best one for your data set. For some guidance, see "Fit Statistics" in the @RISK help file or in Appendix A of the user manual, and Interpreting AIC Statistics in this Knowledge Base.
Last edited: 20170629
Questions:
What does it mean for the inverse Gauss distribution to have an AD test value of 1.67895 and the Loglogistic distribution to have an AD test value of 6.78744? Does the AD test have a unique distribution, meaning that it is not a conventional F Test or χ² (chisquared) test? Is an AD test value of 1.68 approximately four times better than an AD test value of 6.79? How can the test values be compared?
Response:
The AD test value is simply the average squared difference between the empirical cumulative function and the fitted cumulative function, with a special weighting designed to accentuate the tails of the distribution. There are many good references for this, including Simulation Modeling and Analysis by Law & Kelton. What this means is that in an absolute sense AD values can be compared from one distribution to another. An AD test value of 6.78744 versus one of 1.67895 implies that the average squared distance between the empirical and fitted cumulative functions (including the effects of the preferential weighting of the tails) is four times as big in one case versus another.
A potential drawback for the AD test is that it does not have a convenient, unique test distribution, like the χ² test does. Actually, to be fair to the AD test, even the χ² statistic only approximately follows the χ² distribution in the case where fit parameters have been estimated (see Law & Kelton). Because the AD test doesn't have a usable test distribution, we can't calculate pvalues and critical values for the test, except in special distributions under special conditions, and even in those cases only approximately. There is a very brief discussion of this in Law & Kelton as well, but most of @RISK's treatment of this is taken from the very specialized book GoodnessofFit Techniques by D'Agostino & Stephens.
last edited: 20120804
Applies to: @RISK 5.x, Professional and Industrial Editions
(The fitting methods were changed beginning with @RISK 6.0.)
How does your software automatically determine the number of chisquared bins to use when fitting distributions against sample data? What degrees of freedom does it use? Is this the same method used for the "Auto" option when specifying the number of bins in a histogram?
χ² (chisquared) binning and histogram binning are very different, and the number and position of bars on a histogram chart is almost never the same as the arrangement of the χ² bins. For starters, χ² bins are equally probable and therefore are typically not all the same width, while (at least for all Palisade products) histogram graph bars always have equal width.
For histogram binning, see Number of Bins in a Histogram.
For χ² (chisquared) binning with n data points:
The smalln part is a rule of thumb that says you should have on average at least five data points per bin (a rule which is not always followed in practice). The largen part has a real basis in statistical theory. A reference for it is in GoodnessofFit Tests by Ralph D'Agostino and Michael Stephens (Dekker 1986), page 70.
After a fit, you can find how many bins @RISK used for computing the chisquared statistic by clicking the "Statistical Summary" icon at the bottom of the "Fit Results" graph.
The degrees of freedom for the χ² statistic is (number of points) minus 1, without regard to the number of parameters in the particular distribution. You can see this by examining the critical parameters in that same statistical summary. Law and Kelton, in Simulation Modeling and Analysis (2000), pages 359–360, say that some authors do vary degrees of freedom according to the number of parameters in the fitted distribution, but the conservative procedure is to use (number of points) minus 1, as @RISK does.
It's important to remember that the χ² binning has zero effect on which fit is actually presented to the user. In other words, when @RISK is trying to fit to (say) a triangular distribution, it chooses the parameters that make the triangle as close as possible to your data as measured by MLEs. (There is no LM optimizer in current versions of @RISK.) Changing the binning may change the statistics that purport to measure the goodness of a fit, but will have no effect on the parameters of the fitted distribution.
For most data sets, from a glance at the overlay plot of the fitted distribution against your data it should be obvious which fit is best. If the binning is important to you, you can click that tab of the Fit dialog before performing the fit, and adjust the binning to your preference.
Last edited: 20140114
Applies to: @RISK 6.x/7.x, Professional and Industrial Editions
I fitted {1,2,3,4,5} to a RiskIntUniform distribution. I used the formula
AIC = 2k – 2×ln(L)
where k = 2 is the number of parameters and L is the likelihood.
For a uniform integer distribution fitted to a sample of n = 5 points, every point has probability of 1/5, and so ln(L) = 5 ln(1/5). I computed
AIC = 2k – 2×ln(L) = 2×2 – 10×ln(1/5) = about 20.0944
But @RISK gives 26.0944 in the Fit Results window. How do you reconcile this?
@RISK actually computes AICc, which includes a correction for finite sample sizes.
The formula is AICc = AIC + 2k(k+1)/(n–k–1)
for a distribution with k parameters fitted to n data points.
With k = 2 for a RiskIntUniform and n = 5 data points,
AICc = AIC + 2×2×3/(5–2–1) = AIC + 6 = 26.0944
just as shown by @RISK.
The finitesample correction is important for very small samples, but much less important for samples of reasonable size. For example, for fitting a 2parameter distribution to 30 data points, the correction would be 12/27, about 0.4444.
Additional keywords: Distribution fitting, IntUniform
Last edited: 20150619
Applies to: @RISK 6.x/7.x, Professional and Industrial Editions
@RISK gives me several candidate distributions. How can I interpret the AIC statistics? How much of a difference in AIC is significant?
The answer uses the idea of evidence ratios, derived from David R. Anderson's Model Based Inference in the Life Sciences: A Primer on Evidence (Springer, 2008), pages 8991. The idea is that each fit has a delta, which is the difference between its AICc and the lowest of all the AICc values. (@RISK actually displays AICc, though the column heading is AIC; see Discrepancy in AIC Calculation?)
Example: suppose that the normal fit has the lowest AICc, AICc = –110, and a triangular fit has AICc = –106. Then the delta for the triangular fit is (–106) – (–110) = 4.
The delta for a proposed fit can be converted to an evidence ratio. Anderson gives a table, which can also be found on the Web. One place is page 26 of Burnham, Anderson, Huyvaert's "AIC model selection and multimodel inference in behavioral ecology", Behav Ecol Sociobiol (2011) 65:23–35 (PDF, accessed 20140711). In the table, a delta of 4 corresponds to an evidence ratio of 7.4, meaning that the normal fit is 7.4 times as likely as the triangular fit to be the right fit. If you had to choose between those two only, there's a 7.4/8.4 = 88% chance that the normal is right, and a 1/8.4 = 12% chance that the triangular is right. But of course you usually have more than two fits to choose from.
To give you a further idea, delta = 2 corresponds to an evidence ratio of 2.7, and delta = 8 to an evidence ratio of 54.6.
So how high does delta need to be before you reject a proposed fit as unlikely? Anderson cautions, "Evidence is continuous and arbitrary cutoff points ... should not be imposed or recognized." Yes, the higher deltas correspond to higher evidence ratios, so you can think of them as higher evidence against the lowerranking fit, but you can never reject a fit with complete certainty. And of course if all the fits are poor then the best of them is still not a good fit. One other argument against relying solely on mechanical tests: A model that is a poorer overall fit may nonetheless be better in the region you care most about, or vice versa. It's always advisable to look at the fitted curves against the histogram of the data when making your final decision.
Last edited: 20150619
Applies to: @RISK 6.x/7.x, Professional and Industrial Editions
When I fit points to the continuous distributions RiskUniform and RiskExpon, the minimum of the fitted distribution is to the left of the smallest data value. The maximum of the fitted RiskUniform is to the right of the largest data value.
This seems strange at first, but it actually makes good sense if you look deeper. Here are two explanations:
The data points you're fitting are a sample from some ideal theoretical distribution that you are trying to find. How likely is it, purely by chance, that your sample data points would include both the absolute minimum and the absolute maximum of the theoretical distribution? Extremely UNlikely. Therefore, the boundaries of the theoretical distribution are almost certainly wider than the boundaries of your sample data.
This issue is the famous German Tank Problem: given serial numbers of captured or destroyed tanks, how do you estimate the number of tanks that are being produced?
More formally, consider the sampling distribution of an order statistic, in this case the minimum and possibly the maximum. Let n be the number of points in your sample. If you take many, many samples of size n from the theoretical distribution, and take the minimum of each sample, you have the sampling distribution of the minimum. The mean of that distribution (μ_{min}) should equal the minimum of the data points. Some values in the sampling distribution will be above μ_{min} and some will be below. The minimum (the left boundary) of the sampling distribution of the minimum must be less than μ_{min}, which means it must be less than the minimum of the sample data.
With the uniform distribution, you can make an equivalent statement about the maximum. The exponential function is unbounded to the right, so there is no maximum.
@RISK lets you view a simulated sampling distribution of each parameter of each fitted distribution, such as the minimum and maximum of the fitted continuous uniform distribution. While setting up the fit, on the Bootstrap tab of the dialog, select Run Parametric Bootstrap. Then, on the Fit Results window, click the Bootstrap Analysis icon, which is the next to last one in the row at the bottom of the window. Select Parameter Confidence Intervals. Select a distribution at the left, select a parameter at the top, and see the graph of the simulated sampling distribution of that parameter. To see the statistics of the distribution, click the dropdown arrow at the top right of the graph and select Legend (with Statistics) or Statistics Grid.
This issue will come up in any bounded continuous distribution, where the probability density shifts abruptly at the left from zero to a positive value, or at the right from a positive value to zero.
For example, if you fit the points {11,12,13,14,15} as a continuous uniform distribution, you get RiskUniform(10,16), not RiskUniform(11,15) as you might expect at first. (Please see attached illustration.) To make μ_{min} and μ_{max} equal the minimum and maximum of the sample data, @RISK applies a bias correction of (max–min)/(n–1) = (15–11)/(5–1) = 1, so the minimum and maximum of the RiskUniform are 1 unit left and right of the minimum and maximum of the data. For the points {11,11.5,12,12.5,13,13.5,14,14.5,15}, the bias correction is 0.5, and the fitted uniform function is RiskUniform(10.5,15.5).
For the exponential function, the bias correction is (mean–min)/n. Again considering the points {11,12,13,14,15}, the bias correction is (13–11)/5 = 0.4. (Please see attached illustration.)
Last edited: 20150619
Applies to: @RISK 6.x/7.x, Professional and Industrial Editions
When I do a fit on {1,2,3,4,5} as discrete data, @RISK prefers a RiskPoisson distribution, even though the RiskIntUniform is clearly a better fit. Why is that?
In @RISK 6.x, the default statistic for measuring goodness of fit is AIC (more specifically, AICc). For small data sets, the AIC calculation strongly prefers distributions with fewer parameters. (This is an application of the principle of parsimony.) The Poisson distribution and the geometric distribution (RiskGeomet) are both oneparameter distributions, but the uniform integer distribution (RiskIntUniform) is a twoparameter distribution. With a data set of only five points, the AIC statistic's preference for distributions with fewer parameters trumps the poorer likelihood functions computed for those distributions.
There are three countermeasures:
For small data sets, consider changing Fit Ranking to BIC. Although BIC also favors distributions with fewer parameters, it doesn't favor them as strongly as AIC does. (Please see attached illustration.)
Don't just take the first listed fit, but examine the fitted distributions. Your data probably won't show the kind of dramatic difference that we got from this artificial data set, but you may find that a fit that doesn't have the best statistic actually does a better job in a particular region of the graph that you care most about.
Use more data points. @RISK does allow fitting to as few as five data points. But in general, the more points you have, the better the fitted distribution will match the true theoretical distribution that those points represent. Extending this madeup data set, with as few as nine points {1,2,3,4,5,6,7,8,9} @RISK computes the smallest AIC statistic for the integer uniform distribution.
Last edited: 20150619
Applies to: @RISK 6.x/7.x, Professional and Industrial Editions
In the dialog box for distribution fitting, I selected parametric bootstrapping. The results columns for some distributions shows N/A for bootstrap results, instead of numbers. What does this mean?
N/A for bootstrapping means that the bootstrap failed for that distribution.
If the bootstrap fails for one distribution, it will not necessarily fail for all distributions. The bootstrapping process is done separately for each type of distribution.
What does @RISK consider to be a failure of bootstrapping?
In the bootstrapping process, @RISK takes each fitted distribution and generates a large number of new sample data sets from it, each with the same size as the original data set. It then refits these new data sets and tabulates information about each of the resampled fits. @RISK takes a conservative approach. If it is unable to fit a distribution to even one of the new sample data sets that it generated (meaning that the parameters of that distribution did not converge for that new data set), then @RISK considers that the bootstrap has failed for that distribution.
Does that mean that the fit itself is bad?
Fits aren't good or bad in absolute terms. Instead, you can say that one distribution is better or worse than another for your data set.
Evaluating fits is both objective and subjective. You have the guidance of the fit statistics; for example, see Interpreting AIC Statistics. But your own judgment plays a part, too. For one thing, you have to decide which statistic to use — by a different statistic, fits may rank differently. Also, as you compare your data set to the distributions that @RISK came up with, you might decide to use distribution A rather than B, even though B has a more favorable fit statistic. Maybe A is a better fit than B in a region that you feel is most important, or maybe you have some more general reason for preferring one type of distribution over another.
Last edited: 20160114
Applies to: @RISK 6.x/7.x, Industrial Edition
How does @RISK try to achieve stationarity in fitting data to time series? Does the "Auto Detect" button use the DickeyFuller test or KPSS?
The first thing to say is that, without knowing the source of the data, it's impossible to do auto detect perfectly; by necessity, it's a heuristic. When you choose Auto Detect, you need to look at the result and correct it as necessary, based on your knowledge of the source of the data,
The KPSS test isn't appropriate for @RISK, since we don't really support trendstationary timeseries. Currently we only detrend using differences, although that may change in future versions of @RISK.
Last edited: 20151221
Applies to: @RISK 6.x/7.x, Industrial Edition
Does @RISK support ARIMAbased time series? I couldn't find anything about ARIMA in the help file.
To use ARIMA forecasting in @RISK, select ARMA(1,1) and specify trending.. Firstorder integration gives ARIMA(1,1,1), and secondorder integration gives ARIMA(1,2,1).
For all the details, step by step with illustrations, please open the attached Excel file. (You can view the file without starting @RISK.)
Last edited: 20160512
Applies to: @RISK 6.x/7.x Industrial Edition
I'm using Time Series in @RISK 6. I want to ensure that the projected results are greater than zero. I tried using RiskTruncate, but the manual says that RiskTruncate and RiskShift aren't effective with time series. Is there a way to do what I want?
Yes, assuming that the original data are greater than zero.
In the fit dialog, select Function and then Logarithmic. The data will be transformed according to that function. After the fit, the projected data are detransformed. Detransforming a logarithm means exponentiating, and the range of the exponential function is all positive numbers.
You'll want to experiment a bit and make sure that doesn't have any undesirable side effects with your particular data set.
Last edited: 20150619
Applies to: @RISK 6.x/7.x, Industrial Edition
In time series fitting, when I click Write to Cells, @RISK gives me a default array of 24 cells. Can I change the default number of periods that time series will project into the future?
Yes, you can. In Utilities » Application Settings, expand the section "Time Series Graph Defaults". The last item, "Num. Default Data Points", tells the time series fit how many periods to forecast past the end of your historical data. You can still change this when you do any particular fit.
Last edited: 20180503
Applies to: @RISK 6.x/7.x, Professional and Industrial Editions
How does @RISK estimate distribution parameters? Can you give me any details?
In general, we use Maximum Likelihood Estimators (MLEs). For details, please use the Search tab in @RISK help to find the topic "Sample Data — Maximum Likelihood Estimators (MLEs)". After reading, click the Next button at the top and continue reading the subtopic "Modifications to the MLE Method".
For references to methods that we use, search Help for the term "Merran" and click on the topic "Distributions and Distribution Fitting" in the search results.
It's important to realize that not all distributions are fit in exactly the same way. In the more than 30 years we've been improving @RISK, we have developed many proprietary tweaks to the standard algorithms, to do a better job of fitting particular distributions. These let the fit proceed more efficiently, handle cases where the standard MLE algorithms break down, and so on.
Although the fine details of our fitting algorithms are proprietary, the fit results include many popular goodnessoffit statistics, including AIC, AndersonDarling, BIC, χ², KolmogorovSmirnov, and RMS. For details of these statistics, see the "Fit Statistics" topic in @RISK help, as well as several articles in the @RISK Distribution Fitting chapter of this Knowledge Base.
Last edited: 20160809
Applies to: @RISK 6.x/7.x/8.x, Industrial Editions
Can I fit a Time Series distribution with irregularly spaced data?
The @RISK methodology for Time Series is only applicable to equally spaced data.
So, if the you have enough data points, we would suggest that you use any interpolation method to transform the series into equally spaced observations and then use any model available in @RISK.
Last edited: 20200806
Applies to: @RISK, all releases
How do I specify correlations?
When two or more input variables should be correlated, you can click the Define Correlations icon in the ribbon, specify correlations in the Model Definition Window, or add RiskCorrmat( ) functions directly to the distribution formulas for those variables in your Excel sheet.
The correlation coefficients you specify are Spearman rankorder correlations, not Pearson linear correlations. The rankorder correlation coefficient was developed by C. Spearman in the early 1900's, and this article explains how @RISK computes the rankorder correlation coefficient.
Pearson correlations assume linear distributions, but the great majority of distributions are nonlinear, and Spearman is usually more appropriate for nonlinear distributions. A Web search for choose Spearman or Pearson correlation will show lots of articles about the different uses of these two forms of correlation.
During a simulation, how does @RISK draw random numbers to achieve my specified correlations?
@RISK draws all samples for correlated variables before the first iteration of the simulation. (Noncorrelated variables are sampled within each iteration.) Knowing the number of iterations to be performed, @RISK adjusts the ranking and associating of samples within each iteration to yield the defined correlation values. Again, this correlation is based on rankings of values, not actual values themselves as with the linear correlation coefficient. A value's "rank" is determined by its position within the minmax range of possible values for the variable.
@RISK generates rankcorrelated pairs of sampled values in a twostep process:
A set of randomly distributed "rank scores" is generated for each variable. If 100 iterations are to be run, for example, 100 scores are generated for each variable. (Rank scores are simply values of varying magnitude between a minimum and maximum. @RISK uses van der Waerden scores based on the inverse function of the normal distribution.) These rank scores are then rearranged to give pairs of scores which generate the desired rankorder correlation coefficient. For each iteration there is a pair of scores, with one score for each variable.
A set of random numbers (between 0 and 1) to be used in sampling is generated for each variable. Again, if 100 iterations are to be run, 100 random numbers are generated for each variable. These random numbers are then ranked smallest to largest. For each variable, the smallest random number is then used in the iteration with the smallest rank score, the second smallest random number is used in the iteration with the second smallest rank score, and so on. This ordering based on ranking continues for all random numbers, up to the point where the largest random number is used in the iteration with the largest rank score
This process results in a set of paired random numbers that can be used in sampling values from the correlated distributions during an iteration of the simulation.
This method of correlation is known as a "distributionfree" approach because any distribution types may be correlated. Although the samples drawn for the two distributions are correlated, the integrity of the original distributions is maintained. The resulting samples for each distribution reflect the distribution function from which they were drawn.
Does @RISK use Cholesky decomposition?
Yes. If Cholesky fails, the matrix is not selfconsistent, and @RISK proceeds as in How @RISK Adjusts an Invalid Correlation Matrix.
If Cholesky succeeds, @RISK proceeds as in Iman, R. L., and W. J. Conover. 1982. "A DistributionFree Approach to Inducing Rank Correlation Among Input Variables." Commun. Statist.Simula. Computa. 11: 311334. Retrieved 20180823 from https://www.uio.no/studier/emner/matnat/math/STK4400/v05/undervisningsmateriale/A distributionfree approach to rank correlation.pdf.
Why does Excel report a different correlation from the one I specified?
This correlation method yields a rank order correlation (Spearman coefficient) that is usually quite close (within normal statistical variability) to your specified value. However, Excel's =CORREL( ) function reports the Pearson coefficient. The Pearson value may vary somewhat from the Spearman value, depending on the exact nature of the correlated distributions. This difference is illustrated in the attached workbook. (Beginning with @RISK 5.5, you can use the =RiskCorrel( ) worksheet function to display the Spearman or Pearson correlation for simulated data.)
Correlation of discrete distributions can be a particular problem. For more on that, please see Correlation of Discrete Distributions.
See also: Correlation in @RISK collects over a dozen articles explaining various aspects.
Additional keywords: Corrmat property function
Last edited: 20180823
Applies to: @RISK 5.x–7.x
How many input distributions can correlate? Is there a limit to the size of my correlation matrix?
There is no fixed limit. However, as with all other aspects of modeling, your available system resources are a constraint.
Note on Excel 2003, with @RISK 6.3 and older:
Excel 2003 workbooks are limited to 256 rows. You can still have larger correlation matrices, but you have to use special techniques; see Correlation Matrix Exceeds Excel's Column Limit. This does not apply to newer versions of @RISK, because they require Excel 2007 or newer.
Recommendation: If possible, don't have one huge matrix, but partition your correlation into smaller matrices. For example, suppose you have 400 inputs that are correlated. A 400×400 matrix is 160,000 cells. But if those 400 inputs actually fall into four groups of about 100 each, and there's correlation within each group but not between the groups, then you should use four 100×100 matrices, for a total of 40,000 cells. @RISK can test the smaller matrices for validity and, if necessary, adjust them much faster than one large matrix. If all 400 variables really do need to be correlated with each other, you need that larger matrix. But if you can group the variables as described, it's worth having a separate correlation matrix for each group.
Recommendation: If you have several groups of variables that all need the same correlations within the group, they can all use he same smaller matrix. Follow the technique in Same Correlation Coefficients for Several Groups of Inputs. A typical example is time periods or geographical regions where a number of factors are correlated in the same way, but there's no correlation between periods or between regions.
Last edited: 20160830
Applies to: @RISK 4.x–7.x
I have multiple groups of inputs, and I want to use the same set of correlation coefficients for each group. But @RISK correlates all the inputs of all the groups together, which is not what I want. How do I tell @RISK that inputs A, B, C are correlated with each other, and D, E, F are correlated with each other with the same coefficients, but A, B, and C are not correlated with D, E, and F?
The short answer is to use the optional "instance" argument to RiskCorrmat( ), assigning a different instance to each group of correlated inputs. See attached example CorrelationGroups.xls. After a simulation, the worksheet CorrelationAudit_Report within that workbook shows sample correlations within a group and between groups.
You can set up the correlations by pointing and clicking (Model A below) or by formula editing (Model B below). These methods will work with any number of groups, and any number of inputs per group.
Solution details — point and click, Model A:
If the correlated groups aren't too large and there aren't too many of them, you can easily correlate separate groups of inputs through menu selections. For simplicity we'll show two groups of three inputs each. Within the attached example CorrelationGroups.xls, the two worksheets ModelA and @RISK Correlations were created by this method.
In @RISK 5.x–7.x:
You can now run the simulation. Inputs within each group will be correlated, but inputs in different groups will not be correlated. The worksheet CorrelationAudit_Report, which is created automatically within the workbook, shows that the actual correlations match the requested correlations quite well.
Special case: If the groups of inputs are in a contiguous rectangular array, either as rows or as columns, you can shortcut the above process:
In @RISK 4.x:
You can now run the simulation. Inputs within each group will be correlated, but inputs in different groups will not be correlated. The worksheet CorrelationAudit_Report, which is created automatically within the workbook, shows that the actual correlations match the requested correlations quite well.
Solution details — formula editing, Model B:
As an alternative to pointandclick, you can take advantage of Excel's ability to replicate formulas by dragging the fill handle. (Search Excel help for "fill handle" if this is unfamiliar to you.) This method scales well to larger groups of correlated inputs, or greater numbers of groups.
For this example we'll show ten groups of four inputs each, representing growth in the value of stocks and a bank account over ten years. Performances of stocks in a given year are positively correlated to each other but negatively correlated to interest rates. Within the attached example CorrelationGroups.xls, worksheet ModelB was created by this method.
Create your correlation matrix; row and column heads are optional but help to document the model. Highlight just the actual coefficients and define a name for them (menu selection Insert, Name, Define). In our example the correlation matrix including headings is C18:G23, and SecondCorr is the name of the 4×4 array of coefficients in D20:G23.
Set up your first group of correlated inputs as one row or one column. Create the distribution in the usual way, but add a RiskCorrmat function as an additional argument within the distribution function. The three arguments to RiskCorrmat are the name you assigned to the correlation matrix, the input number, and the instance. For reasons that will become clear in the next step, the instance argument should be a reference to the column header.
In our example, the first group is Year 1, in column E. Growth factors are the @RISK distributions in cells E9, E11, E13, and E15; look at the formulas for those cells and see how the RiskCorrmat function is used. The new values at year end are in cells E10, E12, E14, and E16. Notice that the growth factors are correlated, but the yearend values are not.
Highlight the cells of the first year, E8:E16, and drag the fill handle to create the additional groups through year 10 in column N. Notice how the instance argument changes in each group, but is the same for all the inputs within a group; this was the reason for the cell reference in step 2. Note also that the named correlation matrix does not change from one column to the next.
You can now run the simulation. Inputs within each group will be correlated, but inputs in different groups will not be correlated. The worksheet CorrelationAudit_Report, which is created automatically within the workbook, shows that the actual correlations match the requested correlations quite well.
Additional keywords: Corrmat property function
Last edited: 20161212
Disponible en español: Cómo prueba @RISK una matriz de correlación para determinar su validez
Applies to:
@RISK 4.x–7.x
How does @RISK decide whether my correlation matrix is valid?
The basic principle is that if two inputs are each strongly correlated to a third, they must be at least weakly correlated to each other. For example, it would be inconsistent to correlate A and B at 0.9, A and C at 0.8, but B and C at 0.0. A valid matrix is one where the correlation coefficients are mutually consistent.
When only three inputs are involved, it's pretty easy to check for valid combinations. If the coefficient of A and B is m, and the coefficient of A and C is n, then the coefficient of B and C must be in the range of
m n ± sqrt( (1m²) (1n²) )
Source: Two Random Variables, Each Correlated to a Third at Math Forum.
For example, if A and B correlate at 0.9, and A and C correlate at 0.8, then B and C must correlate in the range of
0.9 * 0.8 ± sqrt( (10.9²) (10.8²) ) = 0.72 ± 0.26153 = 0.458 to 0.982
Here's how @RISK generalizes this principle for a correlation matrix of any size:
If a correlation matrix is created using a full data set, it will be positive semidefinite if there is a linear relationship between any of the variables and positive definite if there is no linear relationship.
The easiest way to determine if a matrix is positive definite is to calculate its eigenvalues, and that is what @RISK does at the start of a simulation. A positive definite matrix will have all positive eigenvalues and a positive semidefinite matrix will have eigenvalues greater than or equal to zero and at least one eigenvalue equal to zero.
For @RISK, a "valid" matrix is any matrix that is positive definite or positive semidefinite, and an "invalid" matrix is any matrix that has at least one negative eigenvalue. For details on how @RISK adjusts an invalid correlation matrix, please see How @RISK Adjusts an Invalid Correlation matrix.
How can I determine ahead of time if my matrix is invalid?
With @RISK 5.x–7.x: In the @RISK Model window, click the Correlations tab and use the Check Matrix Consistency command to have @RISK check whether the matrix is self consistent.
With @RISK 4.5 and earlier: An "invalid" matrix has one or more negative eigenvalues. Excel itself doesn't have a worksheet function to calculate eigenvalues, but there are many software applications and Excel addins with that capability. One freeware alternative is MATRIX at http://digilander.libero.it/foxes/ (accessed 20130314). (We mention this as one example, without endorsement and without prejudice to any other software for computing eigenvalues.)
See also: How @RISK Adjusts an Invalid Correlation Matrix
Last edited: 20150623
Applies to: @RISK 4.x–7.x
How does @RISK decide whether my correlation matrix is valid? If the matrix is invalid, how does @RISK adjust it to create a valid matrix?
A correlation matrix is valid if it is selfconsistent, meaning that the specified coefficients are mutually compatible. Please see How @RISK Tests a Correlation Matrix for Validity.
When you click Start Simulation, @RISK checks all correlation matrices for validity. If a matrix is invalid, @RISK looks for an adjustment weight matrix (see below), If the adjustment weight matrix exists, @RISK uses it to adjust the invalid correlation matrix, and the simulation proceeds. But if there's no adjustment weight matrix, @RISK displays this message:
Warning
The correlation matrix at ... is not selfconsistent. @RISK can generate the closest selfconsistent matrix. OK generates a corrected matrix and continues, Cancel stops the simulation.
If you want to adjust the matrix on your own or create an adjustment weight matrix, click Cancel. This is usually a good idea, because in the absence of an adjustment weight matrix @RISK may make quite large changes in your correlation coefficients.
How do I set up and use an adjustment weight matrix?
This feature is available in @RISK 5.5 and newer.
You can create an adjustment weight matrix to guide @RISK in adjusting the correlations. The adjustment matrix is a triangular matrix the same size as the correlation matrix; a square matrix is also acceptable as long as it is symmetric.
In your adjustment weight matrix, enter a weight 0 to 100 in each cell below the diagonal. A weight of 100 means that the corresponding coefficient must not be changed, and a weight of 0 means that you don't care how much @RISK changes the corresponding coefficient. Between 0 and 100, larger weights place greater importance on the original coefficients. In other words, larger weights cause @RISK to apply less adjustment to the corresponding correlation coefficients, and smaller weights let @RISK adjust the corresponding correlation coefficients more.
The adjustment can be done during a simulation, or in a onetime procedure before a simulation. Both possibilities are explained below.
Technical details: Your correlation matrix is not selfconsistent, meaning that it has one or more negative eigenvalues. You want @RISK to find a consistent matrix that is as close as possible to your original inconsistent one, taking your adjustment weight matrix into account. This is a nonlinear optimization problem. The goal is to minimize the weighted sum of squared differences between the inconsistent matrix and a candidate consistent matrix. @RISK uses the standard limitedmemory BFGS algorithm to perform this optimization.
As mentioned above, weights are in the range 0 to 100. Between those special weights, other weights are treated in an exponential fashion. The exact details are proprietary, but 50 versus 25 or 10 versus 5 means "more important", not "twice as important".
Correcting a matrix during simulation:
The name of your adjustment weights matrix must match the range name of the correlation matrix, with the suffix _Weights. For example, if your correlation matrix is named Matrix1, the associated adjustment weight matrix must be named Matrix1_Weights. If a correlation matrix is inconsistent, @RISK looks for an adjustment weights matrix with the right name, and if it finds one it will adjust the inconsistent matrix without displaying any message. You can name a matrix by highlighting its cells and then typing its name in the name box to the left of Excel's formula bar. Or, click Formulas » Define Name. (In Excel 2003 and older, click Insert » Name » Define.)
Please see the attached example, KB75_AdjustDuringEverySimulation.xlsx.
When @RISK adjusts an invalid matrix during simulation, it doesn't store the adjusted matrix in your workbook or anywhere permanent. @RISK does cache the adjusted matrix in your temporary folder, in a file called CORRMAT.MTX. It will reuse that file in future simulations if you haven't changed your original matrix.
Correcting a matrix outside of a simulation:
You can perform the adjustment up front, rather than leaving @RISK to do it in every simulation. If you have a large correlation matrix, this can make a difference in the speed of your simulation. Use the RiskCorrectCorrmat( ) array function to place the corrected matrix in your worksheet, and make all your correlated inputs refer to the corrected matrix, not the original. With this approach, you can assign any name, or no name, to the adjustment weight matrix.
Please see the attached example, KB75_RiskCorrectCorrmat.xlsx.
When the RiskCorrectCorrmat( ) function performs an adjustment on a large matrix, it may take considerable time. You'll see messages on Excel's status line, referring to the step number (number of candidate valid matrices tried) and the residual (sum of squared differences). @RISK keeps at the optimization till the residuals stop decreasing sufficiently. Unfortunately, there's no way to know how many steps will be necessary, so @RISK can't give you a progress indicator in the form of percent complete.
What if I don't use an adjustment weight matrix?
If you're running @RISK 4.x or 5.0, or if you're running a later version but you didn't specify an adjustment weight matrix, @RISK follows these steps to modify an invalid correlation matrix:
Find the smallest eigenvalue (E_{o})
To shift the eigenvalues so that the smallest eigenvalue equals zero, subtract the product of E_{o} and the identity matrix (I) from the correlation matrix (C).
C' = C – E_{o}I
The eigenvectors of the matrix are not altered by this shift.
Divide the new matrix by 1 – E_{o} so that the diagonal terms equal 1.
C'' = (1/(1−E_{o})) C'
The matrix that @RISK calculates by this method is positive semidefinite, and therefore valid, but in no way is it special or optimal. It's one of many possible valid matrices, and some of the coefficients in it may be quite different from your original coefficients.
@RISK stores the new matrix in file CORRMAT.MTX in your temporary folder. You can use this as a guide to modify your matrix so that @RISK won't need to adjust it every time you run a simulation. See How @RISK Tests a Correlation Matrix for Validity to ensure that your edited matrix is selfconsistent.
Additional keywords: CorrectCorrmat function
Last edited: 20171020
Applies to: @RISK, all versions
I specified a correlation of 0.5 between two RiskBinomial(1, 0.5) distributions, and the actual correlation of simulated results was much lower. I understand that simulated results will only approximately match the requested correlation, but why such a big difference?
This issue will occur to some extent for any discrete distribution. In general, the fewer the possible values of the distribution, the greater discrepancy you will see. Here is the explanation, using two RiskBinomial(1, 0.5) as illustration.
Two of these distributions correlated at 0.5 give (0,0) 37.5% of the time, (0,1) and (1,0) each 12.5% of the time, and (1,1) 37.5% of the time. That is the same as saying that the data pairs (0,0), (0,0), (0,0), (0,1), (1,0), (1,1), (1,1), (1,1) occur with equal frequency. If you put these eight data pairs into Excel, the CORREL( ) function does indeed return 0.5.
So why doesn't @RISK produce those data pairs with about those frequencies? This has to do with how @RISK generates random numbers for correlated distributions.
In order to generate correlated samples for any distributions, @RISK first generates 100 (or however many iterations are desired) pairs of random decimals between 0 and 1 that have the specified correlation coefficient. Call these numbers the U01 numbers. The U01 numbers are then plugged into the distribution's inverse cumulative distribution, which converts the U01 number into a sample over the range of the distribution. In the specific case of a RiskBinomial(1,0.5), any of the U01 numbers below 0.5 map to a 0, and any above 0.5 map to a 1. That all works as designed.
Note, however, that in mapping all those U01 numbers in that way we lose a lot of information. For example, 0.1 maps to a value of 0 the same as 0.49 does, and 0.51 and 0.99 both map to a value of 1. At this point, a lot of the correlation information is lost, because the 0.1 U01 number from the first distribution is more likely paired with a U01 number from the second distribution close to 0.1 than close to 0.49, but that information is lost, since they are both samples of 0.
Another way of looking at it is that at the end, when we have 100 samples from each distribution that are all either 0 or 1, there are many ways to assign ranks to those samples to calculate the Spearman rankorder correlation coefficient. Assigning them all the midrank (25.5 & 75.5) is just one way to do it. (For more on this, see How @RISK Computes RankOrder Correlation.)
If we could assign the 0 sample that came from a lower U01 to a lower rank, and a 0 sample that came from a higher U01 to a higher rank, we'd get an observed correlation coefficient closer to what was asked for. But after the simulation, a 0 is a 0 and a 1 is a 1, and the information about where they came from is not available to @RISK's RiskCorrel( ) function or Excel's CORREL( ) function.
See also: How @RISK Correlates Inputs.
Additional keywords: Binomial distribution, Bernoulli distribution
Last edited: 20130411
Applies to:
@RISK 5.x–7.x
The help file says that RiskCompound or RiskMakeInput can't be correlated, but I really need to use correlation in my model. Is there any workaround available?
You can come close, and the process is the same for RiskMakeInput or RiskCompound. In brief: (1) Simulate your RiskCompound or RiskMakeInput to find its percentiles. (2) Turn that set of percentiles into a new RiskCumul distribution. (3) Replace the RiskCompound or RiskMakeInput with the new RiskCumul, which you can correlate.
This technique is workable if the parameters of the RiskMakeInput or RiskCompound don't change from one simulation to another. If they do, this technique isn't practical. (You could, however, use the @RISK XDK to automate the process, in a beforesimulation macro.)
Here are details of the procedure. (Please open the attached workbook and run a simulation.)
Step 1. Get a lot of percentiles.
RiskCumul needs the minimum, the maximum, and some percentiles. The attached workbook is already set up to find every halfpercentile in cells G8:H208.
At the end of this preliminary simulation, the RiskCumul functions no longer show #VALUE, because the percentiles of the RiskMakeInput and RiskCompound are now available. But you can't graph the RiskCumul functions at this stage, because the percentiles weren't available during the preliminary simulation.
Step 2. Turn the percentiles into a RiskCumul.
After a simulation, all the percentiles are formulas. But you want to use them as values, without depending on the original RiskMakeInput or RiskCompound.
Highlight the percentiles array with your mouse. Press Ctrl+C for copy, then Alt+E, S, V, Enter for Paste Special: Values. The RiskCumul distribution is now independent of the original RiskCompound or RiskMakeInput.
Step 3. Replace RiskMakeInput or RiskCompound in your model with the new RiskCumul.
To do this, click the cell containing the RiskCumul, highlight the formula in the formula bar with your mouse, and press Ctrl+C then Esc. Click the cell that you want to replace, and press Ctrl+V then Enter. This copies the formula without changing the receiving cell's formats.
You can now correlate the RiskCumul in the usual way.
See also:
Last edited: 20180703
Applies to: @RISK 5.x–7.x
I have a risk register with columns for cost and schedule risk, and I'm using formulas like these:
=RiskCompound(RiskBinomial(1,D5), RiskTriang(F5,G5,H5), RiskName("Cost"))
=RiskCompound(RiskBinomial(1,D5), RiskTriang(I5,J5,K5), RiskName("Duration"))
The RiskBinomial with n = 1 indicates that the risk will or will not happen, with the probability given in cell D5. But here's my problem. In some iterations, the cost risk is zero but the duration risk is nonzero, or vice versa. Logically I want them to be zero or nonzero together.
The RiskCompound( ) function itself can't be correlated, because @RISK has no way to know in advance how many times it will need to draw values from the severity distribution during the simulation. However, you can correlate elements of the RiskCompound, as follows:
Correlate the frequency distributions, or even use the same frequency distribution for both RiskCompound functions. Both methods are illustrated in the attached workbook, Correlating RiskCompound.xlsx. Using the same frequency distribution in both RiskCompound( ) functions is simpler, and it guarantees that you'll never have a zero for one risk while the other is nonzero.
Unpack the severity distribution, so that you have multiple copies of a distribution and use Excel's SUM( ) function to add them up. This replaces RiskCompound with a frequency distribution and multiple copies of the severity distribution. Please see the attached workbook Unpacking RiskCompound.xlsx. For an alternative method, correlating a RiskCompound by converting it to a RiskCuml, see Correlating RiskMakeInput or RiskCompound, Approximately.
By the way, @RISK 6.0 and later offer a Bernoulli distribution for events that may or may not happen. In those releases of @RISK, you could replace RiskBinomial(1,D5) with RiskBernoulli(D5).
For more about RiskCompound( ), see All Articles about RiskCompound.
Additional keywords: Compound distribution
Last edited: 20180628
Applies to:
@RISK, all releases
How do I correlate the results of a calculation?
There is no way to do that in a simulation. Only @RISK distributions can be correlated.
Results of calculations, whether they are @RISK outputs or not, cannot be correlated. You can use a RiskCorrel function to compute the correlation coefficient that actually occurred in the simulation, but there's no way to impose a desired correlation on them.
See also: How @RISK Correlates Inputs
Last edited: 20180629
Applies to: @RISK 4.x–7.x
I'm using Excel 2003, and I have a correlation matrix whose size exceeds the 256column limit in Excel. How can I use a correlation matrix of this magnitude with @RISK?
Rebuilding the structure of the matrix lets you use a correlation matrix of this size with @RISK. Below is a description of how to rebuild the matrix. Also, attached are two examples that illustrate the transformation and referencing of the rebuilt matrix.
Note: @RISK 4.5.7 and earlier won't be able to run a simulation on the example models, because the matrices don't exceed the column limit in Excel. If you try a simulation, these older versions of @RISK will display the error message, "The correlation matrix [matrix reference] is not square." (See this article if you have a Excel 5.0 or newer.) When you have a matrix that does exceed the column limit, you won't get this error message. The attached examples are for illustrative purposes only, as regarding those older versions.
To rebuild the matrix, take the following steps:
Break your original matrix up into smaller blocks, moving from left to right. The number of columns in the blocks should be less than Excel's column limit, and each block should have the same number of rows as the original matrix. Make as many as the blocks the same size as possible.
For example, if you have a 400 x 400 correlation matrix, you could break it up into two blocks, each with 400 rows and 200 columns. A 789 x 789 correlation matrix could be broken up into three blocks with 789 rows and 250 columns each, and one block with 789 rows and 39 columns.
Stack the blocks vertically to create a new matrix.
Move from left to right, placing each block under the one before it. Place the second block under the first block, place the third block under the second block, and so on. See Example 1 in attached file.
The last block may have fewer columns than the others. That last and smallest block should always be placed at the very bottom of the stack. See Example 2 in attached file.)
Define a range name for the rectangle that contains the rebuilt matrix. The matrix cell range reference must be rectangular; it can't have an irregular shape. If you end up with one section of the matrix that has fewer columns than the rest, make the matrix cell range reference rectangular by including empty cells in the reference. See Example 2 in attached file.
For example, that 789 × 789 correlation matrix is rebuilt as three blocks 789×250 and one block 789×39, so you define your range name for the resulting rectangle of 3156 rows and 250 columns.
Add the RiskCorrmat function to your inputs. In your Excel workbook, add the RiskCorrmat function directly to each cell containing the input functions that you wish to correlate. The syntax for the RiskCorrmat function is:
RiskCorrmat (matrix cell range, position, instance)
I'm running Excel 2007 or later, which allows a million rows, so I don't need this technique for new models. But I've still got some older models that used this technique. Do newer versions of @RISK still support it?
Yes, this technique works in any type of Excel workbook — XLS, XLX, XLSM, etc. — in any supported Excel, for any @RISK release 4.x–7.x. (Although Excel 2003 is not supported by @RISK 7.x, files created by Excel 2003 are supported by @RISK 7.x in later versions of Excel.)
Additional keywords: Corrmat property function
Last edited: 20180308
Applies to: @RISK 4.x–7.x
How does @RISK respond if the correlation matrix contains cell references or formulas whose values change in the middle of a simulation?
@RISK will apply the new coefficients from that point forward in the simulation.
Last edited: 20150624
Question:
Is it possible to induce correlations between @RISK distribution functions in such a way that the coefficient of correlation depends on the results in other cells? That is, the level of correlation between variables would depend on the risk outcome in other variables.
Response:
Conditional correlations can be created by first modeling all possible cases of correlation and then using logic to control which of the correlated variables are passed into the model. Please see the attached example.
This example has three risk variables A, B, and C. The error terms for these three variables are correlated. However, the correlation between A, B, and C within a given period (t) will depend on the outcome for variable A in period (t1).
last edited: 20120629
I specified a correlation coefficient, but when I apply Excel's CORREL( ) function to the simulation data a different correlation is reported. Why?
Briefly, in the correlation matrix in @RISK you supply rankorder correlation coefficients (Spearman), but Excel calculates productmoment correlation coefficients (Pearson). In @RISK 5.5.0 and later, you can use the RiskCorrel( ) function to show the Spearman coefficient after a simulation, and it should be close to what you specified.
For full details, please see How @RISK Correlates Inputs, particularly the last few paragraphs. That page contains a downloadable example to illustrate the issues.
Last edited: 20150623
Applies to: @RISK 5.5.0 and later
The RiskCorrel( ) function can return the Pearson productmoment or Spearman rankorder correlation coefficient. How is the rankorder coefficient computed?
@RISK uses the method in Numerical Recipes by Press, Flannery, Teulosky, and Vetterling (Cambridge University Press; 1986), pages 488 and following.
Each number in each of the simulated distributions is replaced with its rank within that distribution, as an integer from 1 to N (number of iterations). If the values in a distribution are all different, as they usually are with continuous distributions, then the rank numbers will all be distinct. If there are duplicate numbers within the distribution, as often happens with discrete distributions, then "it is conventional to assign to all these 'ties' the mean of the ranks that they would have had if their values had been slightly different. This [is called the] midrank" (quoting from the reference book above).
Once the ranks are obtained, the rankorder coefficient is simply the Pearson linear correlation coefficient of the ranks.
The above explains how @RISK computes rankorder correlation after a simulation is complete. @RISK also uses rankorder correlation within a simulation, when drawing numbers for correlated distributions. This page gives details: How @RISK Correlates Inputs.
Last edited: 20150623
Disponible en español: Crear una matriz de correlación a partir de datos históricos
Overview:
With @RISK, you can use correlation coefficients reported from historical data to simulate distribution functions created from the data. This is an effective way to use past observations to predict future behavior.
For example, you may have data from several years representing mortgage interest rates, mortgages sold, housing starts, and inventory of existing homes for sale. Each of these variables bears a historical relationship to the others. For example, the data may show that a rise in inventory of existing homes on the market is typically accompanied by a decrease in housing construction starts. Mortgage interest rates may exhibit a similar inverse relationship to both housing starts and mortgages sold. This web of historical relationships can be captured in correlation coefficients identified with an Excel correlation matrix. Coefficients from the Excel matrix can then be copy/pasted into an @RISK correlation matrix to control sampling of distributions that represent these variables.
To identify the correlation coefficients of your data:
last edited: 20120808
Applies to: @RISK 5.5 and newer
I'm using RiskIndepC and RiskDepC functions to correlate my inputs, but the manual says that's the old way, and I should use RiskCorrmat. Does it really matter?
If you have only one RiskDepC for each RiskIndepC, it really doesn't matter. @RISK creates a 2 × 2 matrix for each DepC/IndepC pair.
But multiple RiskDepC functions associated with any particular RiskIndepC can cause problems. To understand the issue, you need to know that @RISK creates a separate correlation matrix for each RiskIndepC function, using the RiskDepC functions associated with that RiskIndepC. The top row of the matrix is assigned to the variable designated with RiskIndepC, and the other rows to the RiskDepC variables with the same string identifier. The correlations you specify go in the first column of that matrix. The other columns of the matrix represent correlations among the RiskDepC variables, and since the DepC/IndepC scheme gives no way to assign those correlations, @RISK uses zeroes. (See Correlation Matrix Equivalent to RiskIndepC and RiskDepC in the attached workbook.)
Now, why is this bad? First, you may unwittingly create a matrix that is not selfconsistent. For example, if you have two RiskDepC functions specifying correlations of 0.9 and 0.5 with your RiskIndepC, it's not mathematically possible for those two RiskDepC variables to be correlated to each other with a coefficient of 0.0, yet that's what @RISK uses, so you get the message that the matrix is not selfconsistent. If you let the simulation proceed, @RISK will adjust the matrix to be selfconsistent, changing not only the zeroes but the correlations you specified, and the simulated correlations may be very different from what you specified. (See Simulated Correlations if You Click OK in the attached workbook.)
Even if your matrix is selfconsistent, for example two RiskDepC functions specifying 0.8 and 0.5, while it's mathematically possible for those two dependent variables to have a correlation coefficient of zero with each other, it's not very likely. Thus, your model may not be representing the realworld situation as accurately as possible.
What can I do to prevent these problems?
Switch to RiskCorrmat. Starting with @RISK 5.5, you can specify an adjustment weights matrix to tell @RISK to come up with a selfconsistent matrix that preserves your desired correlations as far as possible, while assigning valid values to the correlations between the RiskDepC variables. The attached workbook gives an example of how to make the conversion:
The end result is that the simulated correlations will match the ones you originally assigned in RiskDepC, as closely as mathematically possible.
If you wish, you can highlight the adjusted matrix and select first Copy, then Paste Special Values to replace the formulas with numbers. Then the original matrix and the adjustment weights matrix can be deleted.
Last edited: 20170808
Please read the full article in the "Simulation Results" chapter.
Applies to: @RISK 6.x/7.x, Industrial Edition
How does time series correlation work? Is it different from correlating regular distributions?
Short answer: You can correlate between different time series, but that correlation may not be visible in the displayed numbers.
Let's clarify the time series process, to help in understanding correlation of time series. You create a time series by fitting realworld data. However, the fitting process usually involves transforms, such as differencing or taking the logarithm. @RISK actually fits the transformed data, not your realworld data. The time series is a series of transformed data, not realworld data. After fitting a series, @RISK projects the series forward into the future. Each time period's prediction has two components: a formula that uses transformed data from one or more previous time periods, plus a randomly generated noise term or error value. Remember, all of the predictions are done with the underlying time series values, not with realworld data. After computing the formula and noise term for a time period, @RISK reverses the transforms that were used in the fit, and the result is the displayed numbers that you see in your Excel worksheet. The displayed numbers differ from the underlying time series values when there are transforms in that particular time series.
You can correlate two or more time series functions using the @RISK Define Correlations window, or manually using RiskCorrmat( ) property functions, just as you would correlate regular @RISK distribution functions. However, correlation between time series is fundamentally different from the correlation of standard distributions. In correlating regular distributions, all the values for all iterations form one array per distribution, and the correlation is applied to those two arrays. For regular distributions, correlation is an attribute of the whole simulation, not of any particular iteration. By contrast, when two time series functions are correlated, the correlation is reapplied, from scratch, in each iteration. The two arrays that get correlated are the noise terms within the projected time periods of the two time series for that particular iteration. Again, this happens within each iteration, without reference to any other iteration.
This explains why the displayed values won't match your correlation coefficients. The displayed values aren't correlated; only the noise term parts of each underlying time series value are correlated. The formula parts can't be correlated because they are generated by the time series function, so the underlying time series values as a whole are not correlated. What you see is the realworld data, computed by reversing the transforms of that particular time series. But even if there are no transforms, so that the displayed numbers equal the underlying time series values, still the correlated noise term is just part of each displayed number. Correlations are honored but are effectively buried, so you never see the numbers that are actually being correlated.
Can I correlate the successive periods of a given time series?
There is no way to correlate the noise terms between time periods of a given time series. Time series correlation applies only between one time series and another.
And when the time series were produced by batch fit?
When you generate sets of correlated time series using the time series batch fit command, it constructs a correlation matrix as part of its output. (See Correlated Time Series in Batch Fit.) The generated coefficients apply to the historical data that you supplied. You're free to alter the correlation coefficients, or add or remove time series in the matrix.
Forward projections use the coefficients in that matrix just like any other correlations for time series. These correlations are applied in the same way as described above: the noise terms of the underlying time series values can be correlated, but those noise terms are not displayed separately.
Can I define a copula for two or more time series?
Copulas cannot be defined for Time Series array functions, only for regular @RISK input distributions.
Last edited: 20160919
Applies to: @RISK 6.x/7.x
Can you tell me more about the correlation matrix shown in the fit summary after a time series batch fit? The coefficients in that matrix don't seem to match the results of Excel's CORREL( ) function; where do the numbers come from? How are they used?
The correlation matrix in the fit summary is the Spearman(*) correlations of the transformed historical data. Those transformed data are not available as numbers. However, you can see the graph of the transformed data by doing a single fit rather than a batch fit, and using the same transformations.
(*)The correlation matrix was Pearson in @RISK 6.0, but was changed to Spearman (rank order) in 6.1. When distributions with very different shapes are correlated, results with Pearson can be unsatisfactory. The change to the distributionfree Spearman rank order correlation was made for this reason, and to be consistent with how other correlations work in @RISK.
That correlation matrix in turn is used to correlate the projected distributions of the time series in each time period by the rank order method. The correlation is not applied to the numbers that you can see in a worksheet; it is the "raw" time series functions that are correlated.
Conceptual summary of a batch fit:
@RISK applies transforms to the historical data and then fits the transformed data. The transforms can be user selected, or if you click Auto Detect then @RISK will determine the transforms to apply.
@RISK computes the actual Spearman correlations of the transformed historical data. This is the matrix shown in the fit summary.
For projections, @RISK applies the projection functions shown in the worksheet cells. This is conceptually a twostage process: first "raw" numbers are developed, projecting from the transformed historical data according to the fit. Then the "raw" numbers are detransformed by reversing the transforms that were applied to the historical data, and the detransformed projections become the final output of the functions that you see in the worksheet cells..
The correlation matrix is applied to the "raw" numbers, not to the final detransformed projections that appear in the worksheet.
Last edited: 20150623
Applies to: @RISK 7.x
I need something more general than rankorder correlation. Does @RISK support copulas?
Yes, beginning with release 7.0.0, @RISK supports copulas. See "Define Copula Command" in the @RISK user manual or help file.
If you have an earlier version and would like to use copulas, please see Upgrading Palisade Software.
Last edited: 20150813
Applies to: @RISK for Excel 4.5–7.x
I know that @RISK lets me set criteria for convergence monitoring, but how does it actually do the calculations?
Answer for @RISK 5.x–7.x:
Convergence monitoring means that @RISK keeps simulating until it has stable results for the outputs. To have @RISK monitor convergence, set the number of iterations to Auto, and then go to the Convergence tab of Simulation Settings.
Convergence can be done on any combination of the mean, standard deviation, and a specified percentile for any or all outputs. You specify a convergence tolerance such as 3%, and a confidence level such as 95%. The simulation stops when there is a 95% chance that the mean of the tested output is within 3% of its true value. Analogous calculations are done if you monitor standard deviation or a percentile.
If you specify "Perform Tests on Simulated" for two or three items, @RISK considers convergence to have occurred only if all the selected measures meet the convergence test.
The setting "Calculate every ___ iterations" says how often in a simulation @RISK pauses to check whether convergence has occurred, but it has no effect on the stringency of the test. It's simply a tradeoff for efficiency: if you check convergence more often, you may converge in fewer iterations but in more time because convergence testing itself imposes some overhead. If you test convergence less often, it may take more iterations but less time for a similar reason.
With convergence testing selected, the Results Summary window will open automatically in a simulation to show progress toward convergence. The status column of that window shows OK for outputs that have converged. But, typically, some outputs converge faster than others. If a given output has not converged, a number from 1 to 99 is shown in the status column. That is @RISK's estimated percentage of the number of iterations done so far over the number that would be needed for this output to converge. Example: if the number is 23, and you've done 10,000 iterations, then @RISK estimates that a total of about 10,000/23% = 43,500 iterations would be required for convergence.
See also:
Answer for @RISK 4.5:
Every N iterations (for example every 100 iterations, where N is user selectable), @RISK calculates these three statistics:
If all three of these statistics are less than or equal to the userspecified threshold, @RISK marks the simulation as converged for this test. If the simulation is marked as converged for 2 tests in a row @RISK considers it converged, and stops.
Last edited: 20170630
Applies to: @RISK 6.1.1 and newer
I have set up convergence, with iterations set to Auto, but @RISK stops at 50,000 iterations although not all of my outputs have converged.
@RISK 8.x
The application comes with an interface where the user can choose the maximum number of iterations for Auto Stop. This option is enabled when the user selects the "Auto" setting in the number of iterations field. When the Simulation Settings User Interface is open, a new field labeled "Maximum of" will let the user define the maximum number of iterations.
Details can be found in the Online Help
@RISK 6.1.1 and 7.x
By default, @RISK stops at 50,000 iterations rather than keep iterating indefinitely. However, it is true that some models will eventually converge, but at some point after 50,000 iterations. You could set a higher number of iterations explicitly instead of Auto, but then you lose convergence monitoring.
Beginning with @RISK 6.1.1, you can change that 50,000iteration limit for convergence monitoring. Create a workbooklevel name RiskMaxItersForAutoStop with a value such as =100000. (The leading = sign is required.) With iterations set to Auto, @RISK will stop when outputs converge, or when the RiskMaxItersForAutoStop number of iterations is reached, whichever happens first.
To create a workbooklevel name in Excel 2007, Excel 2010, and Excel 2013, click Formulas » Name Manager » New. Enter the name RiskMaxItersForAutoStop. In the Refersto box, enter your desired maximum number of iterations for convergence monitoring, preceded by the = sign. Click OK and then Close.
To create a workbooklevel name in Excel 2003, click Insert » Name » Define. In the box at the top, enter the name RiskMaxItersForAutoStop. In the Refersto box, enter your desired maximum number of iterations for convergence monitoring, preceded by the = sign. Click Add and then OK.
During simulation, the progress window at the lower left of your screen shows a percent complete. If iterations is Auto, @RISK doesn't know how many iterations will be needed until convergence has occurred, so it computes the percent complete on a basis of 100% = 50,000 iterations. If you have set RiskMaxItersForAutoStop to a larger number, and more than 50,000 iterations are needed, the percent complete will go above 100%.
Last edited: 20200601
Why do different percentiles take different numbers of iterations to converge? And why do percentiles sometimes converge more quickly than the mean, even though the mean should be more stable?
There can definitely be some surprises when you use percentiles as your criterion for convergence, and you can also get very different behavior from different distributions.
First, an explanation of how @RISK tests for convergence. In Simulation Settings, on the Convergence tab, you can specify a convergence tolerance and a confidence level or use the default settings of 3% tolerance and 95% confidence. Setting 3% tolerance at 95% confidence means that @RISK keeps iterating until there is better than a 95% probability that true percentile of the distribution is within ±3% of the corresponding percentile of the simulation data accumulated so far. (See also: Convergence Monitoring in @RISK.)
Example: You're testing convergence on P99 (the 99th percentile). N iterations into the simulation, the 99th percentile of those N iterations is 3872, A 3% tolerance is 3% of 3872 = about 116. @RISK computes the chance that the true P99 of the population is within 3872±116. If that chance is better than 95%, @RISK considers that P99 has converged. If that chance is less than 95%, @RISK uses the sample P99 (from the N iterations so far) to estimate how many iterations will be needed to get that chance above 95%. In the Status column of the Results Summary window, @RISK displays the percentage of the necessary iterations that @RISK has performed so far.
Technical details: @RISK computes the probabilities by using the theory in DistributionFree Confidence Intervals for Percentiles (accessed 20200728). The article gives an exact computation using the binomial distribution and an approximate calculation using the normal distribution; @RISK uses the binomial calculation.
Now, an explanation of anomalies, including those mentioned above.
P1 (first percentile) takes many more iterations to converge than P99, or vice versa.
At first thought, you might expect P1 and P99 to converge with the same number of iterations, P5 and P95 with the same, P10 and P90 with the same, and so on. But it usually does not work out that way. Let's take just the first and 99th percentiles as an example.
The tolerance for declaring convergence complete is expressed as a percentage of the target. If the values are all positive, then the first percentile is a smaller number than the 99th percentile, and therefore the tolerance for P1 is a smaller number than the same percentage tolerance for P99. The difference is greater if the distribution has a wide range, or if the low end of the distribution is at or near zero.
For an extreme example, consider a uniform continuous distribution from 0 to 100. P1 is around zero, and P99 is around 100, so a 3% tolerance for P1 is quite small and will take about 406,000 iterations to achieve. By contrast, a 3% tolerance for P99 is relatively much larger and is achieved in only 30 iterations.
On the other hand, if the values are all negative then P99 will have a smaller magnitude than P1, and will therefore converge more slowly.
Convergence happens too quickly and is very poor.
This occurs when the distribution has a narrow range, so that there is little difference between one percentile and another.
Consider the uniform continuous distribution from 10000 to 10100. Every percentile is in the neighborhood of 10,050, so a 3% tolerance is about 10,050±302 = 9,748 to 10,352. That range is actually larger than the data range. Therefore, the very first sample value for every percentile will be within that range, so convergence of any percentile happens on the first iteration, but that "convergence" is meaningless.
P50 takes more iterations to converge than P1 or P99, and also more than the mean.
This is expected for many distributions. The percentile convergence is based on a binomial distribution, with p = the percentile being tested. The binomial distribution is fairly broad for p = 50%, and so the margins of error are greater and convergence takes more iterations. But as p gets closer to 0 or to 100%, the distribution gets more narrow, margins of error get smaller, and convergence happens in fewer iterations.
As for convergence of a mean versus convergence of the 50th percentile, percentiles use the binomial distribution, but the confidence interval for the mean uses Student's t. Margins of error are usually narrower for Student's t than for the binomial, so convergence of the mean happens faster than convergence of the 50th percentile, even for a symmetric distribution.
Advice: In @RISK's simulation settings you have to set convergence tolerance as a percentage of the tested statistic (mean, standard deviation, or percentile), but the appropriate percentage is not always obvious. To help you make the decision, run a simulation with a few iterations, say 100, just to get a sense of what the output distribution looks like. Then, if you expect the percentile value to be close to zero, specify a higher tolerance or choose a different statistic. Also check your tolerance against the expected range of the output, and if necessary specify a smaller tolerance.
Last edited: 20200728
Applies to:
@RISK, all releases
@RISKOptimizer, all releases
@RISK Developer's Kit (RDK), all releases
In Simulation Settings » When a Simulation is Not Running, Distributions Return, I selected Expected Value or True EV. When a simulation is not running, the expected values of my inputs and outputs are visible in my model. I run a simulation, and the simulated means for my inputs closely match the expected values, but the simulated means of my outputs are very different from the expected values. What is wrong?
This is normal behavior.
When a simulation is not running, both inputs and outputs display their static values. For inputs, the static values are the means (unless you changed that — see Setting the "Return Value" of a Distribution). For outputs, the static values are not the means, but are values calculated from the displayed values of the inputs. In general, the mean of a calculated result does not equal the value you would calculate from the mean inputs, and the same is true for percentiles and mode.
If you want to display the means of outputs in your worksheet, use the RiskMean function. For percentiles, including the median, the 50th percentile, use RiskPtoX. Please see Placing Simulation Statistics in a Worksheet. For an example, please download the attached workbook.
In the example, column C is the inputs, and column D is the outputs created from them. For this example the computation is just a square or reciprocal, but the same principle holds for the calculations in your model. Column E is the simulated mean of each output. As expected, the simulated means are quite different from the static values displayed in column D. The principle here is "the mean of the squares is different from the square of the mean." But the simulated means are quite close to the theoretical means I calculated for those outputs in column F.
Row 4 is a standard normal distribution (mean=0) and its square (mean=1, not 0). Row 5 is a discrete uniform with two values 1 and 9 (mean=5) and its reciprocal (mean=5/9, not 1/5). Row 6 is a continuous uniform (mean=1/2) with its square (mean=1/3, not 1/4).
If you run a simulation, you can see easily that the distributions of the outputs have different shapes from the distributions of the inputs. This will always be true, to a greater or lesser extent, for a nonlinear model. Since the vast majority of models are nonlinear, you should expect to see the mean values of outputs be different from the static values computed from the mean inputs.
See also:
Last edited: 20170907
Applies to:
@RISK, all releases
RISKOptimizer, all releases
@RISK Developer's Kit (RDK), all releases
Why is the expected value displayed in the spreadsheet cell that contains an @RISK input function different from the mean of the simulation results for that input?
The simulated mean of a distribution will typically be close to the theoretical mean, but not exactly the same. This is normal statistical behavior. And it's not just the mean, but the standard deviation, median, mode, percentiles, and all other statistics.
To illustrate, set up a simulation in the following way:
Start with a blank workbook.
In cell A1, define an @RISK input as a normal distribution with mean of 10 and standard deviation of 1.
Click the Simulation Settings icon from the @RISK toolbar. On the Iterations tab, set the number of iterations to 10,000. On the Sampling tab, select Latin Hypercube for the sampling type and a fixed random generator seed of 1.
Statistical theory tells us that the expected distribution for the mean of the input is a normal distribution with a mean of 10 and a standard deviation (often called the standard error) of 1/√10000 = 0.01. Although the exact results will vary by version of @RISK, you should find that the mean of the simulated input is well within the interval 9.99 to 10.01, which is within one standard error of the theoretical mean. (The default Latin Hypercube sampling type does considerably better than classic Monte Carlo sampling.)
But the displayed value is not even close to the simulated mean of the input. How can that be?
Most likely this is a setting in your model. In the Simulation Settings dialog, look at When a Simulation is Not Running and verify that it is set to Static Values. Set Where RiskStatic is Not Defined, Use to True Expected Values.
As the dialog box implies, a RiskStatic property function in any distribution will make that distribution display the RiskStatic value instead of the statistic you select in Static Values.
Is there any way to get the exact mean of the distribution in my worksheet?
We'd say "theoretical mean" rather than exact mean, and that's the key to the answer. Where RiskMean returns the mean of the last simulation that was run, RiskTheoMean returns the mean of the theoretical distribution. There's also RiskTheoStdDev, RiskTheoPercentile, and so forth. In @RISK, click Insert Function » Statistic Functions » Theoretical to see all of them.
See also:
Last edited: 20171003
Applies to:
@RISK For Excel 4.x–7.x
RISKOptimizer 1.0, 5.x
Is there a way to have result statistics from an @RISK simulation placed in a specific location of a spreadsheet automatically at the end of a simulation?
Statistics for any cell—including inputs (@RISK distributions), @RISK outputs, and plain Excel formulas—can be reported directly in the spreadsheet at the end of simulation by using the statistic functions provided with @RISK. A full list of the statistic functions is available in the @RISK menu: Insert Function » Statistic Functions » Simulation Result.
As an example, the formula =RiskMean(A1)
will return the simulated mean of cell A1 across all iterations in the simulation. For an @RISK output or an Excel formula, that's the only option. For an @RISK input distribution, you have a choice: =RiskMean(A1)
to return the mean of random values drawn for that particular simulation, or =RiskTheoMean(A1)
to return the theoretical mean of the distribution. RiskMean values will vary slightly from one simulation to the next, and are not available till you have run a simulation; RiskTheoMean is based on the theoretical distribution and will always return the same result, even if you have not run a simulation. See Statistics for an Input Distribution.
In @RISK 5.5 and later, by default the statistic functions are not calculated until after the last iteration of a simulation, though you can change this in Simulation Settings. In @RISK 5.0 and earlier, the statistic functions all calculate in "real time", meaning that @RISK recalculates the statistic at each iteration based on the number of samples that have been drawn. For more about the timing of calculating the statistic functions, please see "No values to graph" Message / All Errors in Simulation Data.
See also:
Additional keywords: Mean, simulated mean, percentile, simulated percentile, statistics functions
Last edited: 20170630
Applies to: @RISK 5.x–7.x
Many of my @RISK outputs are in output ranges, where a group of related outputs share a name. The formulas look like this:
=RiskOutput(,"Profit by Month",1)
+ formula
=RiskOutput(,"Profit by Month",2)
+ formula
=RiskOutput(,"Profit by Month",3)
+ formula
and so on. How can I address these outputs by name in a statistic function like RiskMean( ) or RiskPercentile( )?
Outputs and inputs referenced by name in statistic functions must have unique names, according to the @RISK manual. When the same name is used for multiple outputs, including a range of outputs, statistic functions need to reference them by cell reference rather than by name. Example: =RiskMean(A15)
.
Last edited: 20150626
Applies to: @RISK 5.x–8.x
I've run a simulation, but it was with the random number seed set to "Choose Randomly". How can I find out what seed @RISK actually used, so that I can reproduce the simulation later?
If Quick Reports were run automatically at the end of the simulation, look at the Simulation Summary Information block on any of them. The Random Seed item gives you the random number seed that was actually used. If you haven't run Quick Reports, see Get a Quick Report for Just One Output, unless of course you want Quick Reports for all outputs.
In Version 8, the Quick Report is not available. The RiskSimulationInfo function can be used to determine the seed number instead. You can find more about that function here: https://help.palisade.com/v8_1/en/@RISK/Function/6Miscellaneous/RiskSimulationInfo.htm
If you don't have any outputs, you can use a snippet of Visual Basic code without being a programmer:
Press AltF11 to open the Visual Basic Editor, then F7 to open the code window.
Paste this VBA code into the window:
Sub StoreSeed() Risk.Simulation.Settings.RandomSeed = _ Risk.Simulation.Results.RandomNumberSeed End Sub
Please see Setting References in Visual Basic for the necessary references and how to set them.
Click somewhere in the middle of the StoreSeed routine, and press F5 to run the code. This will change @RISK's Simulation Settings, on the Sampling tab, to a fixed random seed. and it will insert the actual seed from the latest simulation as the seed for future simulations.
If you leave the code in place, Excel 2007 or above will no longer store the workbook as an .XLSX but instead will use .XLSM format. This may present you or anyone who opens your workbook with a macro security prompt. To prevent that, you can delete the pasted code before you save the workbook. The fixed random seed will remain in Simulation Settings.
Save the workbook to save the fixed random seed.
See also: Random Number Generation, Seed Values, and Reproducibility
Last edited: 20201203
Applies to: @RISK, all versions
I'm displaying the mode of my data, and it seems to be very far from the tallest bar in the histogram. What is wrong? How does @RISK compute the mode of a continuous distribution?
The traditional definition of the mode of discrete data is the most frequently occurring value of the variable. An analogous definition works well for most theoretical continuous distributions: you have a smooth probability density curve pdf(x), and the mode is simply the value of x where the pdf(x) is highest. But for continuous data in simulation results, it's unusual to have identical data points, and therefore a new definition is needed.
Different authorities use different definitions and therefore find different modes; the way you bin the data can also change which value you call the mode. One way to come up with a mode is to divide the n simulated data points into k bins, each with n/k consecutive data points, and then look at the widths of the bins. The narrowest bin is the one where the points are clustered closest together, which means that the probability density is greatest in that bin, so the mode must be there.
@RISK uses that method. It divides the simulated data into k = 100 bins unless there are fewer than 300 data points in the simulation; in that case @RISK uses k = n/3 bins, so that a bin never has fewer than three points. @RISK then finds the narrowest bin, where the points are most closely clustered together. Finally, it computes the mean value of the n/k points in that bin, and reports that value as the mode. (This information is current as of 20150501, but may change in a future release of @RISK.)
The binning for purposes of finding the mode is almost always different from the binning for a histogram of the data in Browse Results or other graphs. Even if you specify a histogram of 100 bins, they will still be different from the histogram bins. When @RISK is finding a mode, the bins all contain the same number of points and have different widths. On the histogram, the bins (bars) all have the same width and contain different numbers of points. This is how the mode can be far from the tallest bar in the histogram.
A simple example is attached. That example does show how changing the graph settings can reveal the mode, but that technique won't work on every distribution.
By the way, when you do distribution fitting, @RISK uses this same computation. That's how it gets the approximate mode of your sample data that it shows in the fit results window, for comparison with the fitted distribution. This computation is not used in any way in the process of fitting distributions to your data; it's purely for display of the comparison.
Last edited: 20150501
Applies to: @RISK 5.x–7.x
How can I use @RISK to calculate the conditional tail expectation (conditional value at risk, CVaR) of a simulated output?
Beginning with @RISK 5.5, you can compute statistics for part of a distribution by value or by percentile; @RISK 5.0 can compute statistics for a distribution delimited by value only. To compute your statistics, you insert the property function RiskTruncate( ) in an @RISK statistics function such as RiskMean( ).
For example, suppose you have a simulated output in cell C11, and you want the conditional value at risk for the lefthand 5% tail. That is equivalent to the mean value of just the lowest 5% of the distribution, and you compute it like this:
@RISK 5.5 and later: =RiskMean(C11, RiskTruncateP( , 0.05) )
@RISK 5.0: =RiskMean(C11, RiskTruncate( , RiskPtoX(C11,0.05) ) )
You can also compute expected value for the upper tail. For example, the upper 5% is above the 95th percentile, so you set the 95th percentile as a lower limit and compute the expected value of the 5% righthand tail like this:
@RISK 5.5 and later: =RiskMean(C11, RiskTruncateP(0.95, ) )
@RISK 5.0: =RiskMean(C11, RiskTruncate( RiskPtoX(C11,0.95), ) )
The value will be approximate if you're calculating conditional tail expectation on a theoretical distribution. See About accuracy of theoretical statistics in Statistics for Just Part of a Distribution.
In @RISK help or the manual, see the section "Calculating Statistics on a Subset of a Distribution".
Last edited: 20170901
Applies to: @RISK 5.x–7.x
From a simulated output or input, I'd like to find the probability of the result occurring in an interval, between a lower and an upper limit.
An easy way is to click the output, click Browse Results, and adjust the sliders to the limits you're interested in. The probability then shows in the horizontal bar between the two sliders.
I really wanted this as a worksheet function.
No problem! The probability of the interval is the cumulative probability of the upper limit, minus the cumulative probability of the lower limit. Assuming your output is in cell DF1, and the limits are 100 and 200, the formula is:
=RiskXtoP(DF1,200)RiskXtoP(DF1,100)
If the limits are in cells DL1 and DH1, then the formula is:
=RiskXtoP(DF1,DH1)RiskXtoP(DF1,DL1)
Last edited: 20160504
Applies to: @RISK for Excel 5.x–7.x
Can @RISK compute upper and lower semivariance, semideviation, and mean absolute deviation?
Yes, beginning with @RISK 7.5 you can use @RISK statistic functions to compute these quantities automatically. In all statistic functions, datasource can be the name of an input or output, in quotes, or a cell reference.
But I have an earlier version of @RISK, and I'm required to use this version. Is there a workaround?
In earlier versions, you can do it yourself with userdefined functions in VBA, or by manipulating the iteration data with RiskData( ) functions. The attached file illustrates both approaches, and shows that they have the same result. (To call on @RISK in userdefined functions in VBA, you need @RISK Industrial or Professional. @RISK Standard Edition does not support automating @RISK.)
Lower and upper semivariance are computed in a similar way to variance: take the sum of squares of differences from the mean, and divide by number of iterations minus 1. (The minus 1 is necessary to create an unbiased estimate of variance, because the simulation is a sample, not the whole population.) However, in computing lower semivariance, use 0 in place of squared deviations above the mean; and in computing upper semivariance, use 0 in place of squared deviations below the mean. Equations might make this clearer:
where n is the number of iterations, and IF(condition) has the value 1 if condition is true and 0 if it is false.
Notice that values on the "wrong" side of the mean are not simply omitted; rather, they are replaced by zeroes, so the denominator of the semivariance is the same as the denominator of the variance. Though some authors replace n with the number of values lower (higher) than the mean for lower (upper) semivariance, this article follows Estrada, Rohatgi, and others. Thus the sum of lower and upper semivariance is the variance.
Lower and upper semideviation are found by taking the square roots of lower and upper semivariance. The sum of lower and upper semideviations is of course different from the standard deviation of the full sample.
Lower and upper mean absolute deviation (MAD) are found by taking the sum of the absolute values of deviations from the mean, divided by the number of iterations. However, in computing lower MAD, use 0 in place of deviations above the mean; and in computing upper MAD, use 0 in place of deviations below the mean. Lower and upper mean absolute deviation are numerically equal for any simulated data set, and each is equal to half of the plain mean absolute deviation.
See also:
Additional keywords: Semivariance, Semideviation
Last edited: 20170630
Applies to:
@RISK for Excel, releases 5.x–7.x
I want to find the simulated correlation coefficient between two cells in my simulation. Is there any way to find this value?
In @RISK 5.5 and newer, the RiskCorrel( ) function can compute the correlation for you, either the Pearson correlation or the Spearman (rankorder) correlation. To find the simulated Pearson correlation, enter this function in a worksheet cell:
=RiskCorrel(
cell1, cell2, 1)
To find the simulated Spearman (rankorder) correlation, use:
=RiskCorrel(
cell1, cell2, 2)
The cell will show #VALUE initially, replaced with the coefficient when you run a simulation.
When you specify your desired correlation for two inputs, as opposed to computing the actual correlation in a simulation, @RISK applies Spearman correlation of those inputs. See Excel Reports a Correlation Different from What I Specified for more about this.
How was this done in older releases of @RISK?
These methods continue to work in newer releases of @RISK, though the RiskCorrel( ) function is simpler to use.
In @RISK 5.0, you can display the correlation coefficient fairly easily by making a scatter plot.
In the Results Summary window, select one of the outputs and click the icon for "Create Scatter Plot" at the bottom of the dialog box. Then drag the other output from the Results Summary window onto the scatter plot. You get a scatter plot, the mean and standard deviation of both outputs, and the Pearson correlation coefficient. (Y is the first output you selected, and X is the second output you selected.)
You can even drag additional outputs to the Scatter Plot window, and they will be plotted as additional X's against the same Y, with their correlation coefficients displayed
In @RISK 5.0, if you want the correlation coefficient to appear automatically in an Excel sheet after simulation, use the RiskData( ) function to insert data in a worksheet during simulation and use Excel's CORREL( ) function. Please see Placing Iteration Data in Worksheet with RiskData( ) and Sum of All Iteration Values for two examples using RiskData( ).
If you have a large number of iterations, RiskData( ) may slow down the simulation for some models. If this is an issue for your particular model, you can remove the RiskData( ) functions and use a macro to save the simulation data. Please see Exporting Information During Simulation for an example.
last edited: 20180829
Applies to:
@RISK Excel 3.5 through 7.x
@RISK for Project 3.x, 4.x
RISKOptimizer 1.x, 5.x
@RISK Developer's Kit (RDK) 4.x
RISKOptimizer Developer's Kit (RODK) 4.x
How does @RISK calculate cumulative percentiles for simulation data?
Depending on the nature of the simulation data, @RISK will use one of two methods for calculating cumulative percentiles.
When the simulation data appear to be discrete (samples are repeated in the data), every returned percentile is chosen from the simulation data. Specifically, the software computes k = the smallest whole number greater than or equal to (your percentile target) times (number of iterations), and then the answer is the kth smallest data value from the simulation. For a simplified example, suppose you request the 68th percentile from a simulation where there were ten iterations and the data points were {4, 7, 9, 13, 15, 19, 21, 25, 28, 30}. k = roundup(.68*10) = 7, so the 68th percentile is the 7thlowest number, which is 21.
When the simulation data appear to be continuous (none of the samples are repeated in the data), @RISK will use linear interpolation to calculate percentiles where necessary. For example, when the desired percentile does not correspond exactly with a value in the data @RISK will use linear interpolation between points in the data set to derive the percentile. See the attached spreadsheet demonstrating the linear interpolation.
Does @RISK's calculation correspond to the Excel function PERCENTILE.INC( ) or PERCENTILE.EXC( )?
You can specify any number from 0 to 1 inclusive as the second argument of RiskPtoX( ), and RiskTheoPtoX( ), so to that extent they are analogous to PERCENTILE.INC( ). However, it may be necessary to interpolate to find the value of a given percentile. Excel and @RISK may not necessarily return the same values, based on their different interpolation methods. (The literature showsn numerous methods of interpolation.) The larger the number of iterations, the smaller should be any difference between the two.
RiskPtoX(A1,0) and RiskPtoX(A1,0) equal the smallest and largest iteration values of cell A1 in the latest simulation. RiskTheoPtoX(A1,0) returns the theoretical minimum of the distribution in A1 if it has a lower bound, or #VALUE! if there's no lower bound. RiskTheoPtoX(A1,0) returns the theoretical maximum, or #VALUE! if the distribution has no upper bound.
Last edited: 20170927
Applies to: @RISK for Excel, all releases
I know how to find the value of a percentile, such as the 99th percentile. But how can I find which iteration produced the 99th percentile of a given input or output? I want to look at that whole scenario.
The easiest way is to open the Simulation Data window (xsubscripti icon in the Results section of the @RISK ribbon), highlight the column for that input or output, click the sort icon at the bottom of the window, and sort in descending order. Then count down the appropriate number of iterations and you have the one you need.
For example, if your simulation runs 1000 iterations, then your 99th percentile would be the 11th highest one, which is the highest of the bottom 990 iterations.
If this is a frequent need, you could automate the process with a RiskData( ) array function and a VBA macro. Please see Placing Iteration Data in Worksheet with RiskData( ).
Last edited: 20170927
Applies to:
@RISK for Excel 4.x–7.x
RISKOptimizer 1.x, 5.x
The manual and the help file say that I can get data from a range of iterations by entering RiskData( ) as an array formula. What does that mean, and can you give an example?
If you want data from all iterations of all inputs and outputs, you can use the Simulation data window (xsubscripti icon) or select the Simulation Data Excel report. If you want only selected variables or iterations, use the RiskData( ) worksheet function.
You cannot fill an array with RiskData( ) by typing the formula in one cell and dragging, the way you usually would. Instead, follow this procedure:
Select the row or column array where you want to place the input or output value for each iteration.
In the formula bar, type your formula, which involves RiskData( ). For instance, to capture the first 100 iterations of the input called The_Input, type
=RiskData("The_Input",1)
To capture iterations 151 through 250 of cell A4, type
=RiskData(A4,151)
An optional third argument to RiskData( )lets you specify the simulation number, if you're running RISKOptimizer or multiple simulations in @RISK.
Instead of Enter, press CtrlShiftEnter to create an array formula for this array. Though Excel puts curly braces { } around the formula, you can't create an array formula by typing curly braces yourself.
If you haven't run a simulation, you'll see lots of #N/A appear in the array. These will change to numbers when you run your simulation. To see this happen, open the attached example and run a simulation.
See also: In @RISK 6.0 and later, if you just have an occasional need you can get all the iterations for one input or output in the Browse Results window. See All Iterations of One Input or Output.
Last edited: 20150630
Applies to:
@RISK for Excel 4.x–7.x
RISKOptimizer 1.x, 5.x
While the simulation is running, how can I store intermediate results outside the Excel workbook?
All editions of @RISK offer the ability to run a userwritten macro after every iteration. The Professional and Industrial editions of @RISK include the Excel Developer Kit (XDK), a complete library of commands and functions that let you control every aspect of @RISK in your spreadsheet.
You can export data to a text file during simulation by using a VBA macro. The attached sample workbooks show one way to do this. There are two workbooks, one for @RISK 4.x and one for 7.x. (You can adapt the 7.x workbook to 6.x by changing the references.) Caution: In Excel 2007 and later, watch for a security warning when you open this workbook, and enable the macros.
To create a custom macro, use the @RISK VBA functions listed in the online manual. Check the @RISK Help File when @RISK is running, or click Windows Start » Programs » Palisade » Online Manuals » @RISK Macros. (In @RISK 5.5.1 and later, run @RISK and select @RISK's help, then Developer Kit.)
Performing a simulation that executes a macro after the recalculation of each iteration requires two steps:
Create a new macro that writes the desired information to a numbered text file. In our example, this macro is named WriteToTxtFile( ).
Create a main macro that sets the simulation settings and runs the simulation. In this macro you must:
You can either run the simulation by clicking View » Macros » View Macros » macroname » Run (in Excel 2003 and earlier, Tools » Macro » Macros » macroname » Run), or create a button as in the example, so that the macro runs when you click the button.
Last edited: 20180123
Applies to: @RISK 4.x–7.x
I want to see all the iterations of one particular input or output. Is there any way other than bringing up the Simulation Data window or generating a Simulation Data report? That produces all inputs and outputs, but I need just one or two.
Yes, there are two methods.
In @RISK 6.0 or newer, click Browse Results and select the input or output cell. In the upper right corner of the Browse Results window, click the dropdown arrow and select Data Grid. (See the attached illustration.) You will then have all the iteration data for this input or output in a column. You can copy/paste it to an Excel sheet or another program if you wish.
In @RISK 4 and later, you can place iteration data in your worksheet with RiskData( ). The RiskData functions are automatically updated at the end of a simulation.
Last edited: 20150630
Applies to: @RISK for Excel 4.x–7.x
I see a RiskMean( ) function, but no RiskSum( ). I would like a sum that totals all of the values that occur in a given cell during a simulation. Is this possible within the framework of @RISK?
Response:
The accompanying workbook shows three methods.:
Last edited: 20150630
Applies to:
@RISK 4.x–7.x
I'd like to know how many iterations, or what percent of iterations, had a particular input or output between two limits. I know I could do this through filtering, or through moving the delimiters in a Browse Results graph, but is there a worksheet function?
Yes, you can do this with worksheet formulas. The basic idea is that
(number of iterations in range) =
[ (right percentile) − (left percentile) ] × (total number of iterations)
@RISK provides the pieces you need for that formula, and the process is the same for an input or an output.
Please take a look at the attached example. The numbers you can change are in blue on white; the formulas in other cells can be viewed but not changed.
The method, starting from xvalues:
Suppose you'd like to know how many iterations saw a profit (cell C9) between $22,000 and $23,000 (cells F9 and G9). Referring to the formula above, you see that you need to ask which percentiles those limits represent. RiskXtoP will tell you that.
The percentage between F9 and G9 is the difference of those percentiles. (The percentage between F9 and G9 is the part that is below G9 but is not also below F9.)
Multiply that by the total iterations from cell H2, and round to an integer. (See Placing Number of Iterations in the Worksheet.) You need to round the result, si that you don't end up with fractional iterations, because the RiskXtoP functions interpolate their values between the iterations that actually occur in any particular simulation.
The formula was "exploded" into multiple cells to show the steps. But you can do all of it in one formula; see columns M–P.
The method, starting from percentiles:
If you want the number of iterations between two stated percentiles, you don't need the RiskXtoP functions. Rows 11–13 show the formulas broken down into bits, and in one cell.
See also: For tracking logical values instead of computed inputs or outputs, see How Many Times Did an Event Occur?
Last edited: 20180508
Applies to: @RISK 6.x/7.x
We have a combined risk register that models the risks based on Monte Carlo sampling. I would like to get a table that shows how many times risk one, risk two, risks one and three, or risks onetwothree occurred.
This is a special case of a more general problem: in how many iterations did a given event or combination of events occur? Or, instead of how many iterations, you might want to know in what percentage of iterations some event occurred.
The basic technique is to construct a cell formula that is 1 when a desired event occurs and 0 when it doesn't. Constructing that formula is not hard if you know these rules:
An example is attached to this article. It uses part of a sheet from our standard Risk Register example, in rows 1 to 9. The green box tracks seven events, showing how to compute the percentage of iterations where each event occurred, as well as the number of iterations where each event occurred.
See also: This is simpler with numeric data, as explained in How Many Iterations Were within a Certain Range?
Last edited: 20170330
Applies to: @RISK 5.x–7.x
@RISK gives me a lot of options for sensitivities in my tornado graph: correlation coefficients, regression coefficients, mapped regression coefficients, change in output mean, and so on. How do I choose an appropriate measurement in my situation?
After a simulation, the Sensitivity Analysis window is your handy overview of sensitivities for all outputs. In the Results section of the @RISK ribbon, click the small tornado to open the Sensitivity Analysis window. (You can also see most of this information by clicking the tornado at the bottom of a Browse Results window for an output.)
Change in output statistic:
The Change in Output Statistic tornado displays a degree of difference for just the two extreme bins, but the spider shows more information: the direction of the relationship, and the degree of difference for every bin.
Regression or correlation coefficients:
Regression coefficients and regression mapped values are just scaled versions of each other. Correlation coefficients are rankorder correlation, which works well for linear or nonlinear correlations. In the Sensitivity Analysis window, when you select Display Significant Inputs Using: Regression (Coefficients), @RISK will display R² ("RSqr") in each column. You can use R² to help you decide between correlation coefficients and regression coefficients:
For a more detailed explanation of correlation and regression, see Correlation Tornado versus Regression Tornado and How @RISK Computes RankOrder Correlation.
Contribution to variance:
R² is a measure of the percentage of the variance in a given output can be traced to the inputs — as opposed to measurement errors, sampling variation, and so on. @RISK adds input variables to a regression one by one, and each variable's contribution to variance is simply bow much larger R² grows as that input is added. In other words, a regression equation should predict output values from a set of input values. A variable's contribution to variance measures how much better the equation becomes as a predictor when that input is added to the regression. Unlike a regression coefficient, this measurement is unaffected by the magnitude of the input. For more about this, see Calculating Contribution to Variance.
See also: All Articles about Tornado Charts
Last edited: 20180815
Applies to: @RISK for Excel 5.x–7.x
The tornado diagram shows sensitivity of a simulated output to each input in units of standard deviation. Can I get the actual regression coefficients?
You can do a calculation from the coefficients that are displayed in the tornado, as explained in Interpreting Regression Coefficients in Tornado Graphs.
You can also use a worksheet function to obtain the regression coefficients directly, with no need for further calculation. The function is RiskSensitivity( ). In the function, set the fifth argument to 3 (result type = equation coefficient). @RISK will then return the actual coefficient that would appear in a multiple regression.
Example: Suppose you're interested in the sensitivities of the output in cell A1. Then the function
=RiskSensitivity(A1, , 1, 1, 1)
will tell you the name (fifth argument = 1) of the input that has the largest impact or highest rank (third argument = 1), and the function
=RiskSensitivity(A1, , 1, 1, 3)
will tell you the unscaled regression coefficient (fifth argument = 3) of that input for the output in A1. For instance, if that RiskSensitivity( ) function returns 0.72, it means that a oneunit increase in that input corresponds to a 0.72unit increase in the output.
Technical note: The rank number (third argument) can be anything from 1 to the number of @RISK inputs in the model; if it is too large the function returns #VALUE. However, @RISK only returns sensitivities for the inputs whose coefficients are significantly different from zero (to a maximum of 100 inputs). For all other inputs, @RISK returns zero as a coefficient.
Beginning with @RISK 6, you can also get the constant term of the regression equation, by setting the RiskSensitivity( ) function's fifth argument to 4 (result type = equation constant). To find the regression constant in older versions of @RISK, please see Regression Equation from Calculated Sensitivities.
The attached example shows both types of regression tornado graphs, with (scaled) coefficients and with mapped values. It also shows how to use worksheet formulas to get those two plus the actual coefficients of the regression equation, including the constant term.
See also: All Articles about Tornado Charts
Last edited: 20170609
Applies to:
@RISK for Excel 4.x–7.x
@RISK for Project 4.1
I know that @RISK for Excel and for Project display regression sensitivities in a tornado diagram, and @RISK for Excel calculates them in the worksheet function RiskSensitivity. But how can I assemble them into a regression equation? What's the constant term? Is the regression equation more accurate for some input values than for others?
First, make sure you have the actual regression coefficients in units of output per unit of input.
Your regression equation is
Y = b_{0} + b_{1}X_{1} + b_{2}X_{2} + b_{3}X_{3} + ...
In this equation, Y is the @RISK output. b_{0} is the constant term (see next paragraph). The other b's are the regression coefficients, descaled if necessary (see above), and the X's are the @RISK input variables.
What is the value of the constant term, b_{0}? In @RISK 6.0 and newer, you can get this from RiskSensitivity( ) with a result type of 4. In earlier versions of @RISK, you have to calculate it. @RISK doesn't reveal this directly, but you can compute it from the other information. The line of best fit (the regression line) is guaranteed to include the point where all the inputs and the output have their mean values. Get those mean values from the Results Summary window or the Detailed Statistics window, and substitute in the regression equation to solve for the constant term:
b_{0} = Ybar  b_{1}Xbar_{1}  b_{2}Xbar_{2}  b_{3}Xbar_{3}  ...
where Ybar is the mean value of the output and the Xbar's are the mean values of the inputs.
When you have the constant term, you have the last piece of the regression equation.
Where is this equation valid? The coefficients are global properties of the overall set of data, so the equation is valid through the entire region of these input values. That is, each regression coefficient refers to the line that fits best through all the points, weighted equally. The regression equation takes all points (iterations) of all variables equally into account.
What if data are skewed? Just as with a simple twovariable XY regression, that will affect the residuals. If one region of the cloud of points is markedly different from another, the regression equation does the best it can overall, which may mean less than the best for particular regions. In that case the residuals would be large in some regions and small in others.
One caveat: All of this assumes that you have captured all the inputs that have any meaningful impact on this output. If you have only some of the significant inputs, then of course the regression line will lose some of its effectiveness.
See also: All Articles about Tornado Charts
Last edited: 20150630
Applies to: @RISK 6.1.1 and later
Can @RISK produce a tornado graph showing change in output mean, percentile, or mode? Is there any way to write those statistics to my worksheet?
Yes, you can use the RiskSensitivityStatChange function. This is documented in @RISK help.
The attached workbook shows examples of retrieving change in output mean, change in output mode, and change in output percentile. (You will notice that inputs often rank differently depending on which measure you use.)
See also:
Last edited: 20210305
Applies to: @RISK 7.5 and newer
The help file describes Contribution to Variance this way:
These values are calculated during the regression analysis. The sequential contribution to variance technique calculates how much more of the variance in an output is explained by adding each of a sequence of inputs to the regression model. The selection of the variables and the order in which they are added is determined by the stepwise regression procedure. As with any regression technique, when input variables are correlated, the regression can pick any of the correlated variables and ascribe much of the variance to it and not inputs correlated with it. Thus, caution in interpreting the contribution to variance results is critical when inputs are correlated.
Can you expand on that?
@RISK runs a stepwise regression on an output, to find several measures of sensitivity to the input distributions in the model. Stepwise regression is an iterative process where input variables enter into the regression sequentially. From the inputs that have not yet entered the regression, the next one to enter is the one with greatest significance to the output. However, rerunning the regression with that additional input variable can change the results for inputs that entered earlier. If an input no longer contributes significantly, it will leave the regression.
After performing the stepwise regression, @RISK performs a second regression, this time a forward regression. Variables enter this regression in the same order as before, but only the ones that did not leave the original stepwise regression; and no variables leave.
@RISK records the change in R² when each input enters the second, forward regression. (R² is between 0 and 1, and is a measure of how effectively the regression predicts output values. R² is the proportion of the output's total variance that is associated with input variables; 1–R² is the proportion associated with measurement errors, sampling variation, and random variations in general.)
The change in R² when an input enters is that input's percentage contribution to the total variance of the output. It's shown in the Contribution to Variance tornado graph. You can also place those numbers in your worksheet. The total of the percentages given by the worksheet functions will equal R². Because the number of bars on a tornado graph is limited, the total in the graph will be less than R² if not all contributing inputs fit on the graph.
A word on correlated variables: Some correlated variables may leave the first, stepwise regression, because some of their contribution to the output's variance overlaps with the contribution of the other correlated variables, and thus they don't add significant predictive power to the regression. In that case, they won't be part of the second, forward regression, and their contribution to variance is zero. The stronger the correlation, the stronger the tendency to omit some correlated variables. It's not easy to predict which variable is excluded in such cases; it could depend on slight changes in samples from one simulation to the next. But in that scenario it doesn't make much difference which of the correlated variables are used.
See also: All Articles about Tornado Charts
Last edited: 20171024
Applies to: @RISK 7.5.0 and newer
I like the Contribution to Variance tornado, but how can I get those values into my worksheet?
When the new graph was created in @RISK 7.5.0, new values were added to the arguments of the RiskSensitivity function. For contribution to variance, follow these patterns:
The first three arguments to the RiskSensitivity function are output cell reference or name, simulation number (omitted = simulation 1), and input rank (>=1, where 1 selects the input with greatest effect). The fourth argument is 4 for contribution to variance. The fifth argument is 1 for the name of the input with that rank, or 6 for the percentage of variance contributed.
Please open the attached workbook and run a simulation. The contributions to variance will appear in cells O9:Q15. The tornado graph is also shown for reference.
See also: All Articles about Tornado Charts
Last edited: 20180811
Applies to: @RISK 5.x–7.x
How can I compute a confidence interval on a simulated input or output in @RISK?
People don't always mean the same thing by "confidence interval" in the context of a simulation. Some want to estimate the mean of a distribution, and others want to know the middle x% of values.
Prediction Interval
Some people use "confidence interval" to mean the middle x% of the simulated data values, also known as a prediction interval. For instance, a 95% confidence interval by this definition would be the 2.5 percentile through the 97.5 percentile. @RISK can find these percentiles for you directly, with the RiskPtoX function. This downloadable workbook PredictionInterval.xls (attached) shows the calculation.
Confidence Interval about the Mean
Some people mean the confidence interval that is taught in statistics classes, an estimate of a "true population mean". The idea here is that the simulation is treated as a sample from the complete distribution, which contains infinitely many values. Your simulated result has a mean, the mean of a sample from the distribution, but if you repeated the simulation you'd get a different mean. What you want is a range that estimates the true mean of the distribution, with x% confidence in that range.
This confidence interval is the simulated mean plus or minus a margin of error. In turn, the margin of error is a critical t or z times the standard error. But the estimated standard error depends on your sampling method, Latin Hypercube or Monte Carlo.
Confidence Interval in a Worksheet Function
Beginning with @RISK 7.5, you can use the RiskCIMean( ) function to place the lower or upper bound of a confidence interval in your worksheet. =RiskCIMean(A1,.95) or =RiskCIMean(A1,.95,TRUE) gives you the lower bound for the 95% confidence interval about the mean of cell A1, and =RiskCIMean(A1,.95,FALSE) gives you the upper bound. If you prefer, you can use the name of an input or output, instead of a cell reference.
The confidence interval is computed using RiskStdErrOfMean( ), which equals the simulated standard deviation divided by the square root of the number of iterations. That's accurate if you're using Monte Carlo sampling. However, that same standard error is too large when you're using Latin Hypercube sampling. In turn, the larger standard error makes the confidence interval wider than necessary, possibly much wider than necessary. Thus, the RiskCIMean( ) function makes a conservative estimate under Latin Hypercube sampling. A truer estimate would require running multiple simulations, as explained below, which is not practical in a worksheet function.
Confidence Interval with Monte Carlo Sampling
The standard error is the simulated standard deviation divided by the square root of the number of iterations. The bounds of the confidence interval are therefore
sample_mean ± z_{critical} × standard_dev / sqrt(sample_size)
(Critical z is easier to compute and is often used instead of critical t. For 100 iterations or more, critical t and critical z are virtually equal.)
To find this type of confidence interval, @RISK offers several auxiliary functions but no single "confidence interval" function. The attached workbook ConfidenceInterval_MC.xlsx shows how to calculate this confidence interval using the @RISK statistics function. This worksheet is a proof of concept, and therefore the calculations are spread over several cells to show every step. In production, you would probably combine the calculations into a couple of cells, or put them into a userdefined function.
To predict how many iterations will be needed to restrict the confidence interval to a specified width, please see How Many Iterations Do I Need?
Confidence Interval with Latin Hypercube Sampling
(For computing confidence intervals based on Latin Hypercube sampling, we rely on Michael Stein, "Large Sample Properties of Simulations Using Latin Hypercube Sampling", Technometrics 29:2 [May 1987], pages 143151, accessed 20160628 from https://rforge.rproject.org/scm/viewvc.php/*checkout*/doc/Stein1987.pdf?revision=56&root=lhs.)
The simulated sample means are much less variable with Latin Hypercube than with Monte Carlo sampling. (See Latin Hypercube Versus Monte Carlo Sampling.) Therefore:
We recommend Latin Hypercube sampling, and it's the default in @RISK, because it does a better job of simulating your model than traditional Monte Carlo sampling. Just be aware that the confidence intervals that you or @RISK compute don't take the increased accuracy of Latin Hypercube into account. It may be enough just to bear in mind that the confidence intervals are bigger than necessary. But if you need confidence intervals that accurately reflect Latin Hypercube sampling, here is how you can compute them.
If the number of iterations is large relative to the number of input variables, and certain other conditions are met, the distribution of simulated sample means for each output will be approximately normal. Then you can find the standard error, margin of error, and confidence interval by this procedure:
In Simulation Settings » Sampling » Multiple Simulations, set "Use different seeds". Set a number of iterations in each simulation that is large relative to the number of input variables.
Run several simulations.
Each simulation will have a mean, which we can call xbar. Collect the simulated means, and take the mean of those xbars. This is your estimate for the true mean, and will be the center of your confidence interval.
Compute the standard deviation of the group of xbars, and divide by the square root of the number of simulations (not iterations). This is the estimated standard error of the mean for Latin Hypercube sampling. Since the standard deviation of those simulated means is much less than the standard deviation of the iterations within any one simulation, this standard error will be much less than the standard error for Monte Carlo sampling.
Compute your critical t in the usual way, with degrees of freedom set to number of simulations minus 1, not number of iterations minus 1. For instance, with 10 simulations, critical t is 2.26 for a 95% confidence interval. (Since the degrees of freedom is low, use t and not z.)
Multiply critical t from step 5 by the standard error from step 4. This is the margin of error. Your final confidence interval is
(mean of xbars) ± t_{critical} × standard_error
The attached workbook ConfidenceInterval_LH.xlsx shows the calculation. The model is the same one that was presented above for Monte Carlo sampling. In the Monte Carlo example, there were 10,000 iterations in one simulation, and the standard error was on the order of $550,000. In the Latin Hypercube example, there are 1000 iterations in each of 10 simulations, totaling the same 10,000 iterations, but the standard error is much smaller, on the order of $5,000 instead of $550,000.
Last edited: 20170802
Applies to: @RISK 5.x–7.x
I would like to make some changes in the layout or contents of the Quick Reports; how can I do that? What is the best way to reproduce the Quick Report? Is there any way to access the template file that generates it? Can I create customized forms of other graphs and reports?
By design, the Quick Reports are not very customizable. (You can change the type of tornado graph, see Tornado Graph in Quick Reports.) The idea is that they should always be in the same layout to make them as quick to read as possible. But there are several ways you can get the same information in customized graphs.
Option A (@RISK 7): Custom Reports
New in @RISK 7.0, Custom Reports let you mix and match graphs and statistics tables. By default, one Custom Report is produced for each output, but the Custom Reports tab in the Excel reports dialog lets you choose to report only particular outputs.
For more, see the "Custom Reports" and "Custom Report Outputs" topics in @RISK help.
Option B: Copy/Paste
This is fastest if you have a onetime need. You can store some customizations in Application Settings, but some can only be done manually for each graph.
Option C: Report Templates
You can create one or more templates for your own customized reports and use them instead of the Quick Reports, or in addition to the Quick Reports. Set up a template on a dedicated tab (worksheet) within your workbook. The worksheet name must have the form RiskTemplate_reportname, where reportname is the desired name of the report sheet. See Creating and Using Report Templates for more.
Any Excel or @RISK formulas can be part of your template sheet. You can easily include statistics like means and percentiles through Insert Function » Statistic Functions » Simulation Results, and include graphs through Insert Function » Other Functions » Miscellaneous » RiskResultsGraph.
This is an automated solution, and it's quick to set up, but when you use RiskResultsGraph only a few customizations are available.
Option D (@RISK 6.2 and Newer): Visual Basic for Applications
Beginning with @RISK 6.2.0, there is a more flexible alternative for placing graphs in your worksheet. The new RiskGraph object gives you many customizations, but you do need to write Visual Basic code to use it. A new Automation Guide (Help » Developer Kit (XDK) » Automation Guide) explains how to create some basic graphs. For many more options, with a listing of every property and method, see the XDK help file (Help » Developer Kit (XDK) » @RISK XDK Reference).
A small example is attached, showing a RiskResultsGraph tornado and a RiskGraph tornado created through Visual Basic. (Run a simulation to see both of them. Depending on your screen resolution, one of them may hide part of the other, so that you'll need to move it.)
For another example, see Placing Graphs in an Existing Worksheet with VBA.
VBA automation is available in @RISK Professional and Industrial Editions only.
Last edited: 20150630
Applies to: @RISK for Excel 5.x–7.x
In the Results Summary window, and in the Output Results Summary report in Excel, a column is labeled "Status". What do the numbers mean?
If you have enabled convergence monitoring, this column tells you whether each output has converged by showing OK or a number. OK means the output has converged; a number is the estimated percent complete to convergence for that output.
For further information, please see Convergence Monitoring in @RISK.
Last edited: 20150701
Applies to: @RISK 5.x–7.x
I'd like to change the statistics that are displayed in the Results Summary window, or the Excel reports Input Results Summary and Output Results Summary. For example, I'd like to see the 10th and 90th percentiles rather than the 5th and 95th. Or I'd like to add the median or standard deviation to the columns. How can I do it?
Follow this procedure:
These changes will apply only to the Results Summary window and the Excel reports Input Results Summary and Output Results Summary created during the current session. To set these columns as defaults for all @RISK workbooks, both new and existing workbooks, follow this additional step:
Last edited: 20150701
Applies to: @RISK 5.x–7.x
The Detailed Statistics window shows only seven significant digits, and if I choose Report in Excel I again get only seven significant digits. Is there any way to get more precision?
First, consider that these statistics are the result of a stochastic process, and it's highly unlikely that so many significant digits are meaningful. This is why @RISK rounds its results even though it actually does the calculations in full double precision.
But if you truly want to see more significant digits, you can get them from the @RISK statistics functions. These functions, including RiskMean( ) and RiskStdDev( ), return full double precision. You can put them in your worksheet. If you have a whole lot of them, for greater efficiency you could call them from a macro that you set to execute automatically at the end of simulation.
Last edited: 20150706
Applies to: @RISK 4.x–7.x
On the Detailed Statistics sheet, I enter a target percent (P) and the target value (X) doesn't update, or I enter an X and the P doesn't update.
There are two Detailed Statistics sheets in @RISK: the Detailed Statistics report, which is prepared as an Excel worksheet, and the Detailed Statistics window, which is part of @RISK. Only the @RISK window is "live", meaning that when you enter an X or a P the other member of the pair changes automatically. The report in Excel is static and does not update.
Last edited: 20150706
Applies to: @RISK 6.x/7.x
In the Detailed Statistics window after a simulation, @RISK gives me the 5th, 10th, 15th, ..., 95th percentiles. I can get additional percentiles in the Target section below that, but is there a way to make them appear automatically?
Open Utilities » Application Settings. In the Windows section, find the Detailed Stats Window Targets line. Click to the right of Automatic, click the dropdown arrow, and enter your desired target percentiles in the form
1, 2.5, 97.5, 99
You can specify up to ten percentiles in this way, with or without % signs. @RISK will display these percentiles, in addition to its standard ones, in the Detailed Statistics window and on the Detailed Statistics report.
Last edited: 20150930
Applies to: @RISK for Excel 5.x–7.x
When I run my simulation and click the xsubscripti icon to check the @RISK Data window, I see "Error" for some iterations in one or more outputs. What does that mean? There are no #N/A or #VALUE errors in my workbook.
In the @RISK Data window, each row is an iteration and each column is an @RISK input or output. "Error" in the @RISK Data window means that the formula in that cell (column heading) has an Excel error in that iteration (row heading). But the problem may or may not be in the formula in that cell. It might in be a formula in a cell that is referenced by that cell. (In Excel, when any cell has an error status, all the cells that use it in formulas share that error status.)
How can you have errors in particular iterations when there are no errors in the worksheet as displayed when a simulation is not running? For example, suppose you have RiskNormal(10,3) in one cell, and in another cell you take the square root of the first cell. The static value of the RiskNormal( ) is 10, so when a simulation is not running you won't see any error. But during an iteration, occasionally the RiskNormal( ) will return a negative value, and the square root of a negative value returns a #NUM error. If the cell that contains the squareroot function, or any cell that depends on it, is an @RISK output, then you will see an error in the Simulation Data window for that iteration.
To find the source of the error:
In the Results section of the @RISK ribbon, click the Simulation Data icon, the small icon showing xsubscripti. The @RISK Data window opens, showing all outputs in columns, and then all inputs. Locate your output, then an Error indication. Click on it, and then click the footprint or shoeprint icon at the bottom of the window. (The tool tip, if you hover your mouse over the icon, is "Update Excel with values from the selected iteration". If the button is grayed out, see Footprint Button Grayed Out.)
@RISK will put your workbook into the state it was in during that iteration. Then you can check the error cell and trace back through the formulas till you find the source of the error. (You may need to minimize the @RISK Data window, or grab its title bar with your mouse and move it out of your way.) You can click on other iterations in the @RISK Data window to display other iterations of the workbook.
(Actually, @RISK sets all inputs to the values they had during that iteration, then recalculates the workbook to let Excel fill in the outputs. If shoeprint mode shows different output values from the ones shown in the Data Window for the same iteration, see Random Number Generation, Seed Values, and Reproducibility.)
When you have found the problem, click the footprint icon again to return the workbook to its normal state, or simply close the Data Window.
See also:
Additional keywords: Shoeprint mode, footprint mode
Last edited: 20190215
Applies to: @RISK 8.2 and newer
Our new @RISK 8.2 release includes 2 new ways to get simulation Data: Export Simulation Data from Graph Windows and Simulation data report.
Export Simulation Data from Graph Windows
The Browse Results, Scatter Plot, and Summary Graphs windows now have the option to Export or Copy the Simulation Data for the displayed inputs or outputs:
Simulation Data Report
The new simulation data report now allows you to select inputs and/or outputs to generate a report with their simulation data in an Excel Worksheet.
Last update: 20210729
Applies to: @RISK 8.2 onward
I want to get all the simulation data for a specific output or input, how can I do that?
You have two options on how to get this information.
The first way is through the Browse Results window. In the bottom right hand corner there is an Export button. From here you can either copy the data and paste the values into Excel, or Export the values to Excel. Copying will give you only the values, exporting will give you more information regarding the distribution name and location.
The second option is using a built in report. In 8.2 there is a new report added called Simulation Data. In this report you can either specify which distributions you are interested in, or select all of them. You can also choose to include the thumbnail graphs or filters.
Last edited: 20210723
Applies to:
@RISK for Excel 4.5–7.x
@RISK for Project 4.0 and 4.1
How do I interpret the y axis of the histogram that is created from the results of my simulation?
@RISK can show the histogram of your result data in two different formats, probability density or relative frequency. This just a matter of different scaling for the y axis; the shape of the histogram doesn't change. The default histogram is probability density for continuous data, and relative frequency for discrete data.
TIP: Most people find relative frequency easier to understand than probability density. Especially for presentations, you may want to use the relative frequency format, or simply suppress the y axis. (See "How do I select the y axis format," below.)
How do I interpret relative frequency numbers on the y axis?
If a bar is as high as the 2% mark, for example, you know that 2% of all iterations fell within that bar. In other words, the height of each bar represents the proportion of the data (the fraction of all the iterations) in that bar. Since every data point must be in some bar of the histogram, the heights of all the bars add up to 100%.
(Before @RISK 6.2, relative frequencies were shown as decimals, for example 0.02 rather than 2%, but you read them the same way.)
How do I interpret probability density numbers on the y axis?
This is harder. Unlike the case of relative frequency, the height of a histogram bar isn't meaningful on its own. What matters is the area of the bar.
Consider the example at right. (You can click on it to get a larger image.) Look at the bar for $74,000 to $76,000. Its width on the x axis is $2,000, and its height on the y axis is about 4.9×10^{5}. As with any rectangle, you find its area by multiplying width and height: $2000×4.9×10^{5} = 0.098 or 9.8%. The height of that bar by itself doesn't tell you anything, but in conjunction with the width it tells you that 9.8% of the iteration data for this input fell between $74,000 and $76,000. The total area of all the bars is 1 (or 100%).
When you're looking at a theoretical probability curve for an input, or in a fitted distribution, it will be presented as probability density. Again, the height of the curve doesn't tell you anything useful on its own. But the area under part of the probability density curve tells you what percentage of the data should fall within that region, theoretically. For example, the area under the curve to the left of $72,104 is 5.0% according to the bar at the top of the graph. This tells you that theory says 5% of the data for a Normal(80000,4800) should be less than $72,104.
Technically, the area under a part of the curve is the integral of the height of the curve, from the left edge of the region to the right edge. Thus, the 5% was found by integrating the height of the density curve from minus infinity to $72,104. Just as the total area of the bars in a histogram is 1, the total area under a probability density curve is 1.
How does @RISK create the y axis for a probability density histogram?
In a probability density histogram or curve, the larger the numbers on the x axis, the smaller the numbers on the y axis must be to keep the total area at 1.
How do I select the y axis format?
In @RISK 5.x–7.x, click the histogram icon at the bottom of the Browse Results window and select Relative Frequency or Probability Density. If you prefer, you can suppress the numbers on the yaxis entirely: rightclick on any of the numbers on the vertical axis and select Axis Options. Then on the YAxis tab, under Display, remove the check mark by Axis.
TIP: If you find yourself changing the y axis often, you might want to change the default. In Utilities » Application Settings » Simulation Graph Defaults, change Preferred Distribution Format to Relative Frequency, or whatever you prefer.
In @RISK 4.x, rightclick the histogram and select Format Graph...; then select the Type tab. In the Histogram Options section, click the dropdown arrow next to the Format field and choose Density or Relative Frequency.
Last edited: 20180921
Applies to: @RISK 5.x–7.x
When it makes a histogram, how does @RISK choose a number of bars? In other words, how many bins or intervals does @RISK divide the data range into? Can I change this?
By default, @RISK determines the number of bins from the number of iterations or data points n, as follows:
n Less than 25 25 to 100 More than 100 
Bins 5 Nearest integer to n / 5 Largest integer below 10 × log(n) 
If you want to change this for a particular histogram, rightclick the graph and select Graph Options. On the Distribution tab, the lower section lets you specify a number of bins (bars), as well as a minimum (left edge of the first bar) and maximum (right edge of the last bar). "Automatic" uses the calculation shown above, but you can specify a number from 2 to 200.
Last edited: 20150715
Applies to: @RISK 4.5–7.x
@RISK for Project 4.x
I want the y axis values on my histogram to be between 0 and 1. But when I change the default maximum from 2 to 1, the top of the histogram is chopped off. Shouldn't probabilities be greater than 0 and less than or equal to 1?
You are probably looking at the default histogram format, which is probability density. With probability density, the heights of the bars are adjusted so that the total area of all the bars is 1. If your data range is small, then the heights of the bars may be greater than 1. If you change the graph format to relative frequency, the y axis will have a maximum of 1 or less.
Beginning with @RISK 6.2, relative frequencies are shown as percentages. This gives a visual indication whether you're looking at probability density or relative frequency.
For more detailed information, please see Interpreting or Changing the Y Axis of a Histogram.
Last edited: 20150706
Applies to: @RISK 6.2 and newer
Beginning with @RISK 6.2, you can display the x and y axes of most graphs in logarithmic scales, using any of these methods:
Generally, graphs with numeric scaling support log scaling. Here are the major exceptions:
Last edited: 20130925
Applies to: @RISK 5.x–7.x
Can I smooth out a histogram to create an area graph, as I could in older versions of @RISK?
Yes, you can, though you have to go through a dialog box because you get more choices.
When you have the results graph displayed, follow this procedure:
Last edited: 20150706
Applies to: @RISK 7.x
I like the new Thumbnails feature of @RISK (in the Utilities menu). I'd like to paste a thumbnail into my Excel sheet, a PowerPoint slide, a Word document, or my graphics program. How can I copy a thumbnail to the clipboard?
Just hover your mouse over the input or output cell, then slide the mouse pointer over the thumbnail. Rightclick and select Copy. That places a copy of the thumbnail on your clipboard, and you can then paste it anywhere with the usual commands (typically Ctrl+V).
Last edited: 20150706
Applies to: @RISK 6.x/7.x
The Knowledge Base has many articles about various aspects of tornado graphs. In Technical Support, we sometimes get multiple tornadorelated questions at the same time, and it seems useful to collect all the links in one place.
Interpreting tornado graphs:
Which variables are in a tornado?
Putting numbers from tornado graphs into your worksheet:
Troubles:
Other articles:
Additional keywords: Tornado chart, tornado charts, tornado graph, tornado graphs, sensitivity tornado, sensitivity tornados, sensitivity tornadoes, sensitivity coefficients, sensitivity chart, sensitivity charts, sensitivity graph, sensitivity graphs
Last edited: 20180815
Applies to:
@RISK for Excel 5.x–8.x
How can I interpret the regression coefficients on the tornado diagram or sensitivity report produced by @RISK?
The regression coefficients are calculated by a process called stepwise multiple regression.
The main idea is that the longer the bar or the larger the coefficient, the greater the impact that particular input has on the output that you are analyzing. A positive coefficient, with bar extending to the right, indicates that this input has a positive impact: increasing this input will increase the output. A negative coefficient, with bar extending to the left, indicates that this input has a negative impact: increasing this input will decrease the output.
In Browse Results and with the RiskResultsGraph function, you can get "regression coefficients" or "regression coefficients—mapped values". With the RiskSensitivity function, you can get either of those measures and also the unscaled coefficients that would be used in a regression equation. Please open the attached workbook and click Start Simulation. It shows both types of regression tornados and all three types of coefficients.
Regression Coefficients
The graph labeled simply "regression coefficients" does not express them in terms of actual dollars or other units. Rather, they are scaled or "normalized" by the standard deviation of the output and the standard deviation of that input.
For the output, Input A has a regression coefficient (standard b) of 0.78. That means that for every k fraction of a standard deviation increase in Input A, the output will increase by 0.78k standard deviations (SD). To get from that coefficient to the actual coefficient in terms of units of input and units of output, multiply by the SD of the output and divide by the SD of the input. 0.78 × 12784 / 1000 = about 10,and therefore a 1unit increase of A corresponds to a 10unit increase of the output.
Regression – Mapped Values
The mapped regression values are scaled versions of the regression coefficients.
Mapped values are in units of output per standard deviation of input. For example, if Input A has a mapped coefficient of 10,023.53, it means that an increase of k standard deviations in Input A produces an increase of 10,023.53 * k units (not standard deviations) in the output.
If the standard deviation of input A is 1000 and k = 2, it means that increasing input A by two standard deviations (1000 * 2) increases the output by 20,001.06 (10,023.56 * 2) units.
Actual (Unscaled) Regression Coefficients
There is no option to show these on the graph, but you can get them from the worksheet function RiskSensitivity. The attached workbook shows examples in row 26; for more information please see Regression Coefficients in Your Worksheet.
Additional keywords: Sensitivity analysis
See also: All Articles about Tornado Charts
Last edited: 20210419
Applies to: @RISK, all releases
Why do we have both? Why can a correlation tornado sometimes show bars that aren't on the regression tornado, or vice versa?
Regression and correlation both indicate the direction of the relationship. A positive means that as that input increases, the output increases; and a negative means that as that input increases, the output decreases. You can say that a regression coefficient shows the strength of the relationship, and a correlation coefficient shows the consistency of the relationship.
Correlation first. Imagine a scatter plot of just this input (horizontal axis) and output (vertical axis). Each point represents the value of that input and output in one iteration. As you sweep from left to right, you are going from low to high values of the input, in order. Now, consider two consecutive points in that sweep. The second point is to the right of the first, so it has a higher input value. But is the second point higher on the graph than the first (larger output value) or lower? In almost any simulation, the points will show some ups and some downs, but let's suppose that for every single pair of points, the point to the right is also higher. In this case you have a perfectly consistent relationship: increasing the input always increases the output. The correlation coefficient is +1 (maximum possible correlation).
Now suppose that the relationship is a little more realistic: usually when you go from left to right, the points are rising, but sometimes the righthand point is lower than the nearest point to its left. Now the relationship is not perfectly consistent. Usually increasing the input increases the output, but not always. The higher the correlation coefficient, the more consistently increasing the input increases the output; the lower the correlation coefficient, the less often increasing the input increases the output. The lower correlation coefficient means that the relationship has less consistency to it.
Take a situation where, moving from left to right, half the time the second point is higher than the first and half the time it's lower. Increasing the input is just as likely to decrease the output as increase it. Your correlation coefficient is zero.
It works the same with negative correlations. A coefficient of –1 (the lowest possible) means that every single pair of points has the second output lower than the first. The relationship is perfectly consistent: every time you increase the input, the output decreases. As the correlation coefficient gets further from –1 and closer to 0, there is less and less consistency. The output still decreases with increasing input, more often than not, but the lower the coefficient the closer you get to 5050 increase or decrease and zero correlation.
So the correlation coefficient tells you whether increasing the input generally increases or decreases the output, and how consistent that trend is, but it tells you nothing about the strength of the influence.
So much for correlation. What about regression coefficients? Regression coefficients tell you the size of the effect each input has on the output. For example, a regression coefficient of 6 means that the output increases 6 units for a 1unit increase in the input; a coefficient of –4 means that the output decreases 4 units for each oneunit increase in the input.
(It's a little more complicated than that in @RISK, because you can get only scaled regression coefficients on a tornado; see Interpreting Regression Coefficients in Tornado Graphs. But you can get the actual regression coefficients in a worksheet; see Regression Coefficients in Your Worksheet.)
For more, see Which Sensitivity Measure to Use?. Also see the "Regression and Correlation" topic in the @RISK Help file.
See also: All Articles about Tornado Charts
Last edited: 20160420
Applies to: @RISK 6.x/7.x
How do I interpret the doublesided tornado graphs in Quick Reports, Browse Results, and Sensitivity Analysis? What's the default behavior, and how can I change it?
Let's talk first about the default behavior for Change in Output Mean, which is the default statistic, and then we can go into the variations. We'll suppose that you have 2500 iterations in your simulation.
The baseline is the overall simulated mean of that output.
The doublesided tornado has one bar for each selected input, and each bar has numbers at its edges. Each bar is prepared by considering one input and ignoring everything else but the output. (The other inputs are not held constant; their values from the simulation are simply not used in the computation.)
The inputs are first sorted in ascending order and binned in that order, then an output mean is computed for just the iterations in each bin and shown on the bar in the tornado chart. Details for Change in Output Mean:
Different shading, beginning with @RISK 7.5, shows you which end of each bar represents high input values and which represents low input values. Thus you can easily tell which inputs have positive impact on this output (high inputs at the right) and which have negative impact (high inputs at the left).
In @RISK 6.0–7.0, there's no way to see from the graph which bin produced which output mean. For instance, if a Change in Output Mean bar goes from 1500 to 4980, you don't know whether that output mean of 1500 came from the bin with the 250 lowest input values, or the bin with the 250 highest input values, or a bin with intermediate input values. This is where correlation sensitivities or a scatter plot can help, to tell you whether increasing values of an input tend to associate with increasing values of the output, with decreasing values of the output, or with some more complicated trend.
Note: The change in output values does not necessarily indicate any influence of that input on the output. For more, see Change in Output Mean Inconsistent with Sensitivity Tornado.
Variation: number of scenarios (bins or divisions)
The default number of bins is 10, but you can change that. While displaying a tornado graph, click the tornado icon in the row at the bottom, and choose Settings. The first setting, "Divide input samples into ____ scenarios", controls the number of bins (number of divisions, number of scenarios) that @RISK uses to construct the tornado. If you increase the number of bins, @RISK will have more output means, each representing a smaller number of inputs. For most models, that translates to a greater range of output means. For a very simplified example, please have a look at the attached workbook. (You don't want so many bins that each one has only a few iterations; see next paragraph.)
Variation: number of iterations
With more iterations, from one simulation to the next you'll see less variability in Change in Output Mean, just as with any other output statistic. In other words, output statistics are more stable with more iterations. With fewer iterations, you'll see more variability in all your output statistics. However, from one simulation to the next, output statistics should vary only within normal statistical variability for the number of iterations.
Variation: choice of statistic
You can display a change in output percentile rather than a change in output mean. In this case, the computation is similar but instead of an output mean for each bin @RISK computes an output percentile for each bin. For example, with 2500 iterations and 10 bins, if you select Change in 90th Percentile then @RISK will compute the 90th percentile of the output values within each of the 10 bins (within each group of 250 iterations sorted by input values), and the edges of the bar will be the smallest and largest of those 90th percentiles. The baseline of the output becomes the overall 90th percentile of the simulation.
Setting preferences for doublesided tornado
To set default number of bars for doublesided tornado in Browse Results, Sensitivity Analysis, and Quick Reports, select Utilities » Application Settings » Sensitivity Defaults. If necessary, set Preferred Calculation Method to Change in Output Statistic. You can then change the number of bars and your preferred statistic. (The Change in Output Statistic tornado will never show more than 10 bars. If you set a maximum greater than 10, it applies only to the correlation and regression sensitivity tornado graphs. However, you can still use a worksheet function to retrieve the change in output statistic for lowerranked inputs.)
To set the preferences for a particular Browse Results graph, click the tornado icon at the bottom of the graph window and select Settings.
See also: All Articles about Tornado Charts
Last edited: 20180813
Applies to:
@RISK for Excel 4.x–7.x
@RISK for Project 4.x
How does @RISK decide which variables to include when I create a tornado diagram with regression coefficients?
To choose inputs to include in the tornado diagram, @RISK uses a stepwise multiple linear regression procedure. By default, each variable is accepted or rejected for the regression procedure at the critical value of 3.29 in the F distribution. For a technical reference, please see "The Stepwise Regression Procedure" in Draper and Smith, Applied Regression Analysis (Wiley, 1966).
An example is attached. For comparison, the Sensitivity sheet shows regression coefficients computed by @RISK, and the Regression sheet shows regression coefficients computed by StatTools. The order of variables is different between the two, because the two products read and store data in different ways. However, both sheets show the same coefficients, because they're doing the same type of analysis.
To set the maximum number of tornado bars in @RISK 6.x/7.x, please see Tornado Graph — How to Set Defaults. In @RISK 5.x, use Utilities » Application Settings » Simulation Graph Defaults.
See also: All Articles about Tornado Charts
Additional keywords: Sensitivity analysis
Last edited: 20161020
Applies to: @RISK 5.x–7.x
How can I aggregate multiple inputs in the tornado graph, so that I see the output's sensitivity to the combination instead of sensitivities to the individual inputs?
I might be combining countries in a region, or I might want an NPV instead of individual cash flows, or ...
The RiskMakeInput( ) functions lets you do exactly this. If you already have a formula in your workbook that computes the aggregate you're interested in, just wrap it in a RiskMakeInput( ), like this:
=RiskMakeInput(
formula, RiskName("
name to appear in tornado") )
As an alternative, you could just create that formula in an empty cell.
RiskMakeInput( ) tells @RISK that its contents should be treated as an @RISK input distribution for purposes of sensitivity analysis, and RiskMakeInput( )'s precedents should be ignored in sensitivity analysis. Implications:
Precedent tracing stops with the RiskMakeInput( ), effectively. @RISK looks at the cells that the formula in RiskMakeInput( ) refers to, and all precedents of those cells. Any distributions that are direct or indirect precedents of any RiskMakeInput( ) function are excluded from all sensitivity calculations for all outputs. Even a RiskMakeInput( ) among those precedents is excluded from sensitivities.
The RiskMakeInput need not be a precedent of the output. For example, suppose you have =RiskMakeInput(A1+A2) in cell A3, and an @RISK output in cell A4. If the formula in A4 refers to A1 or A2 or to any of their precedents, then @RISK will treat the RiskMakeInput( ) in A3 as a precedent of the output in A4, even if the formula in A4 doesn't refer to A3 directly or indirectly. In this respect, @RISK treats RiskMakeInput( ) as a precedent even though Excel may not. Another way to look at it is that @RISK treats a RiskMakeInput( ) function as a precedent of an output if the two have any precedents in common.
The RiskMakeInput( ) affects all sensitivity measures, including all graphs and the RiskSensitivity( ) and RiskSensitivityStatChange( ) worksheet functions.
For an example, in @RISK 6 or 7 click Help » Example Spreadsheets » Statistics/Probability » Using RiskMakeInput Function. In @RISK 5, click Help » Example Spreadsheets » RiskMakeInput.xls.
See also:
Last edited: 20150621
Applies to: @RISK 5.x–7.x
How can I tell @RISK not to include one or more inputs in tornado charts and other sensitivity results, including the spider graph and the RiskSensitivity( ) and RiskSensitivityStatChange( ) functions?
You might want to do this if you have two inputs that are very highly correlated. This creates multicollinearity, which adds a redundant bar to the Change in Output Statistic tornado and distorts the Regression Coefficients tornado.
The key is the RiskMakeInput( ) function. @RISK excludes all the predecessors of a RiskMakeInput( ) from sensitivity analysis, whether or not that RiskMakeInput( ) is a precedent of any output. Thus, all you have to do to exclude P11 and J15 from sensitivity measurements is to put them in a simple RiskMakeInput in a previously empty cell:
=RiskMakeInput(P11+J15)
A nice feature of this approach is that you don't have to make any changes to the formulas in your actual model. Also, if you add or remove rows or move cells, Excel will automatically update the cell references, just as with any other formula. However, the RiskMakeInput( ) itself will now appear as an input in sensitivity functions and graphs. To prevent that from happening, multiply the included expression by 0, so that every iteration value is the same:
=RiskMakeInput(0*(P11+J15))
RiskMakeInput( ) will work as described here, whether Smart Sensitivity Analysis is enabled or disabled in Simulation Settings.
I don't want to recalculate results; I just want to suppress one or more bars of the tornado.
Rightclick each bar you want to suppress, and click Hide Bar. If you want to bring the hidden bars back, rightclick the graph and select Restore Hidden Bars.
(The Hide command isn't available with the spider graph.)
See also:
Last edited: 20170710
Applies to: @RISK for Excel 5.x–7.x
@RISK generated a tornado graph, but only some of the inputs are labeled.
By design, all tornado graphs are created at the same size. If there are too many input labels to fit on the y axis, @RISK will show only every second (third, fourth, etc.) label. (This is also true with numeric labels, for instance in histograms.)
To display all labels, simply make the window larger vertically.
See also: All Articles about Tornado Charts
Last edited: 20150706
Applies to: @RISK 6.x/7.x
How do I set the defaults for tornado graphs? I looked in Application Settings but I couldn't find that section.
To set defaults for the tornado graphs in Browse Results and Quick Reports, click Utilities » Application Settings » Sensitivity Defaults.
Tornado Maximum # Bars can be any whole number from 1 to 16. However, a value greater than 10 will apply only to the correlation, regression, and contribution to variance tornado graphs. The Change in Output Statistic tornado never displays more than 10 bars, even if you specify a higher number. If the limit of 16 (or 10) is too small, you can still use a worksheet function to retrieve correlation coefficients, regression coefficients, change in output statistic, or contribution to variance for lowerranked inputs.
See also: All Articles about Tornado Charts
Additional keywords: Number of bars in tornado
Last edited: 20171024
Applies to: @RISK 6.x/7.x
My Quick Reports have three graphs: a histogram, a cumulative Scurve, and a change in output mean (tornado plot). I'd like that third graph to be correlation or regression sensitivities rather than change in output mean. How can I do it?
The format of the tornado graph in Quick Reports is controlled in Application Settings. In @RISK, click Utilities » Application Settings » Sensitivity Defaults. Change Preferred Calculation Method to Regression Coefficients, Regression Mapped Values, or Correlation Coefficients. Click OK, then Yes to the confirming prompt. Any Quick Reports you generate after this will use the new format, both in the graph itself and in the table to the right.
Beginning with @RISK 7.0, as an alternative you can simply create a Custom Report. Before a simulation, click Simulation Settings » View » Automatically Generate Reports at End of Simulation; after a simulation click the large Excel Reports icon in the ribbon. Either way, select Custom Reports in the list, then go to the Custom Reports Settings tab of that dialog. Click Sensitivity Graph, then Edit, and change the type of sensitivity.
Can I limit the number of bars that appear in the tornado charts in Quick Reports?
Yes, this setting is also in Application Settings » Sensitivity Defaults. It's called Tornado Maximum # Bars. See Tornado Graph — How to Set Defaults.
See also: All Articles about Tornado Charts
Last edited: 20151002
Applies to: @RISK 5.x–7.x
I have quite a few outputs. When I generate Quick Reports, @RISK produces a separate worksheet for each of them. This takes a long time, and really I only want to report on just a few outputs. Is there a way to create Quick Reports just for one or a few selected outputs?
You can create a Quick Report for a single output from the Browse Results screen. While browsing that output, click the Edit and Export icon, next to the help icon at the bottom of the window. Quick Report (singular) is the first selection.
If you want a Quick Report for another output, click on that output and then the Edit and Export icon. TIP: You can use the Tab key to move the Browse Results window to the next output, and the next, and the next. Shift+Tab does the same, but in the opposite order.
Last edited: 20170927
Applies to:
@RISK 6.x/7.x
I clicked the "%" icon in Browse Results and selected a scenario. How do I interpret the numbers in the bars?
Let's work with this graph, which was produced by the first scenario in the attached workbook. (The workbook has a fixed random number seed, so that you can run a simulation and get the same results we're using here.)
"Scenario" is just a name for a subset of the iterations. In this graph, the title tells you that the subset is iterations where the Profit output is above its 75th percentile; in other words, it's the most profitable 25% of the iterations.
Where do the numbers 83.84% and 0.99 in the first bar come from? They are two different measures of the median of the Revenue input in the filtered subset, versus the median of the Revenue input in the whole simulation. Looking at Browse Results for the Revenue input for the whole simulation, we see that the median is very close to $100,000, and the standard deviation is very close to $6,000. To find the median Revenue value in the scenario, we apply an iteration filter for Profit output greater than its 75th percentile. When we do that, the median of the Revenue input for that filtered subset is $105,923.
The decimal measure in the graph is 0.99. It says that the median Revenue in the subset is 0.99 standard deviation above the median Revenue in the whole simulation. Let's check that. The median in the subset is $105,923, which is 5,923 above the $100,000 median in the whole simulation. $5,923 is about 0.99 of the $6,000 standard deviation of the Revenue input in the whole simulation, so that checks with the scenario graph.
The percentage in the graph is 83.84%. It says that the median Revenue in the subset is at the 83.84 percentile of the median Revenue input in the whole simulation. Let's check that. The median in the subset is $105,923. If we disable filtering and type 105,923 in the right delimiter in the Browse Results window for revenue, the percentage shown to the right is 16.2%. 100% minus 16.2% is 83.8%, so the subset median of $105,923 is at about the 83.8 percentile of the Revenue distribution for the whole simulation, and that too agrees with the scenario graph.
Both numbers in the bar are derived from the median of the Revenue input within the subset of iterations where the Profit output is above its 75th percentile within the whole simulation. The decimal 0.99 says that the median Revenue within the subset is 0.99 of a standard deviation above the median Revenue of the whole simulation, and the percentage 83.84% says that the median revenue within the subset equals the 83.84 percentile of Revenue within the whole simulation.
With that under your belt, you can interpret the other bar. The median of Cost within the subset is 0.77 of a standard deviation below the median Cost of the whole simulation, and it's also equal to the 22.1 percentile of Cost in the whole simulation.
That's fine for the graph. What about the numbers in the Output Scenarios window, if I click the "%" icon in the Results section of the @RISK ribbon?
Those are exactly the same deal, though the dropdown boxes use slightly different words. Select Display Inputs ... using: All, and you'll see the same numbers we've just discussed.
Last edited: 20180926
Applies to: @RISK for Excel 5.x–7.x
New in @RISK 7.0: If you have @RISK 7.0 or newer, and you're just trying to customize the Quick Reports, take a look at the Custom Reports option in Excel Reports. Items there can be edited, deleted, and rearranged; you can also add further items. That may meet your needs, but if not then read on ...
You can use RiskResultsGraph( ) and the @RISK Statistics Functions to place simulation results in any worksheet. They are filled in automatically when you run a simulation. However, the next time you run a simulation the results will be overwritten with new results.
If you want to create a set of customformatted results that do not get overwritten, place them in a report template. To create a report template:
Within this workbook, create a new worksheet.
Give the sheet a name that begins with RiskTemplate_, such as RiskTemplate_Projections. (The underscore is required.)
Set up a worksheet the way you want your results, using any combination of @RISK and Excel functions. You can put any valid Excel formulas and @RISK functions in the template sheet, but these are especially useful in reports:
To embed means, percentiles, or other statistical results, use the statistic functions. In @RISK, click Insert Function » Statistic Functions » Simulation Results.
To create graphs of several types, use the RiskResultsGraph function. Click Insert Function » Other Functions » Miscellaneous; or click into an empty cell, type =RiskResultsGraph( including punctuation, and press Ctrl+A. The RiskResultsGraph function provides limited customizations for the supported graph types; please see the help text for details. (If you want to do more customization, use the RiskGraph object in Visual Basic. For more information, please click Help » Developer Kit (XDK). In the submenu, Automation Guide gives a brief introduction in the topic "Displaying Graphical Results of a Simulation"; @RISK XDK Reference documents all objects and methods in detail, and the Examples include several on creating graphs and reports. You need the Professional or Industrial Edition, release 6.2 or later, for the RiskGraph object.)
In Simulation Settings » View, check (tick) "Automatically generate reports at end of simulation". On the selection dialog that opens, check (tick) "Template Reports".
Each time you run a simulation, @RISK will create a copy of any template sheets and will put that simulation's results in the copy. The original template, and any previous results created from the template, are undisturbed.
@RISK includes an example showing how to use a report template. Click Help » Example Spreadsheets » Other @RISK Features and select RiskTemplate.xlsx.
See also: Template Report Contains Formulas in Place of Numbers
Last edited: 20150807
Applies to: @RISK 7.5 or newer
How do I get @RISK graphs and reports to use Excel themes?
@RISK's own windows are formatted by @RISK and don't use themes. When you use the Chart in Excel command to place a graph in an Excel worksheet, you can choose Excel format, or Image (Picture in some dialogs). Choose Excel format, and then the graph in the Excel sheet will update automatically when you change themes.
Here are some hints for particular reports:
Custom Reports: When choosing each custom report, choose Edit and change the format from Image to Excel Format. @RISK will remember this as a default, so you won't have to change this for the same report in other workbooks. Tables in Custom Reports always use Excel themes for fonts and colors; graphs in Custom Reports will use Excel themes if the graph is in Excel format.
Quick Reports: Tables always use Excel themes for fonts and colors. Graphs are always images (static pictures) and will not respond to Excel theme changes.
RiskResultsGraph: The fourth argument (Excel format) must be TRUE, and in addition you must set a System Registry key. Under HKEY_CURRENT_USER\Software\Palisade\@RISK for Excel\7.0\Application Settings\Reports, create a string value GraphThemeOrStandardColor if it doesn't already exists. If the data for that string value is Theme, and you've specified Excel format in RiskResultsGraph, then the generated graph will use Excel themes. If the string value is set to StandardColor (or the GraphThemeOrStandardColor string value doesn't exist), then the generated graph will use standard colors and will not respond to Excel theme changes. Even without that string value in the System Registry, if you selected Excel format in RiskResultsGraph then you can use all of Excel's graph editing tools on the generated graph. If you didn't select Excel format in RiskResultsGraph, then @RISK generates a static image and it can't be edited.
Graphs you create in VBA: Use the ChartInExcelFormatEx or ChartInExcelFormatEx2 method of the RiskGraph object. These new functions are not yet documented, but a simple example workbook is attached to this article. When writing your own code, use Visual Basic Editor's autocomplete to help you fill in the function arguments.
Last edited: 20170202
Applies to: @RISK 5.x/6.x
I used RiskResultsGraph( ) to make a tornado graph in my worksheet. The bars were labeled with both the names of the inputs and the worksheet names and cell references. How can I tell RiskResultsGraph( ) to show just the name of each input, not its location?
RiskResultsGraph( ) does place both input names and locations at the left of the bars in some releases of @RISK, and there's no way to change this.
If this is a onetime need, the easy way is to use Browse Results for the output in question. In tornado graphs in the Browse Results window, only the input names appear, not the input locations. Perform any customizations you want, then rightclick the graph and select Copy Graph. Click at the desired location in your worksheet and press Ctrl+V, or rightclick and select Paste Special.
if you want an automated solution, the Quick Reports don't show cell references in the tornado graphs. The same is true of the Custom Reports introduced in @RISK 7.0.0.
Beginning in @RISK 6.2.0, you can use Visual Basic for Applications to create your tornado and place it in your worksheet. These tornado graphs label each bar with the name of the input, not its location, and you can do many types of customization. A very simple example is attached.
See also: All Articles about Tornado Charts
Last edited: 20150706
Applies to: @RISK 6.2/6.3/7.x, Professional and Industrial Editions
I rightclick a graph and select the Curves tab. When I try to change the color, the Define Custom Color button is grayed out. How do I unlock it?
That button is grayed out by design, but if you want a color different from the available colors you can create the graph in VBA. Please click Help » Developer Kit (XDK) » Automation Guide for a friendly introduction to controlling @RISK with VBA. The Automation Guide contains sample code for generating reports, though not for setting colors.
For setting colors specifically, you need the CurveColor
method of the RiskGraph object. It's in the @RISK XDK Reference in the Help » Developer Kit (XDK) menu, but probably it's easier just to look at an example. Please take a look at the attached file, which is a modified form of our example spreadsheet found at Help » Developer Kit (XDK) » Examples » RISK XDK – Creating Graphs 2.xlsx. In this example, on the Model worksheet, click Run Simulation and then Distribution Graphs of Outputs. All of the graphs are placed on the Graphs1 worksheet, in a 5×4 array.
Press Alt+F11 to view the code, and look at the Graphs1 subroutine. Before calling the ImageToWorksheet
method, use CurveColor
to set the color of the curve. (CurveColor
takes an index argument to let you use different colors when a graph contains more than one curve.) RGB
is an Excel macro that lets you set red, green, and blue, in that order, to any value from 0 to 255 inclusive.
Last edited: 20150825
Applies to: @RISK 5.x–7.x
I'd like to compare several inputs and outputs by having several Browse Results windows on screen at the same time. Can I do that?
Here are two techniques.
METHOD A: Change the regular callout window for Browse Results to a floating window by clicking the icon at the lower right; see attached screen shot. You can then click Browse Results again and select another output or input.
METHOD B: Paste graphs into an Excel sheet. Chart in Excel creates a new worksheet for each graph, but you can place more than one graph — Browse Results or other graphs — in the same worksheet as follows:
Caution with @RISK 5.x/6.x: The pasted graphs will be correct in the Excel worksheet, but if you try to convert them to another format, such as PDF, you may lose details. See Pasted Graph Loses Some Details. @RISK 7.x uses a different technique and does not have this issue.
Last edited: 20170330
Applies to: @RISK 7.6
Issue: The use of the software causes the error: "Runtime error '91': Object Variable or with block variable not set"
After multiple testings from our end, we could confirm this application generates display issues in @RISK version 7.6 and crashes if the Browsing feature is enabled in the Browse Results window, however, those issues don’t show in version 8.x. So, to fix it you have three options:
Last Update: 20200427
Applies to: @RISK 6.x/7.x
I need a particular DPI (dots per inch) setting for publication. When I click Chart in Excel, the DPI doesn't seem to be one of the options. How can I set it?
Really this question is not so much about customizing the DPI or PPI setting, as it is about specifying the size of the image in pixels. Once you generate an image that's big in terms of the pixel width and height (and still sharp), you can change the DPI with a tool like Photoshop or the free Irfanview. If you don't want to install software you can use a Web page like Change DPI of Image. The DPI setting will tell the printer or publisher how big the printed image will be. But of course most pieces of software have other ways of specifying the printed size, without changing DPI. So DPI may not be the primary concern here.
The @RISK GUI (Graphical User Interface) doesn't have an option for specifying the sizes of images in pixels. This shouldn't be a big problem when handling one graph or a handful of them, since you can resize a picture in Excel manually and get one with a bigger pixel size that is as sharp as the original. This is generally true when you insert a raster/bitmap image into Excel—you resize it and it stays sharp, as if it was a vector image.
Attached is a sample @RISK graph that we resized in Excel, by dragging the corner, to get an image with about 2800x1900 pixel size. We then changed the DPI from 96 to 300 using the Web page mentioned above. You can see that the image is quite sharp.
If I can't specify image size in @RISK, can I do it in VBA?
Yes, you can do it in VBA (Visual Basic for Applications), if you have @RISK Professional or Industrial. Click Help » Developer Kit (XDK) » XDK Reference, and search for the ImageToFile method. The optional third and fourth arguments specify the width and height in pixels, with 600 × 400 as default.
Last edited: 20170222
Applies to:
@RISK 5 and 6
Question:
It seems that @RISK will only let me overlay 10 variables on my results graph. Is there any way to get more?
Response:
No, not as overlays. If you want more than 10 variables on one graph, you can do a Summary Trend graph to get key numbers from each distribution.
last edited: 20140620
Applies to: @RISK for Excel 5.x–7.x
I want to have several inputs or outputs overlaid on one graph, to be displayed automatically at the end of a simulation. How can I do it?
You can embed overlay graphs in your worksheet with the RiskResultsGraph( ) function. The graphs will be updated automatically when you run a simulation, and the latest versions will be stored with your workbook even if you don't store simulation results. Please download the attached example (about 130 KB).
To pull together multiple distributions in one overlaid graph, you need a contiguous set of cells (row or column), defined as an output range with a common name. If the cells you want to graph are in different parts of a worksheet, or even in different worksheets, you can create a range of contiguous cells that are set equal to the cells you actually want to graph, and then designate the range as an @RISK output. The example has four such ranges, in column C.
Some additional points about this example:
An alternative is available in @RISK Professional and Industrial releases 6.2 and newer, if you're willing to use Visual Basic for Applications. The GraphDistribution method takes an Arraytype argument that lets you specify noncontiguous cells for overlays. The Automation Guide, in the Help » Developer Kit (XDK) menu, introduces you to VBA programming and gives a couple of examples of that function; complete documentation is in the @RISK XDK Reference in the same menu.
Last edited: 20150714
Applies to: @RISK 7.x
(Several options are also available in earlier @RISK releases.)
How can I output an @RISK histogram and/or tornado graph so that someone without @RISK can see them?
There are several possibilities, but the basic idea is that if you put a graph in the workbook, it is permanently there and independent of @RISK, so that a colleague can see it even if they don't have @RISK. The graph will be static, in that changing numbers in the workbook won't change the graph. Most graphs give you a choice of Excel format or a picture. An Excelformat graph can respond to themes, and you can edit its axes or titles or change colors. A picture is just that, a static image.
Here are some methods to place graphs in your workbook:
Swap Out @RISK. In @RISK 7.0 and newer, you have the option to embed thumbnail graphs in the workbook.
Use VBA (requires @RISK 6.2 or newer, Professional or Industrial Edition). To get started, see the Automation Guide under Help » Developer Kit (XDK) in the @RISK menu. For an example, see Placing Graphs in an Existing Worksheet with VBA.
Use the RiskResultsGraph function. To access the function, click into an empty cell, type =RiskResultsGraph
and press Ctrl+A. The function has many arguments, so use the scroll bar at the right to see all of them. (Only the first two arguments are required.) For more complete help text, click the link at lower left, Help on this function.
Create your graph in Define Distributions, Browse Results, or another menu selection. Click the Edit and Export icon, which is near the left end of the row of tiny icons at the bottom of the graph window. Select Chart in Excel. In the Chart Setup dialog, choose either Excel Chart or Picture. The picture will be more faithful to the graph, but the Excel Chart option lets you use Excel themes and edit the properties of the generated graph.
Create your graph as before, then click Edit and Export and either Copy Graph or Copy Graph and Grid. That places the graph on the Windows clipboard as a picture, and you can paste it with Ctrl+V anywhere you like—into an Excel sheet, email, Word document, etc.
If you want the graph as a separate file, rather than embedded in an Excel sheet, click Edit and Export » Save Image File. You can choose from several image formats: BMP, JPG, PNG, and EMF.
See also: Sharing @RISK Models with Colleagues Who Don't Have @RISK
Last edited: 20170606
Applies to: @RISK 8.x
How can I create a scatter plot in @RISK using inputs that appear in different sheets of the same workbook?
In @RISK version 8, you can quickly create a scatter plot of two or more inputs by clicking Explore > Scatter Plot, and then adding cells to a dialogue box, note that it will be prefilled with cells with @RISK functions
There is another option to create scatter plots that allow you to choose inputs from different sheets. Click Explore > Results Summary to bring up a window that summarizes all the inputs and outputs in the model. Then you can select multiple inputs simultaneously from anywhere in the workbook and click the Explore button at the bottom of the window to create a scatter plot. The same method can be used to create other graph types such as a summary box plot as well.
Last edited: 20210729
Applies to: @RISK 6.x–8.x
@RISK has a graphing option known as a spider graph that shows how various inputs affect a given output. How can I reproduce this data in Excel?
The attached workbook gives an example of how to do this. Here are the basic steps for the calculations that create the shape of the graph.
Last edited: 20210304
Applies to: @RISK 5.x–7.x
In Advanced Sensitivity Analysis, on the Input Definition dialog, there is a check box, "Fix distribution to base value when not stepping". What does this mean?
You specify one output and one or more inputs in the Advanced Sensitivity Analysis dialog box. This check box matters only when you specify more than one input.
When multiple inputs are specified, Advanced Sensitivity Analysis begins with a set of simulations to determine the impact of the first input on the output. In each of those simulations, the first input has a particular value, which is one of the steps that you specified on the Input Definition screen. So for this first set of simulations as a group, we say that @RISK is stepping the first input.
Then Advanced Sensitivity Analysis continues with another set of simulations to determine the impact of the second input on the output. In this set, @RISK is stepping the second input. For each input, @RISK runs one simulation for each step you specified on the Input Definition screen for that input. After all the specified inputs have been stepped independently, @RISK prepares the sensitivity reports.
The question is, while @RISK is stepping a given input, what are all the other inputs doing? There are two possibilities:
The above applies only to inputs that are selected in the Advanced Sensitivity Analysis. During the simulations for that analysis, any @RISK inputs that are not selected as inputs in the Advanced Sensitivity Analysis dialog will vary randomly, just as they do during a regular simulation. You do have the option of locking any of them to prevent them from varying, but then you are doing an analysis without taking into account the uncertainties that you programmed into your model.
Last edited: 20150714
Applies to: @RISK 6.x/7.x, Professional and Industrial Editions
I need to run a Stress Analysis in @Risk. In the Option dialog, I have a choice of "Stress Each Input in Its Own Simulation" or "Stress All Inputs in a Single Simulation". If I choose the first option, what are the other inputs doing while @RISK is running those separate simulations? Do the other inputs run the full range of their distributions, or are they fixed to single numbers?
Either way, you get one simulation called the baseline, where all variables vary according to their distributions.
With "Stress Each Input in Its Own Simulation", you also get one simulation per designated stress input, where one input is stressed while the others vary according to their distributions.
With "Stress All Inputs in a Single Simulation", you get a total of two simulations, the baseline plus a second simulation where all inputs are stressed simultaneously. The two results are then compared.
Take a look at the attached example. A stress analysis is run with two stress ranges: Revenue (cell C3) is restricted to the lower 5% of its distribution, and Cost (C4) is restricted to the upper 5% of its distribution.
With "Stress Each Input in Its Own Simulation", you get three simulations:
With "Stress All Inputs in a Single Simulation", you get two simulations:
By the way, to prepare these graphs after running the Stress Analysis, we clicked on Revenue (cell C3) and then the Browse Results icon. Then we clicked the # icon in the row at the bottom to select each simulation in turn. Rightclicking on the graph and selecting Copy, we then pasted each graph into the worksheet.
Last edited: 20150714
Applies to: @RISK 4.x–7.x
Is there an @RISK function that will show the duration of a simulation?
All releases of @RISK show the simulation run time in the Quick Reports as "simulation duration".
In @RISK 6.x/7.x, place the function RiskSimulationInfo(2) in a worksheet cell, and after the simulation the cell will contain the simulation run time in seconds.
In @RISK 4.x/5.x, there's no specific @RISK function, but you capture the simulation run time in your worksheet as follows:
At the end of simulation, that cell will contain the number of seconds that the simulation took. (The 24*60*60 converts fractional days to seconds by multiplying by the number of hours in a day, minutes in an hour, and seconds in a minute.)
Additional keywords: SimulationInfo, simulation info
Last edited: 20150714
Disponible en español: Para simulaciones más rápidas
Disponível em português: Para simulações mais rápidas
Applies to: @RISK 5.x–8.x
Contents:
What can I do to speed up @RISK's performance?
Here's our list of things you can do within @RISK, and things you can do outside @RISK. The ones that make the biggest difference are marked in bold face.
How should I set up Excel?
For really big simulations, switch to 64bit Excel. All 32bit Excels are limited to 2 GB of RAM and virtual memory combined. 64bit Excel doesn't have that memory limit. (You need at least @RISK 5.7 if you have 64bit Excel. Please contact your Palisade sales manager if you need to upgrade.) Note: 64bit Excel lets you run larger simulations, but it is not intrinsically faster than 32bit Excel; please see Should I Install 64bit Excel? for more information about the tradeoffs.
Enable multithreaded calculations (Excel 2007 and newer). In Excel 2010, File » Options » Advanced » Formulas » Enable multithreaded calculations. In Excel 2007, click the round Office button and then Excel Options » Advanced » Formulas » Enable multithreaded calculations.
Note: Though this is a global Excel option, it can also be changed by opening a workbook where the option was set differently. Check the status of the option while your particular workbook is open.
If your computer is running Excel from a network, install Excel locally instead. This eliminates slowdown due to network traffic. (If you're running @RISK on a terminal server, this is not a problem because everything happens on the remote computer.)
To make Excel start faster, remove any unnecessary addins.
Remove the check mark from any addins that will not be needed during your @RISK session. The next time you load Excel and @RISK after doing this, any slowdown due to loading extra addins should be eliminated.
If you have Excel 2007, install the latest service pack, or upgrade to Office 2010 or later. Office 2007 Service Pack 1 improved Excel's speed and fixed some bugs; Service Pack 2 fixed further bugs and improved Excel's stability. After you install an Office 2007 Service Pack, run a repair by following these instructions: Repair of Excel or Project.
Follow Palisade's and Microsoft's suggestions in Getting Better Performance from Excel and Recommended Option Settings for Excel.
Any hardware suggestions?
Add RAM, unless your computer already has plenty. Insufficient RAM is probably the biggest single bottleneck on a simulation. Watch your harddrive usage light while a simulation is running. If it is constantly writing or reading information from disk during the simulation, you should consider increasing your system's memory. To estimate memory needs, see Memory Used by @RISK Simulations and Hardware Requirements or Recommendations.
Enable Turbo Boost, Turbo Core, Power Tune or similar if available on your computer. This is not overclocking (which we don't recommend). Turbo Boost and the others are technology built into some CPUs by Intel, AMD, and others to adjust processor speed dynamically, depending on your computing needs from moment to moment. Please consult your computer's documentation to learn whether you have this technology, how to find the current status, and how to enable it if it's not currently enabled..
What can I do in Windows?
For larger simulations, you may want to override the default page file size. See Virtual Memory Settings.
The temporary folder (%TEMP% environment variable) should be on the local computer, not in a network location. If you're not sure where it is, see Opening Your Temp Folder.
Clean out your temporary folder. See Cleaning Your Temp Folder. (This may also solve some problems with Excel crashing.)
Make sure to have plenty of free space on your disk. Applications and Windows itself get very slow if it doesn't have enough disk space. (Defragmenting your disk can't hurt, but in recent versions of Windows it's unlikely to have enough of an effect that you'd notice.)
Close other applications and background services, such as Windows Indexing Service. Other programs take CPU cycles from @RISK. Also, by taking up physical memory they may force Excel and @RISK to swap more information out to disk, which can really slow down a simulation.
Tell your antivirus program not to scan .XLS or .XLSX files. (Use this setting with caution if you run .XLS files that come to you from someone else.)
How should I structure my @RISK model?
In our experience, poorly structured models are the most common cause of poor performance. So it's worth spending time to structure your model efficiently.
If your RiskCompound( ) distributions contain only cell references, with the actual distributions in other cells, the simulation can run noticeably faster if you embed the actual severity distributions within RiskCompound( ). (This is not important for the frequency distributions, only the severity distributions.) The more RiskCompound( ) functions in your model, the more difference this will make; and the same is true if you have large frequencies in even a small number of RiskCompound( ) functions. See Combining Probability and Impact (Frequency and Severity) for more on RiskCompound( ).
Fix all invalid correlation matrices (nonselfconsistent matrices). If your @RISK distributions reference any invalid matrices, you'll have to answer a popup every time you simulate, and @RISK will have to take time to find valid matrices every time. The time to do this increases by a power of the number of rows in the matrix, so your simulation will take a lot of extra time if you have any medium to large correlation matrices that aren't valid. See How @RISK Tests a Correlation Matrix for Validity for how you can check matrix consistency, and How @RISK Adjusts an Invalid Correlation Matrix for how you can adjust an invalid matrix once and for all.
Remove extraneous elements from your model:
Eliminate linked pictures. If a workbook contains linked pictures, Excel's performance in updating cells can slow to a crawl. @RISK may appear to crash or hang, but actually it is just waiting for Excel to finish the cell updates.
If you have @RISK functions inside Excel tables, move them outside. For details, please see Excel Tables and @RISK.
Avoid unneeded INDIRECT, VLOOKUP, HLOOKUP, and similar functions. In our experience, these are rather slow, and if your model contains a lot of them it will definitely run slowly. VLOOKUP and HLOOKUP can be replaced with INDEX+MATCH functions. There are great resources on the Web, and you'll find them with this Web search:
excel "index function" "match function"
Don't save simulation results in your workbook, or if you do then clear them before starting the simulation. Saved results will cause Excel to take longer to recalculate each iteration; how much difference this makes depends on the size of the results. See Excel Files with @RISK Grow Too Large.
Open only the workbook(s) that are part of the simulation. During a simulation, in every iteration Excel recalculates all open workbooks. If you have extraneous workbooks open, it can slow down your simulation unnecessarily.
See also: Microsoft's article How to clean up an Excel workbook so that it uses less memory (applies to Excel 2013 and 2016).
What do you recommend for @RISK simulation settings?
General tab: Set Multiple CPU Support to "Automatic" or "Enabled" if you have dual core, quad core, etc. Starting with @RISK 5.5, this is available in all editions of @RISK, not just Industrial. If you have @RISK Professional or Standard, and you have a quad core or better, you will probably see significant speed improvements if you upgrade to Industrial.
In rare situations, if you have a large number of CPUs the overhead of the parallel processing might exceed the CPU cycles shared. Or, with all those CPUs sharing a fixed amount of RAM you may find that virtual memory gets used much more and the disk swaps slow down the simulation. In this case, reducing the number of CPUs available to @RISK may help. Unfortunately, there's no way to predict this, and you just have to experiment after you've tried the other tips. For instructions, please see CPUs Used by @RISK 7.x or CPUs Used by @RISK 4.x–6.x.
Simulations with Microsoft Project cannot use multiple CPU. If your simulation settings have Multiple CPU Support: Enabled, it is automatically changed to Disabled when you click Start Simulation on a Project simulation.
View tab: Deselect Demo Mode. Uncheck Update Windows During Simulation. Uncheck Show Excel Recalculations.
Sampling tab:
Convergence tab: Consider enabling convergence testing. If you are running more iterations than necessary, you're just wasting simulation time. On the other hand, testing convergence itself involves some minor overhead. Try convergence testing and see if the simulation converges in significantly less time than you were before. If so, you leave convergence testing turned on; otherwise, go back to your fixed number of iterations. (When you enable convergence testing, also set the number of iterations to "Auto" on the General tab and select "Latin Hypercube" on the Sampling tab.)
With convergence monitoring, by default, the simulation will stop after 50,000 iterations even if not all outputs have converged. More Than 50,000 Iterations to Converge explains how you can override that limit.
What can the progress window tell me during simulation?
Take a look at the number of iterations per second. It should increase during the first part of the simulation, and then stay steady, assuming no other heavyweight Windows programs start up.
But sometimes, if Excel doesn't have focus, the number of iterations per second will gradually fall, as the simulation runs slower and slower. In this case, give focus to Excel by clicking once in the title bar of the Excel window. You should see the number of iterations gradually rise to its former level.
This doesn't always happen, and it's not clear exactly what interaction between Excel and Windows causes it when it does happen, but giving focus to Excel usually reverses a falling iteration rate. (If that doesn't work, try giving focus to the simulation progress window by clicking in its title bar.)
What about using @RISK with projects?
This applies to @RISK 6.x/7.x only, Professional and Industrial Editions.
Upgrade to the latest @RISK if you have @RISK 6.0. The accelerated engine introduced in @RISK 6.1 makes many simulations with projects run dramatically faster, and there were further improvements in later versions.
Use the accelerated engine. In Project » Project Settings » Simulation, ensure that the simulation engine is set to automatic, and @RISK will then use the accelerated engine if your model is compatible with it. See the topic "Simulation Engine" in the @RISK help file for a list of fields that are compatible with the accelerated engine.
If you have experience with @RISK 4, you may have used probabilistic branching. This is intrinsically time consuming because of the changes that have to be made to the predecessor/successor relationships each iteration, and reset prior to the next iteration. In @RISK 6.x/7.x, these issues are magnified by the communication between Microsoft Excel and Microsoft Project. To incorporate risk events, consider a risk register rather than probabilistic branching. For examples, click Help » Example Spreadsheets » Project Management.
On the Project Settings » Simulation tab, if you don't need the information for Calculate Critical Indices, Calculate Statistics for Probabilistic Gantt Chart, and Collect Timescaled Data, uncheck those boxes.
On the Project Settings » Simulation tab, set Date Range for Simulation to "Activities After Current Project Date" or "Activities After Project Status Date". This will make your simulation run faster because @RISK won't simulate tasks that have already completed.
Don't reimport .MPP files. You only need to import the .MPP file once, and store the Excel workbook when @RISK prompts you. After that, in @RISK don't open the .MPP file directly. When you open the Excel workbook associated with your project, @RISK will automatically connect to the linked .MPP file and use any changes to update the workbook. This takes much less time than reimporting from scratch.
What settings do you recommend in Microsoft Project?
If the project is on a network drive, copy it to your C: drive or another local drive (optimally, a local SSD drive) before opening it.
Zero out margin spans.
Set future constraints to ASAP.
Remove all deadline dates.
Check for negative slack and unstatused tasks, and correct any issues.
See also: For Faster Optimizations
Last edited: 20200728
Applies to:
@RISK 6.x/7.x, Professional and Industrial Editions
@RISK for Project, all releases
I recently upgraded Microsoft Project 2003 to a newer version, and my simulations seem to take longer to run. Do I need to change some setting?
Recalculation speed has changed between versions of Microsoft Project, and this impacts the run times of @RISK simulations. Why? Because for each iteration of a simulation @RISK must fully recalculate Microsoft Project.
Recalculations are fastest in Microsoft Project 2003 and slowest in Microsoft Project 2007. Microsoft Project 2010 is an improvement over 2007, but still is substantially slower than Microsoft Project 2003. However, Project 2010 offers many new features over Project 2003, and Project 2003 can't support @RISK 7.x. If you have large projects in which simulation run time is an issue, use the fastest possible hardware configuration.
How do Excel and Project 2013 and 2016 compare to 2010? Benchmarking Windows programs is problematic, because there are so many variables, not only different hardware but different Windows configurations, different programs running in background, and so forth — not to mention different @RISK models. We ran tests with 10,000 iterations of our Parameter Entry Table example from Help » Example Spreadsheets. We used @RISK 7.5.2 in 32bit Excel and Project 2010, 2013, and 2016, on 64bit Windows 8, with a 2.8 GHz i7 chip and 8 GB of RAM. We offer our results as anecdotal evidence; they may or may not apply to your system, or your model. And obviously the Parameter Entry Table example is a small one, only eight tasks, so any real project is going to take significantly longer to run.
With those caveats, here is what we found in that example with that system:
Average Times in Seconds  

Excel and Project versions  2010 32bit  2013/2016 32bit 
Standard Engine  255 s  199 s 
Accelerated Engine  34 s  56 s 
Multiple runs of one Excel/Project version showed little variation. Differences between Excel/Project 2013 and Excel/Project 2016 were not significant. 
The accelerated engine is available when @RISK distributions and outputs are in just a few commonly used fields of Project; the standard engine allows distributions and outputs in any Project field.
How does our test system compare to your system? Almost everyone has 64bit Windows. There's more of a split between 32bit and 64bit Office, but the majority have 32bit Office. Switching to 64bit Office will not increase simulation speed for most @RISK models.
See also: For Faster Simulations
Last edited: 20180305
Applies to: @RISK 7.x
(If you have an older @RISK, see CPUs Used by @RISK 4.x–6.x.)
How many CPUs (cores or processors) do @RISK and RISKOptimizer use?
When you click Start Simulation, by default @RISK estimates how long a simulation will take and uses one or more CPUs to complete the simulation as quickly as possible.
If for any reason you want to limit @RISK to only one core when simulating or optimizing this workbook, open Simulation Settings and, on the General tab, change Multiple CPU to Disabled.
@RISK recognizes as a "CPU" anything that Windows recognizes as a CPU. To find the number of CPUs in your computer, press CtrlShiftEsc to open Task Manager, then select the Performance tab. Real CPUs should make a major improvement in speed of large simulations, but hyperthreaded CPUs will give only modest speed improvement.
Multithreading, as opposed to multiple CPUs, is an Excel option, and you should generally turn it on in any edition of @RISK. See For Faster Simulations and Recommended Option Settings for Excel.
Can I limit the number used by @RISK, thus leaving some CPUs (cores) available for other programs? If @RISK decides to use only some cores, can I tell it to use more?
The default simulation setting of Multiple CPU — "Automatic" beginning with 7.5, "Enabled" in 7.0 — tells @RISK to decide the optimum number of CPUs. To tell @RISK to use only one CPU when simulating this workbook, go into Simulation Settings and change Multiple CPU Support to Disabled. To specify a number of CPUs greater than 1, the mechanism is different between @RISK 7.5 and @RISK 7.0.
Number of CPUs in @RISK 7.5 and newer:
Click Simulation Settings. On the General tab, look at the third setting, Multiple CPU Support. You have three options:
In earlier releases of @RISK, your setting for Multiple CPU Support applied only to simulations. Beginning with @RISK 7.5, it also applies to optimizations with RISKOptimizer.
The System Registry values RiskUseMultipleCores, ForceMultiCore, and NumCPU, and the Excel name _AtRisk_SimSetting_MaxCores, are no longer used in @RISK 7.5, and will be ignored if they are set.
Number of CPUs in @RISK 7.0:
To tell @RISK to use a certain number of CPUs, define a workbooklevel name, RiskUseMultipleCores.
On Excel's Formulas tab, click Name Manager. If the name RiskUseMultipleCores already exists, click it and click Edit; otherwise click New and enter that name. The value can be any of the following:
If you define the name RiskUseMultipleCores in a workbook, it overrides the Multiple CPU setting (Enabled or Disabled) in Simulation Settings when that workbook is open.
The System Registry values ForceMultiCore and NumCPU, and the Excel name _AtRisk_SimSetting_MaxCores, are no longer used in @RISK 7.0, and will be ignored if they are set.
Additional keywords: Number of cores, multiple cores, how many cores, how many CPUs
Last edited: 20171005
Applies to:
@RISK 5.5, 5.7, and 6.x, all editions
@RISK 4.x and 5.0, Industrial Edition only
RISKOptimizer, releases 1.x and 5.x
(If you have @RISK 7, see CPUs Used by @RISK 7.x.)
What is the maximum number of CPUs (cores or processors) that @RISK and RISKOptimizer will use? Can I limit the number used by @RISK, thus leaving some CPUs (cores) available for other programs? Is there any other reason to limit the number of CPUs used?
@RISK recognizes as a "CPU" anything that Windows recognizes as a CPU. To find the number of CPUs in your computer, press CtrlShiftEsc to open Task Manager, then select the Performance tab. Real CPUs should make a major improvement in speed of large simulations, but hyperthreaded CPUs will give only modest speed improvement.
Multithreading, as opposed to multiple CPUs, is an Excel option, and you should generally turn it on in any edition of @RISK. See For Faster Simulations and Recommended Option Settings for Excel.
@RISK uses a heuristic to guess how long a simulation will take. If @RISK judges that the overhead of starting multiple copies of Excel would outweigh the time saved through parallel processing, it will use only one core even if you have enabled Multiple CPU. For much more about this, please see Multiple CPU — Only One CPU Runs.
With larger simulations,
Optimum number of CPUs
Up to around four, more CPUs is almost always better. Beyond that, at some point you can actually have too many CPUs. You can reach a point where CPUs are starved for RAM and have to use virtual memory, which means relatively slow disk operations instead of fast operations in real memory. Or if you have a lot of CPUs in a simulation, the overhead can swamp the savings and a simulation can actually take longer. To some extent, determining the optimum number is a matter of experimentation, because it depends on the size of your model, the Memory Used by @RISK Simulations, and the available RAM in your computer.
You can get an idea of an appropriate number of CPUs for this model and the amount of RAM in your computer. Follow the process in Memory Used by @RISK Simulations to determine how much memory your simulation needs. Take the amount of RAM in your computer, subtract what's used by Windows and other programs, and divide by the amount of RAM used in a singleCPU simulation. You don't want to use more CPUs than that, though it might still be more efficient to use fewer.
Limiting the number of CPUs used
You can do this via a System Registry key or by defining a special name in Excel. If you do both, in @RISK 6.2 or 6.3, @RISK will use the workbook name and ignore the Registry key.
Either way, if your Simulation Settings have Multiple CPU set to Disabled, @RISK will use just one CPU.
Registry setting (all releases 4.x–6.x)
If you want to have @RISK Industrial use multiple CPUs, but not all the CPUs in your computer, you can do this by editing the System Registry:
When you enable Multiple CPU in Simulation Settings, @RISK will not use more than the number of CPUs specified in the System Registry. (If you actually have fewer CPUs in your computer, @RISK will just use the ones it finds.)
Workbook setting (@RISK 6.2 and 6.3)
If you can't edit the System Registry or prefer not to, create a name _AtRisk_SimSetting_MaxCores and set it to the desired maximum.
Notes:
Additional keywords: Number of cores, multiple cores, how many cores, how many CPUs
Last edited: 20181026
Applies to: @RISK for Excel 5.x–7.x
How much memory is used during a simulation?
@RISK saves the values of each output, each input (unless you have changed the default on the Sampling tab of Simulation Settings), and each cell referred to by a statistics function such as RiskMean( ) or RiskPtoX( ). The memory required is 8 bytes per value per iteration per simulation. However, to avoid overflowing 32bit Excel's limited memory space (below), @RISK pages data to disk as needed.
@RISK needs additional memory for its own code and for data other than the iterations of simulation inputs and outputs. To get an idea of overall memory requirements for your simulation:
In Simulation Settings » General, change Multiple CPU to Disabled and run a simulation with the number of iterations unchanged.
When the @RISK progress window shows iterations being run, open Task Manager (Ctrl+Shift+Esc) and look in the Commit Size column to see how much memory Excel.exe is using.
You can then shut down the simulation with the "stop" button in the progress window.
When you reenable Multiple CPU, the master CPU will use about this much and each worker CPU will use somewhat less.
When I disable Smart Sensitivity Analysis, my simulation starts faster, but does it also reduce memory use?
Yes and no. After running a Smart Sensitivity Analysis, @RISK saves the results of the precedent tracing but frees the memory used for the trace. So there is no appreciable memory saving once the simulation starts.
However, if your model is large and complicated enough, @RISK could run out of memory during the process of tracing precedents. In that case, turning off Smart Sensitivity Analysis will bypass precedent tracing and the associated outofmemory condition.
I have heard that Excel has a memory limit of 2 GB. Does @RISK have such a limit?
Well, sort of. 64bit Excels have effectively no limit to memory space. The part of @RISK that runs in the Excel process shares in this. The part of RISK that is separate executables, such as the model window and progress window, used to be subject to the 2 GB limit, but as of @RISK 7.5.2 those executables are Large Address Aware (next paragraph).
As for 32bit Excel, it's complicated. Historically, every 32bit process, including 32bit Excel, was limited to 2 GB of address space. However, during the year 2017, updates to Excel 2013 and 2016 gave 32bit Excel the ability to access 4 GB of memory space when running in 64bit Windows, or 3 GB in 32bit Windows. See Large Address Aware in Should I Install 64bit Excel?
If you are using multiple processors, then each Excel process has a separate memory limit, so in 32bit Excel the overall simulation can use up to 2 GB (or 3 or 4 GB) times the number of processors. Add to that whatever is used by executables whose names start with Pal or Risk. If you want to limit the number of processors used by a simulation, please see CPUs Used by @RISK.
All the above is subject to additional constraints. Not all the RAM in your computer is available to Excel and @RISK: the operating system and other running applications need some as well. You should make certain that you've allocated enough virtual memory. On the Processes tab of Task Manager, you can see how much memory is in use by which processes.
Does @RISK take advantage of 64bit Excel?
The great majority of simulations run just fine in 32bit Excel and @RISK and do not see significant benefit from switching to a 64bit platform. If your simulation generates gigabytes of data, and you have enough RAM to hold it all, you may see some benefit. Please see Should I Install 64bit Excel? for more information.
See also: "Out of Memory" and "Not enough memory to run simulation" for techniques to reduce the memory used.
Last edited: 20180212
Applies to: @RISK 5.x–7.x
Does @RISK take advantage of CUDA functionality, using the GPU (graphics processing unit) in addition to the main CPU to increase simulation speed? As I understand, the graphic card CPUs are very good at parallel processing, which is what is needed to increase simulation speed.
CUDA is one type of GPGPU (generalpurpose computation on graphics processing units), and is specific to NVidia GPUs. AMD has a different scheme, called OpenCL.
In a typical simulation, most of the compute power is used not by @RISK but by Excel, in recalculating all open workbooks for each iteration. And as of this writing (July 2017), Excel versions up through Excel 2016 don't use GPGPU. @RISK 5.x–7.x do use multiple threads, to try to use all CPU resources available, but not GPGPU. There are few calculations within @RISK itself that could benefit from GPGPU.
We will continue to reevaluate this issue as technology advances.
Last edited: 20170728
Applies to:
@RISK 6.x/7.x, Industrial Edition
What are the VBA objects and methods for Time Series fitting? I'd like to automate my fitting process.
Unfortunately, there is no VBA interface in the @RISK XDK for Time Series. This may be added in a future release, but for now Time Series can be done only through the user interface.
Last edited: 20161003
Applies to:
@RISK 5.x–7.x (Professional and Industrial Editions)
Evolver 5.x–7.x
NeuralTools 5.x–7.x
PrecisionTree 5.x–7.x
StatTools 5.x–7.x
You can set up VBA macros (macros written in Visual Basic for Applications) to automate these programs or to access their object model without depending on worksheet functions. To do this, you must tell the Visual Basic editor where to find the definitions of objects; this is known as setting references.
Therefore, if your VBA code needs to access objects, properties, and methods that are part of Palisade software, you must set references to one version of whichever Palisade tool contains the objects you need. Typically this comes up when you want to control @RISK or another application, for instance by setting simulation options, running a simulation, or fitting a distribution. On the other hand, if you just want @RISK to execute your code before or after every iteration or simulation, and your code doesn't directly access any @RISK objects, you don't need to set references in VBA.
To set references:
References are stored in the workbook when you click Save.
When you doubleclick a workbook that has references set, or open such a workbook through File » Open in Excel, the indicated Palisade software will open automatically, if it's not already running.
Release 7.x (using "7.x" as an abbreviation for 7.0, 7.5, or 7.6 as appropriate):
If you share a workbook with someone who has a different 7.x release number, the reference will adjust automatically on that person's computer. If they edit the workbook and send it back to you, the reference will again adjust automatically to match your computer. This works within 7.x versions, but between 5.x, 6.x, and 7.x you must change the reference manually.
Automation Guides are included with the Professional and Industrial Editions of @RISK, Evolver, NeuralTools, and PrecisionTree. The Automation Guides introduce you to VBA programming in general and automating Palisade software in particular. To access an Automation Guide, click Help » Developer Kit (XDK) » Automation Guide.
Release 6.x (using "6.x" as an abbreviation for 6.0, 6.1, 6.2, or 6.3 as appropriate):
If you share a workbook with someone who has a different 6.x release number, the reference will adjust automatically on that person's computer. If they edit the workbook and send it back to you, the reference will again adjust automatically to match your computer. This works within 6.x versions, but between 5.x, 6.x, and 7.x you must change the reference manually.
Beginning with release 6.2, Automation Guides are included with the Professional and Industrial Editions of @RISK, Evolver, NeuralTools, and PrecisionTree. The Automation Guides introduce you to VBA programming in general and automating Palisade software in particular. To access an Automation Guide, click Help » Developer Kit (XDK) » Automation Guide.
Release 5.x (using "5.x" as an abbreviation for 5.0, 5.5, or 5.7 as appropriate):
See also: Using VBA to Change References to @RISK.
last edited: 20170208
Applies to:
@RISK 5.x–7.x, Professional and Industrial Editions
Evolver 5.x–7.x
NeuralTools 5.x–7.x
PrecisionTree 5.x–7.x
StatTools 5.x–7.x
We wrote a bunch of automation code for @RISK (Evolver, NeuralTools, PrecisionTree, or StatTools) release 5 or 6. Now we've upgraded to release 7, and all the references in all our workbooks need to be updated. Is there any kind of automated solution, or do we have to make a lot of mouse clicks in every single workbook?
For the problem at hand, you could write a macro to delete the obsolete references and add the new ones; see the references below. You could put that macro in a separate workbook, then have it available for people to run when references in @RISK model workbooks need to be updated. The problem is that there are two prerequisites for executing such code: you need to tick "Trust access to the VBA project object model" in Excel's Trust Center settings, and you need to set a reference to Microsoft Visual Basic for Applications Extensibility. These can't be done programmatically and must be done by hand.
There's significant risk with "Trust access to the VBA project object model". That lets workbook macro code do pretty much anything, and if you unknowingly download and open a malicious workbook you'll have a serious security breach on your hands. (See also Enable or disable macros in Office documents.) This kind of risk is one reason why we don't offer automatic code to adjust the references.
See also:
Are there any programming practices we can follow so that we're not in this position again, when we upgrade from version 7 to version 8?
We have a couple of suggestions. One possibility is late binding, where you don't have references set in the workbooks but instead connect to the @RISK (Evolver, ...) object model at run time. While this preserves maximum flexibility, you lose the benefit of Intellisense (autocomplete of properties, tool tips for function arguments, and so forth) during code development. To learn more about late binding, in your Palisade software click Help » Developer Kit (XDK) » Automation Guide. Look near the end for the topic "Demand Loading @RISK" ("Demand Loading Evolver", ...).
If the workbooks have mostly the same macro code, another possibility is to move your macros to one workbook. In effect, you write your own addin to @RISK. Then when references have to be updated you can do it only once, and redistribute the updated workbook. If you have enough commonalities, this will also reduce your maintenance burden — if any kind of problem is discovered in macro code, it can be fixed once, with no need to try to find all the workbooks that contain the problem code.
Last edited: 20151229
Applies to: @RISK 5.0 and newer, Professional and Industrial Editions
How can I generate a random sample within a VBA macro or function?
Use the Sample method with the Risk object. Here's an example:
x = Risk.Sample("RiskBinomial(10,0.2)")
The Sample method normally returns a numeric value, but if there's an error in the definition of the distribution then the method returns an error variant in the usual way for Excel.
The sampled values are not the same numbers you would see from that function in a worksheet. They always use the Monte Carlo method, as opposed to Latin Hypercube; RiskCorrmat and RiskSeed are ignored. If you want to access simulation data, use members of the Risk.Simulation.Results object after the simulation finishes.
To call @RISK functions from Visual Basic, you must set up a reference from Visual Basic Editor to @RISK via Tools » References in the editor. Setting References in Visual Basic gives the appropriate reference(s) and how to set them.
Please see the XDK or Developer Kit manual for details on the objects and methods mentioned in this article, as well as alternative methods. (Beginning with @RISK 6.2, start with the Automation Guide for a highlevel introduction: Help » Developer Kit (XDK) » Automation Guide.)
Am I restricted to just numeric arguments, or can I use cell references?
Yes, you can use cell references:
x = Risk.Sample("RiskBinomial(A1,B1)")
The cell references must be in A1 format, not R1C1, and they are taken to refer to the active worksheet. If you don't want to worry about which sheet is active, specify the worksheet or use defined names:
x = Risk.Sample("RiskBinomial('My Sheet'!A1,'My Sheet'!B1)")
x = Risk.Sample("RiskBinomial(BinomialN,BinomialP)")
I want to sample a RiskDiscrete with a long list of x and p. How can I use cell references?
It follows the pattern of Cell References in Distributions. Here's an example:
x = Risk.Sample("RiskDiscrete('My Sheet'!A1:A10,'My Sheet'!B1:B10)")
As an alternative, in the worksheet you can define names for the arrays, and then use the names in the Risk.Sample function:
x = Risk.Sample("RiskDiscrete(Xarray,Parray)")
Can I write the sampled value to my workbook?
Yes, just use Excel's Value property. You can apply it to a specific cell or to a defined range name:
Range("B1").Value = Risk.Sample("RiskBinomial(A1,A2)")
Range("myKeyLocation").Value = Risk.Sample("RiskBinomial(A1,A2)")
If the Risk.Sample method returns an error such as #VALUE, that will be written to the worksheet. This will not register as a VBA error that interrupts execution of your macro.
See also:
Last edited: 20180228
Applies to: @RISK 6.x/7.x, Professional and Industrial Editions
(@RISK Standard Edition does not support automation.)
How can I write Visual Basic for Applications code to automate several independent simulations? I want to simulate the files one at a time, not all at once.
This is easy to do with the @RISK and Excel object models. Just open the first workbook, call Risk.Simulation.Start, and close the workbook. An example is attached. It is set up for @RISK 7.x, but you can change the references in the Visual Basic Editor and run it in @RISK 6.x as well.
The Automation Guide that was introduced in 6.2.0 is a good introduction to automating @RISK with VBA. but it's not intended to document the complete object model. For methods and properties not mentioned in the Automation Guide, consult the XDK Reference, which is also found in the @RISK help menu.
Last edited: 20151218
Applies to: @RISK 5.x–7.x
Can I access @RISK worksheet functions in Visual Basic?
To call @RISK functions from Visual Basic, you must set up a reference from Visual Basic Editor to @RISK via Tools » References in the editor. Please see Setting References in Visual Basic for the appropriate reference and how to set it.
Please see the XDK or Developer Kit manual for details on the methods mentioned here, as well as alternative methods. (Beginning with @RISK 6.2, start with the Automation Guide for a highlevel introduction: Help » Developer Kit (XDK) » Automation Guide.)
How can I retrieve simulation data, in a way similar to the RiskData( ) worksheet function?
Use the GetSampleData method to fill an array with the simulated data. Here's an example:
numSamples = _
Risk.Simulation.Results.GetSimulatedOutput("MyOutput"). _
GetSampleData(sampleData, True)
This fills the VBA array sampleData with all the data from the named output, and returns the number of samples. (Although this example shows getting data from an output, you can also use GetSampleData with GetSimulatedInput.)
How can I get the statistics of a simulated input or output, such as a simulated mean or percentile?
Use Mean, Percentile, or a similar property of the RiskSimulatedResult object. Here's an example:
MsgBox "The mean of MyOutput is " & _
Risk.Simulation.Results.GetSimulatedOutput("MyOutput").Mean
(Again, you could also use this technique with GetSimulatedInput to get statistics of a simulated input.)
See also: Sampling @RISK Distributions in VBA Code to get random numbers from an @RISK distribution without running a simulation.
Last edited: 20180228
Applies to:
@RISK 6.2 and newer, Professional and Industrial Editions
I want to set up my worksheet so that I can use different distributions depending on a code. I've got a bunch of formulas like this:
=IF(C47=1,RiskBinomial(D47,E47), IF(C47=2,RiskPert(F47,G47,H47), IF(C47=3,RiskLognorm(I47,J47), RiskTriang(K47,L47,M47))))
Is there any reason not to do it this way? Is there an alternative that might be more efficient?
There are several reasons why IFs in the worksheet are not the best way to model a choice of distribution. You'll have spurious entries in your Model Window, your Simulation Data window and report, etc. You'll also see error values for each distribution in all the iterations where it's not selected. Also, having four times as many distributions will definitely slow down your simulation, but whether it will slow it down by enough to matter depends on how many distributions there are, what the rest of your model looks like, and how many iterations you've chosen.
A quickanddirty possibility is to wrap such formulas inside a RiskMakeInput function. It's quick to do, though it does add another layer and it doesn't address the efficiency issue. But at least it gets rid of the spurious data collection. For the formula above, a RiskMakeInput would look like this:
=RiskMakeInput( IF(C47=1,RiskBinomial(D47,E47), IF(C47=2,RiskPert(F47,G47,H47), IF(C47=3,RiskLognorm(I47,J47), RiskTriang(K47,L47,M47))))
RiskMakeInput is very powerful and has many uses. For some examples, see Combining Inputs in a Sensitivity Tornado; Excluding an Input from the Sensitivity Tornado; Same Input Appears Twice in Tornado Graph. See also: All Articles about RiskMakeInput.
Probably a cleaner approach is to move that logic into a macro, where it is executed once only. The attached example contains such a macro, linked from a button in the worksheet.
For the sake of illustration, this worksheet is set up with a choice of seven distributions: triangular (RiskTriang and RiskTrigen), Pert (RiskPert), uniform (RiskUniform), normal (RiskNormal), lognormal (RiskLognorm), and Johnson (RiskJohnsonMoments). In column K, you specify which distribution to use for each risk. The parameters are in columns B through J, and cells N2:O2 give the row numbers to be handled by the macro.
When you click the worksheet button, the macro looks at each entry in column K and writes the appropriate distribution and parameters in column L. The macro includes a RiskName property function referring to the risk name given in column A. If any of the cells in column K contain incorrect distribution names, the macro displays an error message; otherwise, it runs a simulation. If you want to run further simulations without changing distributions, click the Start Simulation button in @RISK or click the button in the worksheet, but you must use the worksheet button after changing any distributions in column K.
Last edited: 20180220
Applies to: @RISK 5.x and newer
I have written a function in Visual Basic code, and I use that function in formulas in my Excel sheet. When a simulation is running the function seems to work, but when a simulation is not running my worksheet displays #VALUE. What is wrong?
In @RISK 5.0 and above, during a simulation the @RISK distribution functions return a single number of type Double. But when a simulation isn't running, the @RISK distribution functions return an array, of which the first element is the random number drawn by the function. (This change from 4.x was made to support the RiskTheo statistics functions, among other reasons.)
Therefore, your own function needs to declare the argument as a Variant, not a Double, and it needs to test the type of the argument at run time. Please see the accompanying example.
Last edited: 20150812
Applies to: @RISK For Excel, all releases
I have a macro set to run between iterations, on the Macros tab of @RISK Simulation Settings. That macro uses Excel Solver or does something else that triggers an Excel recalculation, but then the @RISK functions all get resampled. How can I hold the @RISK functions constant while my macro runs?
Solution (beginning with @RISK 7.5):
You may be able to use a pointandclick interface in Simulation Settings instead of writing VBA code. On the Macros tab of Simulation Settings, select "Excel Tool" instead of "VBA Macros". This will let you choose to run Excel Goal Seek, Excel Solver, or Palisade Evolver during each iteration. For Evolver or Solver, you have to set up the model in advance, but for Goal Seek you can enter the settings right in the Macros tab. If you prefer, or if your situation is more complicated, you can still use VBA and set the recalculation option, as described in the next section.
Solution (beginning with @RISK 6.2):
There's an important option in Simulation Settings. If you have any macros that trigger Excel recalculations, and those macros get executed during a simulation, open Simulation Settings and on the Macros tab select the option "If Excel Recalculations Occur during Macros, Distributions Return" » "Fixed Samples". Click OK and save the workbook. @RISK will remember this setting with all the other simulation settings in this workbook.
See the attached example KB187 for newer @RISK.
Caution: When you select Fixed Samples, @RISK will return the same value from a given distribution function every time it is called within one iteration — provided that your macro code doesn't change the parameters of the distribution. If the macro does change the argument values for an @RISK distribution function, @RISK will return a new sample for that distribution function.
Solution (@RISK 6.1 and earlier):
This is exactly the requirement: The @RISK functions must not change their values during the extra worksheet recalculations. If the @RISK functions resample, the model will not remain static during the processing of the macro, and Solver will be trying to hit a moving target. To demonstrate this problem, try running Excel Solver on a model where the objective calculation is dependent on a "=RAND()" Excel function. You will see that the objective calculation is a moving target and the Excel Solver optimization will not converge on an optimum solution.
To prevent @RISK functions from resampling when your macro triggers a recalc, ensure that no @RISK functions are precedents of any cells that are affected by your Excel Solver optimization. For example, suppose you have an a @RISK function in cell A1