The Batch Fit tool helps you define assumptions when you have historical data for a number of variables. The tool automatically selects which probability distribution (binomial, normal, triangular, uniform, and so on) best fits each series of historical data and provides you with the parameters to use in your model. Batch Fit can also provide a table of goodness-of-fit statistics and a correlation matrix calculated between the historical data.
This call runs the Batch Fit tool and displays results without using a dialog.
Note: | Before calling CB.BatchFitND, reset the Crystal Ball simulation. |
Table 10. CB.BatchFitND Index Parameter — Required, Integer
Used with Value1 to select the location of the data series for fitting, a range address string. The range must be contiguous (adjoining cells) | ||
Used with Value1 to specify whether the data cells are in rows or columns | ||
Used with Value1 to indicate whether the input range has headers. If set to True, there is header text in the top row or first column, depending on the cbBftInputOrientation setting. | ||
Used with Value1 to indicate whether the input range has labels. If set to True, there is label text in the first column or top row, depending on the cbBftInputOrientation setting. | ||
Used with Value1 to choose a specific distribution to fit; takes cbDfa[distribution constant] as specified in Table 76 | ||
Chooses all available continuous and discrete distributions to fit | ||
Used with Value1 to choose a ranking method, as listed in Table 78 | ||
Used with Value1 to specify an output location in a new workbook | ||
Used with Value1 to specify whether output is formatted. If set to True, it is formatted. | ||
Used with Value1 to specify whether to output a matrix of correlations between the data series. If set to True, a matrix is produced. | ||
Used with Value1 to specify whether to correlate assumptions | ||
Used with Value1 to specify whether to link to the matrix of correlations between the data series, assuming cbBftOutputCorrelationMatrix [14] is set to True. If set to True, creates a link to the matrix. | ||
Used with Value1 to specify whether to output a goodness-of-fit report. If set to True, a report is produced. Value2 can be used to supply a sheetname as a string. | ||
Used with Value1 to specify whether to output an assumptions report. If set to True, a report is produced. Value2 can be used to supply a sheetname as a string. | ||
Used with Value1 to specify whether to include full statistics in assumptions reports. If set to True, full statistics and percentiles (deciles) are included. Otherwise, only parameter values and assumption charts appear. | ||
Sets the Batch Fit tool to use parameter locking, the same as checking Lock Parameters on the Fitting Options panel of the Batch Fit wizard | ||
Used with Value1 to indicate that all statistics should appear when a goodness-of-fit report is produced. When set to True, this is the same as checking Show All Goodness-of-Fit statistics on the Output Options panel of the Batch Fit wizard. | ||
Used with Value1, Value2, Value3, and Value4 to specify which parameter to lock and which value to use | ||
Used with Value1 and Value2 to specify which parameter to clear | ||
cbBftOutputOrientation | 30 | Used with Value1 to specify whether output is in rows or columns |
cbBftOutputSheetName | 31 | Specifies the name of the worksheet containing primary fit results (assumptions) as the string given for Value1 |
Table 11. CB.BatchFitND Value1 Parameter — Optional, Variant
Indicates whether the data range has headers. If set to True, there is header text in the top row or first column, depending on the cbBftInputOrientation setting. | ||||
Indicates whether the data range has labels. If set to True, there is label text in the first column or top row, depending on the cbBftInputOrientation setting. | ||||
cbDfa... from Table 77 | Indicates a specific distribution or distribution type(s) to fit to the data | |||
Methods listed in Table 78 | Specifies a ranking method, as listed in Table 78 | |||
Used with Value2 to indicate whether results should go in a new workbook | ||||
Used with Value2 to indicate whether results should go in a new worksheet | ||||
Indicates whether results should be formatted; if True, formatting is applied | ||||
Indicates whether to create a correlation matrix; if True, the matrix is produced | ||||
Indicates whether to correlate assumptions; if True, assumptions are correlated. Value2 can be used to indicate a correlation threshold. | ||||
Indicates whether to link to the matrix of correlations between the data series; if True, creates the link | ||||
Indicates whether to output a goodness-of-fit report; if True, the report is produced | ||||
Indicates whether to output an assumption report; if True, the report is produced | ||||
Indicates whether to include full statistics with an assumption report; if True, the report contains full statistics, including deciles | ||||
Indicates whether the Batch Fit tool should use parameter locking; if True, parameter locking is set (the same as checking Lock Parameters on the Fitting Options panel of the Batch Fit wizard) | ||||
Indicates whether all statistics should appear when a Goodness of Fit report is produced, the same as checking Show All Goodness-of-Fit statistics on the Output Options panel of the wizard; if set to True, all statistics appear | ||||
The name of a lockable distribution from Table 53; see Description | The index number of a lockable distribution from Table 53; see Description | Specifies one of the following distributions whose parameters are locked. The following distributions from Table 53 can be used as Value1 parameters: | ||
The name of a lockable distribution from Table 53; see Description | The index number of a lockable distribution from Table 53; see Description | Specifies one of the following distributions whose parameters are cleared. The following distributions from Table 53 can be used as Value1 parameters: | ||
Indicates that output cells are in rows; equivalent of selecting Fill to the right in the user interface | ||||
Indicates that output cells are in columns; equivalent of selecting Fill downward in the user interface |
Table 12. CB.BatchFitND Value2 Parameter — Optional, Variant
Used with Value1 = cbBftNewWorkbook or cbBftNewWorksheet to indicate whether the output goes in a new workbook or worksheet. If cbBftNewWorksheet is set to False, Value3 can be used to indicate the first (upper left) cell of the output range on the current worksheet. Otherwise, cell A1 is assumed. | ||||
Used with Value1 = True to indicate that assumptions should be correlated if the absolute value of their correlation is equal to or greater than the specified threshold | ||||
The index of a lockable parameter from Table 53; see Description | The index number of a lockable parameter for the distribution specified in Value1 (all from Table 53; see Description) | Specifies one of the following distribution parameters to lock. The following from Table 53 can be used as Value2 parameters: | ||
The index of a lockable parameter from Table 53; see Description | The index number of a lockable parameter for the distribution specified in Value1 (all from Table 53; see Description) | Specifies one of the following distribution parameter(s) to clear. The locking settings and values are cleared. The following from Table 53 can be used as Value2 parameters: |
Table 13. CB.BatchFitND Value3 Parameter — Optional, Variant
A number within the acceptable value range for the specified parameter according to Table 53 | The actual value to be used for the specified parameter. Cell references cannot be used here. |
Note: | Before you call CB.BatchFitND, reset the Crystal Ball simulation. |