Professional Documents
Culture Documents
Source: Developer Kit for Crystal Ball 2000 and CB Predictor, Decisioneering Inc., 1999. Sometimes is it useful to embed some functions directly into a worksheet; for example, to automatically extract summary statistics and/or percentiles from a simulation. These can be specially formatted for a user, who does not have to know anything about the CB interface. All of these functions (and others) can be accessed from the function wizard in Excel, or typed in like any other Excel function (of course, the CB add-in must be loaded first). In the function wizard, the CB functions are in the Crystal Ball category.
Probability Distributions
Model Information
CB.GetForePercentFN(ForeRefere nce, Percent) CB.GetCertaintyFN(ForeReferenc e, Value) CB.IterationsFN() CB.GetAssumFN (AssumRef, Index) CB.GetAssumPercentFN(AssumR eference, Percent) CB.GetDecVarFN (DecVarRef, Index) CB.GetForeFN (ForeRef, Index) CB.GetCorrelationFN(AssumRef, Column, Row)
Functions for each of the probability distributions included in CB. See list in Table 3.1 (page 88) of Evans & Olson book. Returns descriptive statistics for the specified forecast cell. ForeReference must point to a defined forecast cell (if not, #VALUE is displayed). Index is a number between 1 and 13. Before a simulation is run, or after resetting, the results are shown as zeroes. The values of Index return the following values: 1: number of trials 2: mean 3: median 4: mode 5: standard deviation 6: variance 7: skewness 8: kurtosis 9: coefficient of variability 10: minimum 11: maximum 12: range (max-min) 13: standard error Returns value of a forecast for a specified percentile (cumulative probability). The percentile is a number from 0 to 100. Returns the certainty level (cumulative probability) for a given value of a forecast. Returns the number of iterations so far in a simulation run. Returns information about assumption cells. Returns percentile of an assumption cell, based on the assumption cells distribution. Similar to GetForePercentFN for a forecast cell. Returns information about decision variable cells. Returns information about forecast cells. Returns the correlation coefficient between two assumption cells (2nd assumption cell specified by column number and row number, for some odd reason). Returns CB version information
CB.GetVersionFN()
Page 1 of 2
8. 9. 10.
11.
12.
Code for the VBA routines Sub RunSimulation() CB.ResetND CB.Simulation 500 End Sub Sub CreateReport() CB.CreateRptND CBRptOK End Sub
Page 2 of 2