{"id":505,"date":"2024-03-14T05:27:03","date_gmt":"2024-03-14T05:27:03","guid":{"rendered":"https:\/\/sites.rutgers.edu\/yasai\/?page_id=505"},"modified":"2024-05-07T13:10:38","modified_gmt":"2024-05-07T13:10:38","slug":"user-guide","status":"publish","type":"page","link":"https:\/\/sites.rutgers.edu\/yasai\/user-guide\/","title":{"rendered":"User Guide"},"content":{"rendered":"<div>\n<div>\n<h1>Version 3.0 User Guide<\/h1>\n<h3>Jonathan Eckstein, with assistance from Sohum Sanghvi<\/h3>\n<h3>June 2019 (Security Detail Updates October 2022)<\/h3>\n<hr \/>\n<p>&nbsp;<\/p>\n<h3>About Yasai<\/h3>\n<p>The YASAI.XLA add-in is intended is intended for teaching elementary Monte Carlo simulation. It does not provide all of the functionality of <a href=\"http:\/\/www.palisade.com\/risk\/default.asp\">@Risk<\/a>, <a href=\"http:\/\/www.decisioneering.com\/\">Crystal Ball<\/a>, and other commercial products, but should be sufficient for teaching purposes.\u00a0 It also has some features that commercial produces lack.\u00a0 A key advantage is that YASAI.XLA consists of a single downloadable file that can be run on any PC or Mac with a recent version of Excel, without requiring administrator privileges. It is also designed to be very straightforward to use. In exchange for this simplicity, YASAI may run simulations slower than commercial products, since all the random number generation code is interpreted in Visual Basic.<\/p>\n<hr \/>\n<p>&nbsp;<\/p>\n<h3>Downloading and Installing Yasai<\/h3>\n<p><strong>Downloading (All Browsers and Operating Systems)<\/strong><\/p>\n<ol>\n<li>Download the YASAI.XLA file from <a href=\"https:\/\/sites.rutgers.edu\/yasai\/downloads\/\">the &#8220;Downloads&#8221; page on the YASAI website<\/a>.\u00a0 <strong>Do not let your browser open the file directly in Excel. <\/strong>\u00a0Instead simply save the file somewhere convenient (the default folder is usually &#8220;Downloads&#8221;)<\/li>\n<li>Some browsers may rename the YASAI.XLA file to YASAI.XLS.\u00a0 If this occurs, manually change the name back to YASAI.XLA before proceeding with the remainder of these instructions.<\/li>\n<li>If necessary, move the YASAI.XLA file to some location where you will not inadvertently delete it.<\/li>\n<\/ol>\n<p><strong><br \/>\nSecurity Policy Adjustments<\/strong><\/p>\n<p>Excel has become increasingly security minded over the years.\u00a0 Before attempting to install YASAI, please make the following adjustments.\u00a0 The following directions are for Windows, but the procedure for Macs should be similar.<\/p>\n<ol>\n<li>Launch Excel.<\/li>\n<li>Click the &#8220;FILE&#8221; tab above the ribbon.<\/li>\n<li>Click the &#8220;Options&#8221; button at the lower left of the window.<\/li>\n<li class=\"auto-style1\">Click &#8220;Trust Center&#8221; on the left of the resulting Options dialog box.<\/li>\n<li class=\"auto-style1\">Click the &#8220;Trust Center Settings&#8230;&#8221; button.<\/li>\n<li class=\"auto-style1\">If this option is available, select &#8220;Trusted Locations&#8221; on the left panel (if this option is not available, skip to step 9)<\/li>\n<li class=\"auto-style1\">Click the &#8220;Add New Location&#8230;&#8221; button.<\/li>\n<li class=\"auto-style1\">In the resulting dialog box, enter or browse to the location of the folder containing YASAI.XLA, and click &#8220;OK&#8221;.<\/li>\n<li class=\"auto-style1\">Click &#8220;Macro Settings&#8221; on the left panel.<\/li>\n<li class=\"auto-style1\">Check &#8220;Trust access to the VBA project object model&#8221;<\/li>\n<li class=\"auto-style1\">Optionally, click the radio button for &#8220;Enable VBA macros (not recommended&#8230;) &#8212; in principle, it should not be necessary, but sometimes appears to be.<\/li>\n<li class=\"auto-style1\">Click &#8220;OK&#8221;.<\/li>\n<\/ol>\n<p><strong><br \/>\nInstallation for Windows Excel 2013\/2016\/365<\/strong><\/p>\n<ol>\n<li>Launch Excel.<\/li>\n<li>Perform the security policy adjustments listed above.<\/li>\n<li>Click the &#8220;FILE&#8221; tab above the ribbon.<\/li>\n<li>Click the &#8220;Options&#8221; button at the lower left of the window.<\/li>\n<li class=\"auto-style1\">Click &#8220;Add-Ins&#8221; on the left of the resulting Options dialog box.<\/li>\n<li class=\"auto-style1\">Select &#8220;Excel Add-Ins&#8221; in the pull-down menu at the bottom of the dialog box, and then push the adjacent &#8220;Go&#8230;&#8221; button.<\/li>\n<li>You will now be at the &#8220;Add-Ins&#8221; dialog box (the add-in manager).<\/li>\n<li>Click the &#8220;Browse&#8221; in the resulting dialog box, locate the YASAI.XLA file you saved, select it, and click &#8220;OK&#8221;.<\/li>\n<li>Select &#8220;OK&#8221; to exit the add-in manager.<\/li>\n<\/ol>\n<p>YASAI should now be loaded.\u00a0 An &#8220;Add-Ins&#8221; pane should appear in the ribbon interface.\u00a0 On this pane, there should be a button labeled &#8220;YASAI&#8221;.\u00a0 If you click it,several options should appear, starting with &#8220;Simulation&#8230;&#8221;.\u00a0 If the currently visible Excel object is a chart rather than a worksheet, the first option in the YASAI button should instead be &#8220;Charts&#8230;&#8221; and there will be only two options.<\/p>\n<p>Installation procedures for older versions Windows Excel are generally similar.\u00a0 You find the add-in manager and then browse to find YASAI.XLA.<\/p>\n<p><strong>Installation for Mac Excel 2011<\/strong><\/p>\n<ol>\n<li>Launch Excel<\/li>\n<li>From the &#8220;Tools&#8221; menu in the menu bar, select &#8220;Add-Ins&#8221;<\/li>\n<li>The add-in manager dialog box should appear.\u00a0 Click &#8220;Select&#8221;, locate the YASAI.XLA file you saved, select it, and click &#8220;OK&#8221;.<\/li>\n<li class=\"auto-style1\">Click &#8220;OK&#8221; to exit the add-in manager.<\/li>\n<\/ol>\n<p>YASAI should now be loaded.\u00a0 A new menu &#8220;YASAI&#8221; should appear in the menu bar, with the options &#8220;Simulation&#8230;&#8221;, &#8220;Charts&#8230;&#8221;, and so forth.\u00a0 If the currently visible Excel object is a chart rather than a worksheet, the first option in the YASAI button should instead be &#8220;Charts&#8230;&#8221; and there will be only two options.<\/p>\n<p><strong>Installation for Mac Excel 2016<\/strong><\/p>\n<ol>\n<li>Launch Excel<\/li>\n<li>From the &#8220;Tools&#8221; menu in the menu bar, select &#8220;Excel Add-Ins&#8221;<\/li>\n<li>The add-in manager dialog box should appear.\u00a0 Click &#8220;Browse&#8221;, locate the YASAI.XLA file you saved, select it, and click &#8220;OK&#8221;.<\/li>\n<li class=\"auto-style1\">Click &#8220;OK&#8221; to exit the add-in manager.<\/li>\n<\/ol>\n<p>YASAI should now be loaded.\u00a0 However, its options may not appear until you open a new workbook.\u00a0 The next time you open a workbook, you should see an &#8220;Add-Ins&#8221; pane in its ribbon.\u00a0 Within this pane should be five new popup buttons, the first of which should be &#8220;YASAI_Simulation&#8221;.\u00a0 If the currently visible Excel object is a chart rather than a worksheet, there should be only two new buttons, the first of which should be &#8220;YASAI_Charts&#8221; and there will be only two options.<\/p>\n<p><strong>Upgrading from Earlier versions of YASAI<\/strong><\/p>\n<p>If you are upgrading from an earlier version of YASAI, just follow the same installation instructions above.\u00a0 After selecting the YASAI.XLA file in the add-in manager and clicking &#8220;OK&#8221;, you may see a message that &#8220;a file with the same already exists in the same location&#8221; and asking whether you wish to replace it.\u00a0 Click &#8220;Yes&#8221;.<\/p>\n<hr \/>\n<p>&nbsp;<\/p>\n<h3>YASAI Functions for Generating Random Variables<\/h3>\n<p>YASAI provides Excel functions that return random numbers with specified distributions. They will generally return different, randomly chosen values every time you recalculate a spreadsheet. The currently available random number generation functions are:<\/p>\n<p><strong>GENUNIFORM<\/strong> (<i>a<\/i>, <i>b<\/i>): Both arguments are numbers. Normally, it is expected that <i>a<\/i> &lt; <i>b<\/i>. If so, a random number uniformly distributed over the interval [<i>a<\/i>, <i>b<\/i>)\u00a0 &#8212; that is, <i>x<\/i> such that <i>a<\/i> <u>&lt;<\/u> <i>x<\/i> &lt; <i>b<\/i> &#8212; is returned. If <i> a<\/i> = <i>b<\/i>, then the value <i> a<\/i> (or equivalently <i>b<\/i>) is returned. If <i>a<\/i> &gt; <i>b<\/i>, an error value is returned.<\/p>\n<p><strong>GENNORMAL<\/strong> (<i>m<\/i>, <i>s<\/i>): Both arguments are numbers. If <i>s<\/i> &lt; 0, an error value is returned. If <i>s<\/i> is zero, the return value is <i>m<\/i>. Otherwise, a random value with a normal distribution with mean <i> m<\/i> and standard deviation <i>s<\/i> is returned.<\/p>\n<p><strong>GENBINOMIAL<\/strong> (<i>n<\/i>, <i>p<\/i>): The first argument <i>n<\/i> must be a nonnegative integer, and the second argument <i>p<\/i> must be a number in the range [0, 1]. Otherwise, an error value is returned. If these conditions are met, then the return value is an integer drawn randomly from a binomial distribution with <i>n<\/i> trials and probability <i>p<\/i> of success at each trial. If <i>n<\/i> = 0, then the return value is always 0. The implementation is efficient even when n is large.<\/p>\n<p><strong>GENPOISSON<\/strong> (<i>m<\/i>): The argument <i>m<\/i> is a nonnegative number. A negative argument causes an error value to be returned. A zero argument causes zero to be returned. Otherwise, the return value is randomly chosen from a Poisson distribution with mean value <i>m<\/i>. The implementation is efficient even when m is large.<\/p>\n<p><strong>GENTABLE<\/strong> (<i>V<\/i>, <i>P<\/i>): The arguments <i>V<\/i> and <i>P<\/i> are blocks of cells or lists (an example of a list is &#8220;{1,3,7}&#8221;) having the same number of cells.\u00a0 Essentially, the function returns each value in <i>V<\/i> with the probability specified by the corresponding element in <i>P<\/i>.\u00a0 If the two arguments have the same number of cells but differing numbers of rows and columns, the correspondence is determined by scanning first across the first row, then across the second row, and so forth.\u00a0 Non-numeric entries in <i>P<\/i> are treated as if they were zero.\u00a0 If the two arguments do not have the same number of cells, or if <i> P<\/i> contains any negative numbers, or if <i> P<\/i> contains only zeroes, an error value is returned.\u00a0 If the values in <i>P<\/i> do not sum to 1, they are rescaled proportionally so that they do.\u00a0 For example, GENTABLE({1,2,3},{.2,.5,.3}) returns 1 with probability 0.2, 2 with probability 0.5, and 3 with probability 0.3.<\/p>\n<p><strong>GENEXPON<\/strong> (<i>a<\/i>): The argument must be a positive number, or an error value is returned. If the argument is positive, the return value is randomly chosen from an exponential distribution with mean value 1\/<i>a<\/i>.<\/p>\n<p><strong>GENGEOMETRIC<\/strong> (<i>p<\/i>):\u00a0 Returns a geometric random variables with a probability <i>p<\/i> of being 1.\u00a0 This variable is equal to the number of trials of a mean <i>p<\/i> Bernoulli (or equivalently, GENBINOMIAL(1,<i>p<\/i>)) variable until the value 1 is obtained.\u00a0 The value of <i>p<\/i> must be greater than 0 and less than or equal to 1, or an error value is returned.<\/p>\n<p><strong>GENTRIANGULAR<\/strong> (<i>a, b, c<\/i>):\u00a0 Returns a value from a triangular distribution with minimum <i>a<\/i>, mode <i>b<\/i>, and maximum <i>c<\/i>.\u00a0 The arguments must be numbers with the property <i>a<\/i> <u>&lt;<\/u> <i>b<\/i> <u>&lt;<\/u> <i>c<\/i>, or an error value is returned.<\/p>\n<p><strong>GENLOGNORMAL<\/strong> (<i>m<\/i>, <i>s<\/i>): Generates a lognormal random variable, and is equivalent to exp(GenNormal(<em>m<\/em>, <em> s<\/em>)).\u00a0 The restrictions on the arguments are the same as for GENNORMAL.<\/p>\n<hr \/>\n<p>&nbsp;<\/p>\n<h3>Specifying Scenarios<\/h3>\n<p>In YASAI, decision variables are called <em>parameters<\/em>.\u00a0 For each possible value combination for the parameters, YASAI obtains a sample, recording the values of all the output variables.\u00a0\u00a0 YASAI provides the function SIMPARAMETER(<i>L<\/i>, <i>name, <\/i><em>group<\/em>) to specify each parameter:<\/p>\n<ul>\n<li>The first argument, <i>L<\/i>, is a block of cells or a list specifying the possible return values.<\/li>\n<li>The <i>name<\/i> argument is a character string describing the parameter, and is used only in the output reports.\u00a0 If it is omitted, its value is taken from the cell containing the formula &#8212; for example, if the SIMPARAMETER function is in cell C12, the default name of the parameter is &#8220;C12&#8221;<\/li>\n<li>The <em>group<\/em> argument is optional and defaults to 1 if omitted.\u00a0 It may be any whole number between 1 and 20 (values outside this range produce an error value).\u00a0 For simplicity, all parameters within the same group should have the same number of values in <em>L<\/em>.<\/li>\n<\/ul>\n<p>Parameters with the same group number vary in &#8220;lock step&#8221; with one another: suppose the only two cells with SIMPARAMETER functions contain<\/p>\n<ul>\n<li>SIMPARAMETER({10, 2, 6, 4}, &#8220;Bill&#8221;, 1)<\/li>\n<li>SIMPARAMETER({1.2, 1.5, 1.8, 2.3}, &#8220;Nancy&#8221;, 1)<\/li>\n<\/ul>\n<p>Then YASAI will try the following four combinations of parameter values:<\/p>\n<ul>\n<li>Bill=10\u00a0\u00a0 Nancy=1.2<\/li>\n<li>Bill=2\u00a0\u00a0\u00a0\u00a0 Nancy=1.5<\/li>\n<li>Bill=6\u00a0\u00a0\u00a0\u00a0 Nancy=1.8<\/li>\n<li>Bill=4\u00a0\u00a0\u00a0\u00a0 Nancy=2.3<\/li>\n<\/ul>\n<p>If two parameters have different group numbers, YASAI will try all possible combinations of their values. For example, suppose that the SIMPARAMETER calls are<\/p>\n<ul>\n<li>SIMPARAMETER({23.1, 24.2, 27.1}, &#8220;Bruce&#8221;, 1)<\/li>\n<li>SIMPARAMETER({-10, 20}, &#8220;Adam&#8221;, 2)<\/li>\n<\/ul>\n<p>Then YASAI will try the six parameter combinations<\/p>\n<ul>\n<li>Bruce=23.1\u00a0\u00a0 Adam=-10<\/li>\n<li>Bruce=24.2\u00a0\u00a0 Adam=-10<\/li>\n<li>Bruce=27.1\u00a0\u00a0 Adam=-10<\/li>\n<li>Bruce=23.1\u00a0\u00a0 Adam=20<\/li>\n<li>Bruce=24.2\u00a0\u00a0 Adam=20<\/li>\n<li>Bruce=27.1\u00a0\u00a0 Adam=20<\/li>\n<\/ul>\n<p>You can combine the two techniques: YASAI tries all possible choices of the parameter selections that are in different groups, but parameters within the same group move in &#8220;lock step&#8221;. For example, suppose that a model has the following SIMPARAMETER functions:<\/p>\n<ul>\n<li>SIMPARAMETER({1, 2, 3}, &#8220;Fred&#8221;, 1)<\/li>\n<li>SIMPARAMETER({100, 170, 200}, &#8220;George&#8221;, 1)<\/li>\n<li>SIMPARAMETER({1000, 2000}, &#8220;Amy&#8221;, 2)<\/li>\n<\/ul>\n<p>Then YASAI will test the following parameter combinations:<\/p>\n<ul>\n<li>Fred=1\u00a0\u00a0 George=100\u00a0\u00a0 Amy=1000<\/li>\n<li>Fred=2\u00a0\u00a0 George=170\u00a0\u00a0 Amy=1000<\/li>\n<li>Fred=3\u00a0\u00a0 George=200\u00a0\u00a0 Amy=1000<\/li>\n<li>Fred=1\u00a0\u00a0 George=100\u00a0\u00a0 Amy=2000<\/li>\n<li>Fred=2\u00a0\u00a0 George=170\u00a0\u00a0 Amy=2000<\/li>\n<li>Fred=3\u00a0\u00a0 George=200\u00a0\u00a0 Amy=2000<\/li>\n<\/ul>\n<p>Older versions of YASAI provided a different function, called PARAMETER, for specifying parameters.\u00a0 This function was similar to SIMPARAMETER, but it made testing combinations of parameter values from multiple lists more complicated.\u00a0 You may find a description of the PARAMETER function in <a href=\"http:\/\/www.yasai.rutgers.edu\/yasai-guide-21.html\">earlier versions of the user guide<\/a>.<\/p>\n<p>It is not recommended that you mix SIMPARAMETER and PARAMETER specifications in the same model.\u00a0 If you do, however, all parameters specified with PARAMETER are treated as being in group 1.<\/p>\n<p>&nbsp;<\/p>\n<hr \/>\n<p>&nbsp;<\/p>\n<h3>Specifying Output<\/h3>\n<p>To specify an output of the simulation, use the formula SIMOUTPUT(<i>x<\/i>, <i>name<\/i>): This function returns the value <i>x<\/i>. During simulation runs, the values of <i>x<\/i> encountered are saved for later analysis, as described below. The argument name is a character string to describe the output in the simulation reports. For example a cell containing =SIMOUTPUT(A4+B7,&#8221;Profit&#8221;) defines an output called &#8220;Profit&#8221; whose value is A4+B7.<\/p>\n<p>If you omit the <i>name<\/i> argument, YASAI uses the position of the current cell (for example, &#8220;G12&#8221;) as the output name. If you enable the &#8220;Simulate all sheets&#8221; option (see the next section) and omit the <i>name<\/i> argument, then YASAI includes the sheet name in the output name (for example, &#8220;Sheet1!G12&#8221;).<\/p>\n<p>If you explicitly give two or more outputs the same name, then YASAI will merge the sample data for those outputs into one larger sample.<\/p>\n<hr \/>\n<p>&nbsp;<\/p>\n<h3>Running the Simulation<\/h3>\n<p>Once you have built your model, specified scenarios (if any), and specified outputs, you can run your simulation. To do so, select &#8220;YASAI Simulation&#8221; from the Tools menu. This will cause the following dialog box to appear:<\/p>\n<p align=\"center\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-538 size-full\" src=\"http:\/\/sites.rutgers.edu\/yasai\/wp-content\/uploads\/sites\/1177\/2024\/03\/simform30.jpg\" alt=\"\" width=\"739\" height=\"331\" srcset=\"https:\/\/sites.rutgers.edu\/yasai\/wp-content\/uploads\/sites\/1177\/2024\/03\/simform30.jpg 739w, https:\/\/sites.rutgers.edu\/yasai\/wp-content\/uploads\/sites\/1177\/2024\/03\/simform30-300x134.jpg 300w\" sizes=\"(max-width: 739px) 100vw, 739px\" \/><\/p>\n<p>YASAI analyzes your spreadsheet to determine how many scenarios appear to be needed.\u00a0 It places this number in the default number of scenarios box.\u00a0 If this number is satisfactory, select the &#8220;Default&#8221; button.\u00a0 If you would like a different number of scenarios, click on the &#8220;set to&#8221; button and enter the number of scenarios you want.<\/p>\n<p>The &#8220;Sample Size&#8221; box is the number of times YASAI will recalculate your model for each scenario.\u00a0 It defaults to 1000, but you can enter any positive whole number.<\/p>\n<p>The random number seed determines the sequence of pseudorandom numbers that YASAI generates. Optionally, you may indicate a fixed random number seed to use. If you specify a random number seed, YASAI should produce the same results every time you run a model, so long as you do not make changes to its formulas. If you leave the random number seed blank, YASAI will construct a seed from the system clock, and your simulation results will be different each time you run a model. If you check the &#8220;Use same random number seed for each scenario&#8221; option, YASAI resets the seed to the same value at the beginning of each scenario (this resetting is generally good practice because it reduces the variability of results between different scenarios, and is the default).<\/p>\n<p>The &#8220;Simulate all sheets&#8221; option controls the extent of recalculations that YASAI performs during the simulation. If the option is unchecked (the default), each sample point in the simulation will be obtained by recalculating the currently active sheet of the currently active workbook. If you check &#8220;Simulate all sheets&#8221;, then each sample point will be obtained through a full recalculation of all sheets of all currently open workbooks. Such recalculations could be much slower than recalculating single sheets, so you should only use this option if your model uses multiple sheets. If you have multiple YASAI workbooks open simultaneously and perform a simulation with &#8220;Simulate all sheets&#8221; checked, all open workbooks will effectively be merged into a single larger model, and the simulation results will show combined results from this merged model. Therefore, you should typically have only one workbook open when selecting &#8220;Simulate all sheets&#8221;. A warning dialog box will appear if you check &#8220;Simulate all sheets&#8221; when multiple workbooks are open.<\/p>\n<p>The &#8220;Dump internal simulation data&#8221; option (a new feature as of version 3.0) which outputs the entire sample data for every SIMOUTPU variable into a separate spreadsheet ply. When this option is checked, the simulation will run first, and the simulated values for each variable and scenario will be inserted into a a new worksheet.<\/p>\n<p>If you use SIMPARAMETER on more than one sheet of your currently open workbooks, the default number of scenarios may change when you check or uncheck &#8220;Simulate all sheets&#8221;.<\/p>\n<p>Once you have selected your simulation options, press &#8220;Simulate&#8221; to run the simulation, or &#8220;Cancel&#8221; to return to Excel.<\/p>\n<p>When you run the simulation, YASAI will recalculate the results <i>S<\/i> times for each combination of parameter values, where <i>S<\/i> is the selected sample size. If there are <i>N<\/i> combinations of parameter values, the total number of model recalculations will be <i>NS<\/i>.<\/p>\n<p>A &#8220;progress&#8221; display indicates how quickly the simulation is progressing.\u00a0 When the simulation is over, there will be a short delay while the outputs are processed. The output report is automatically placed in a new sheet named &#8220;Simulation Output <i>n<\/i>&#8220;, which YASAI inserts into the current workbook. YASAI makes this report the current sheet and then returns control to Excel. For each output-scenario combination, the report contains the mean, standard deviation, minimum, maximum, and percentiles in 5% intervals. Currently there are no graphics or other output data, although improvements are planned for later versions.<\/p>\n<hr \/>\n<p>&nbsp;<\/p>\n<h3>Aborting a Simulation<\/h3>\n<p>You can abort a YASAI simulation while it is running by clicking on the &#8220;Abort&#8221; button, or simply by pressing the escape key on your keyboard. It may take up to 5 seconds for the simulation to abort.\u00a0 The abort function may not work on Mac Excel 2016.<\/p>\n<hr \/>\n<p>&nbsp;<\/p>\n<h3>Testing a Model Interactively<\/h3>\n<p>To test a model interactively, simply press the F9 key. Excel will perform a single recalculation, drawing new values for all the random variable generation functions. New values will also be generated for each PARAMETER function call (but in a predictable cyclic pattern). F9 is equivalent to fully recalculating all open workbooks. To recalculate only the currently active sheet, use Shift-F9 (or Fn-F9 on Mac systems).<\/p>\n<hr \/>\n<p>&nbsp;<\/p>\n<h3>Charting Simulation Output<\/h3>\n<p>As of version 2.0, YASAI can produce charts of simulation outputs.\u00a0 You must run simulation before trying to produce charts.\u00a0 To make a chart, select &#8220;Charts&#8230;&#8221; from the YASAI menu (or the &#8220;YASAI_Charts&#8221; button in Mac Excel 2016), which produces a charting dialog box):<\/p>\n<p align=\"center\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-535 size-full\" src=\"http:\/\/sites.rutgers.edu\/yasai\/wp-content\/uploads\/sites\/1177\/2024\/03\/chartform27.jpg\" alt=\"\" width=\"475\" height=\"349\" srcset=\"https:\/\/sites.rutgers.edu\/yasai\/wp-content\/uploads\/sites\/1177\/2024\/03\/chartform27.jpg 475w, https:\/\/sites.rutgers.edu\/yasai\/wp-content\/uploads\/sites\/1177\/2024\/03\/chartform27-300x220.jpg 300w\" sizes=\"(max-width: 475px) 100vw, 475px\" \/><\/p>\n<p>You may chart up to five blocks of outputs, each corresponding to one row in the window.\u00a0 The first column selects which variables to chart.\u00a0 The second and third columns allow you to specify a range of scenarios for the selected variable, for example scenarios 1 through 5; a graph for each scenario in the range will appear in the output.\u00a0 The last column selects the kind of graph desired for the block of variables: &#8220;Histogram&#8221; is a standard bar chart, and &#8220;Cumulative plot&#8221; produces empirical cumulative distributions.\u00a0 You may mix the two kinds of graphs on a single chart.\u00a0 With the &#8220;automatic&#8221; button set under &#8220;Chart Range&#8221; YASAI chooses the horizontal axis range and subdivisions to attempt to produce an attractive chart.\u00a0 &#8220;Manual&#8221; lets you specify a range from &#8220;Min&#8221; to &#8220;Max&#8221;, with &#8220;Buckets&#8221; subdivisions.<\/p>\n<p>YASAI charts are regular Excel charts.\u00a0 Once they have been created, you may modify them to suit your needs.\u00a0 The chart and its associated data each become a new worksheet ply, with the names &#8220;Chart Output <i>n<\/i>&#8221; and &#8220;Chart Data <i>n<\/i>&#8220;, repsectively.\u00a0 You may delete these sheets if they are no longer needed.\u00a0 YASAI charts are also &#8220;static&#8221; &#8212; they are based on the simulation immediately preceding their creation; if you run another simulation of the same model, they will not automatically update.\u00a0 You must run a simulation again and make new charts if you want your charts to reflect a change to your simulation model.<\/p>\n<p>Due to internal limitations in Excel, cumulative graphs are not possible for outputs with more than 32,760 observations.\u00a0Histograms are possible for any sample size.\u00a0 Histograms are not available when using Mac Excel 2011, due to a bug in that version of Excel.\u00a0 Cumulative charts are available in all versions.<\/p>\n<hr \/>\n<h3>Show Min\/Max Scenarios<\/h3>\n<p>As of version 3.0, YASAI can highlight minimum and maximum scenarios in the simulation output sheet. To use this functionality, select a cell of the simulation report containing the name of the simulation output variable for which you want to find the minimum or maximum average value for and then select the &#8220;Show Min Scenario&#8221; or &#8220;Show Max Scenario&#8221; menu item, as appropriate (in Mac Excel 2016, these respectively appear as &#8220;YASAI_Min_Highlight&#8221; or &#8220;YASAI_Max_Highlight&#8221; buttons in the add-in pane; in other versions they are under the &#8220;YASAI&#8221; popup in the add-ins pane).\u00a0 This feature allows for quick identification of the best scenario without having to manually scan through the output report.<\/p>\n<hr \/>\n<p>&nbsp;<\/p>\n<h3>Hypothesis Testing<\/h3>\n<p>As of version 3.0, YASAI can run hypothesis tests to evaluate whether the differences between sample means of various outputs appears to be statisticaically significant.<\/p>\n<p>After running a simulation, select &#8220;Hypothesis Test&#8230;&#8221; from the YASAI menu (in Mac Excel 2016, select the &#8220;YASAI_Hypothesis_Test&#8221; popup in the add-ins pane). Select a variables and scenarios for the pair of variables you wish to compare, as below.<\/p>\n<p align=\"center\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-536\" src=\"http:\/\/sites.rutgers.edu\/yasai\/wp-content\/uploads\/sites\/1177\/2024\/03\/hyptest30.jpg\" alt=\"\" width=\"471\" height=\"254\" srcset=\"https:\/\/sites.rutgers.edu\/yasai\/wp-content\/uploads\/sites\/1177\/2024\/03\/hyptest30.jpg 471w, https:\/\/sites.rutgers.edu\/yasai\/wp-content\/uploads\/sites\/1177\/2024\/03\/hyptest30-300x162.jpg 300w\" sizes=\"(max-width: 471px) 100vw, 471px\" \/><\/p>\n<p>The appropriate test is selected based on your preferences for random number generation in your simulation. If you opted to use the same random number seed for each scenario (the default option) in the simulation menu, or the two variables are from the same scenario, then a paired <em>t<\/em>-test will be run. If not, YASAI will use a non-paired <em>t<\/em>-test for unequal variances. After running the hypothesis test, a new sheet is created, which shows the 1-tailed and 2-tailed <em>p<\/em>-values from running the appropriate hypothesis test.\u00a0 Additionally, the sheet shows all the observations for each the two variable-scenario pairs tested, which may be convenient for performing further analysis.<\/p>\n<p>Generally speaking, small <em>p<\/em>-values mean that the the differences between the observed means of the two compared variables are very unlikely to have resulted from pure chance, whereas large <em>p<\/em>-lvalues means that the observed outcome was more likely to have arisen by chance.\u00a0 The smaller the <em>p<\/em>-values, the more statistically significant is the difference between the variables&#8217; sample means.<\/p>\n<hr \/>\n<p>&nbsp;<\/p>\n<h3>Known Problems<\/h3>\n<p><strong>Updating Links<\/strong><br \/>\nExcel uses a system of &#8220;links&#8221; to match user-defined functions (like those defined by YASAI) to their source files.\u00a0 These links contain absolute filename paths, which often creates problems when moving files from one computer to another.\u00a0 Generally speaking, you should just press the &#8220;continue&#8221; or &#8220;ignore links&#8221; or &#8220;don&#8217;t update links&#8221; button if Excel asks you if you want to &#8220;edit links&#8221; or &#8220;update links&#8221;.\u00a0 Link-related problems have become less severe in recent years, but are still an occasional irritant.\u00a0 If link updating fails, your spreadsheet formulas may contain strange-looking strings like &#8220;!&#8217;C:Users\\JoeUser\\&#8230;\\YASAI.xla&#8217;:&#8221;.\u00a0 If you delete these strings manually or with Excel&#8217;s &#8220;Replace&#8221; function, YASAI should start working normally again.<\/p>\n<p><strong>YASAI appears in the menu bar or ribbon, but the all YASAI spreadsheet functions evaluate to &#8220;#NAME!&#8221;<\/strong><br \/>\nExcel&#8217;s security settings may be preventing YASAI from running. First, try select &#8220;Simulation&#8230;&#8221; from the YASAI item in the add-ins menu: in recent versions of Excel, simply activating the simulation dialog box is often enough to clear the &#8220;#NAME&#8221; errors. If not, you should modify Excel&#8217;s security settings to let YASAI run. If you see an &#8220;Enable content&#8221; button between the worksheet grid and the ribbon, try clicking it. If the problem persists, use the Excel Trust Center settings to enable macros.<\/p>\n<p>After taking these steps, it may be necessary in some cases to place the cursor in each cell displaying as &#8220;#NAME&#8221; and hit the &#8220;enter&#8221; key to get Excel to properly reevaluate the formula and display a proper value.<\/p>\n<p><strong>Simulating Only the Current Workbook<\/strong><br \/>\nThe &#8220;Simulate all sheets&#8221; option recalculates all currently open workbooks. If it is not checked, each simulation point is obtained by recalculating only the currently active sheet. In some cases, it might be preferable to recalculate all sheets of the currently active workbook, but not sheets from other open workbooks. Unfortunately, Excel does not provide the functionality necessary to implement such recalculations; this is a longstanding internal limitation of Excel. If you have a single model that uses more than one sheet, you should generally close all other workbooks before running your simulation.<\/p>\n<h4>Known Problems Specific to Mac Systems<\/h4>\n<p>Developing VBA applications is much more difficult for Mac Excel than for Windows Excel, and VBA does not behave identically on Windows and Excel platforms.\u00a0 Therefore there are a number of issues that affect only Mac users:<\/p>\n<p><strong>Mac Excel 2008<br \/>\n<\/strong>Mac Excel 2008 does not support Visual Basic, so it is impossible to use YASAI with it.<br \/>\n<strong><br \/>\nMac Excel Performance<\/strong><br \/>\nWhile YASAI supports Mac Excel 2011 and 2016, simulation performance can sometimes be poor. Excel 2016 performance seems to have improved as software updates have been released. If you use Mac Excel 2016, make sure it is recently updated.<\/p>\n<p><strong>Charts in Mac Excel 2011<\/strong><br \/>\nDue to an apparent bug in Mac charting, histogram charts are not available when using Mac Excel 2011.\u00a0 Cumulative charts are available on all platforms, including Mac Excel 2016.<\/p>\n<p><strong>Dumping Data Message in Mac Excel 2011<\/strong><br \/>\nWhen creating the output report at the end fo the simulation in Mac Excel 2011, a message saying &#8220;dumping internal data&#8221; may be visible even if &#8220;dump internal simulation data&#8221; option was not selected.\u00a0 This message is typically visible for only a very brief time.<\/p>\n<p><strong>Aborting in Mac Excel 2016<\/strong><br \/>\nThe abort function may not work in Mac Excel 2016.<\/p>\n<p><strong>Delayed Appearance of Add-Ins Pane in Mac Excel 2016<\/strong><br \/>\nWhen you install YASAI in Mac Excel 2016, the add-ins pane and YASAI buttons may not appear for the current workbook. However, they will appear for all subsequently opened workbooks.<\/p>\n<p><strong>Mac Excel 2016 Location of Opened Worksheets<\/strong><br \/>\nDuring testing of Mac Excel 2016, it has been observed that newly opened worksheets may appear with their windows at the extreme edge of the screen, usually just barely visible the extreme lower right corner.\u00a0 At present it is not clear if this is due to YASAI or just a strange behavior of Mac Excel 2016.<\/p>\n<hr \/>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Version 3.0 User Guide Jonathan Eckstein, with assistance from Sohum Sanghvi June 2019 (Security Detail Updates October 2022) &nbsp; About Yasai The YASAI.XLA add-in is intended is intended for teaching &hellip; <a href=\"https:\/\/sites.rutgers.edu\/yasai\/user-guide\/\" class=\"\">Read More<\/a><\/p>\n","protected":false},"author":3356,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"footnotes":""},"class_list":["post-505","page","type-page","status-publish","hentry"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v23.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>User Guide - YASAI Simulation<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/sites.rutgers.edu\/yasai\/user-guide\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"User Guide - YASAI Simulation\" \/>\n<meta property=\"og:description\" content=\"Version 3.0 User Guide Jonathan Eckstein, with assistance from Sohum Sanghvi June 2019 (Security Detail Updates October 2022) &nbsp; About Yasai The YASAI.XLA add-in is intended is intended for teaching &hellip; Read More\" \/>\n<meta property=\"og:url\" content=\"https:\/\/sites.rutgers.edu\/yasai\/user-guide\/\" \/>\n<meta property=\"og:site_name\" content=\"YASAI Simulation\" \/>\n<meta property=\"article:modified_time\" content=\"2024-05-07T13:10:38+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/sites.rutgers.edu\/yasai\/wp-content\/uploads\/sites\/1177\/2024\/03\/simform30.jpg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"21 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/sites.rutgers.edu\/yasai\/user-guide\/\",\"url\":\"https:\/\/sites.rutgers.edu\/yasai\/user-guide\/\",\"name\":\"User Guide - YASAI Simulation\",\"isPartOf\":{\"@id\":\"https:\/\/sites.rutgers.edu\/yasai\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/sites.rutgers.edu\/yasai\/user-guide\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/sites.rutgers.edu\/yasai\/user-guide\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/sites.rutgers.edu\/yasai\/wp-content\/uploads\/sites\/1177\/2024\/03\/simform30.jpg\",\"datePublished\":\"2024-03-14T05:27:03+00:00\",\"dateModified\":\"2024-05-07T13:10:38+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/sites.rutgers.edu\/yasai\/user-guide\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/sites.rutgers.edu\/yasai\/user-guide\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/sites.rutgers.edu\/yasai\/user-guide\/#primaryimage\",\"url\":\"https:\/\/sites.rutgers.edu\/yasai\/wp-content\/uploads\/sites\/1177\/2024\/03\/simform30.jpg\",\"contentUrl\":\"https:\/\/sites.rutgers.edu\/yasai\/wp-content\/uploads\/sites\/1177\/2024\/03\/simform30.jpg\",\"width\":739,\"height\":331},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/sites.rutgers.edu\/yasai\/user-guide\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/sites.rutgers.edu\/yasai\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"User Guide\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/sites.rutgers.edu\/yasai\/#website\",\"url\":\"https:\/\/sites.rutgers.edu\/yasai\/\",\"name\":\"YASAI Simulation\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/sites.rutgers.edu\/yasai\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"User Guide - YASAI Simulation","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/sites.rutgers.edu\/yasai\/user-guide\/","og_locale":"en_US","og_type":"article","og_title":"User Guide - YASAI Simulation","og_description":"Version 3.0 User Guide Jonathan Eckstein, with assistance from Sohum Sanghvi June 2019 (Security Detail Updates October 2022) &nbsp; About Yasai The YASAI.XLA add-in is intended is intended for teaching &hellip; Read More","og_url":"https:\/\/sites.rutgers.edu\/yasai\/user-guide\/","og_site_name":"YASAI Simulation","article_modified_time":"2024-05-07T13:10:38+00:00","og_image":[{"url":"http:\/\/sites.rutgers.edu\/yasai\/wp-content\/uploads\/sites\/1177\/2024\/03\/simform30.jpg"}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"21 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/sites.rutgers.edu\/yasai\/user-guide\/","url":"https:\/\/sites.rutgers.edu\/yasai\/user-guide\/","name":"User Guide - YASAI Simulation","isPartOf":{"@id":"https:\/\/sites.rutgers.edu\/yasai\/#website"},"primaryImageOfPage":{"@id":"https:\/\/sites.rutgers.edu\/yasai\/user-guide\/#primaryimage"},"image":{"@id":"https:\/\/sites.rutgers.edu\/yasai\/user-guide\/#primaryimage"},"thumbnailUrl":"http:\/\/sites.rutgers.edu\/yasai\/wp-content\/uploads\/sites\/1177\/2024\/03\/simform30.jpg","datePublished":"2024-03-14T05:27:03+00:00","dateModified":"2024-05-07T13:10:38+00:00","breadcrumb":{"@id":"https:\/\/sites.rutgers.edu\/yasai\/user-guide\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/sites.rutgers.edu\/yasai\/user-guide\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/sites.rutgers.edu\/yasai\/user-guide\/#primaryimage","url":"https:\/\/sites.rutgers.edu\/yasai\/wp-content\/uploads\/sites\/1177\/2024\/03\/simform30.jpg","contentUrl":"https:\/\/sites.rutgers.edu\/yasai\/wp-content\/uploads\/sites\/1177\/2024\/03\/simform30.jpg","width":739,"height":331},{"@type":"BreadcrumbList","@id":"https:\/\/sites.rutgers.edu\/yasai\/user-guide\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/sites.rutgers.edu\/yasai\/"},{"@type":"ListItem","position":2,"name":"User Guide"}]},{"@type":"WebSite","@id":"https:\/\/sites.rutgers.edu\/yasai\/#website","url":"https:\/\/sites.rutgers.edu\/yasai\/","name":"YASAI Simulation","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/sites.rutgers.edu\/yasai\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/sites.rutgers.edu\/yasai\/wp-json\/wp\/v2\/pages\/505"}],"collection":[{"href":"https:\/\/sites.rutgers.edu\/yasai\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/sites.rutgers.edu\/yasai\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/sites.rutgers.edu\/yasai\/wp-json\/wp\/v2\/users\/3356"}],"replies":[{"embeddable":true,"href":"https:\/\/sites.rutgers.edu\/yasai\/wp-json\/wp\/v2\/comments?post=505"}],"version-history":[{"count":8,"href":"https:\/\/sites.rutgers.edu\/yasai\/wp-json\/wp\/v2\/pages\/505\/revisions"}],"predecessor-version":[{"id":672,"href":"https:\/\/sites.rutgers.edu\/yasai\/wp-json\/wp\/v2\/pages\/505\/revisions\/672"}],"wp:attachment":[{"href":"https:\/\/sites.rutgers.edu\/yasai\/wp-json\/wp\/v2\/media?parent=505"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}