RiskFitDistribution
Description
|
RiskFitDistribution(data range,data type, distribution list,selector,lower bound, upper bound) fits a distribution to data in data range, optionally restricting fitted distributions to those in distribution list. Fitted data has specified data type and best fit is selected using the criterion specified by selector. RiskFitDistribution fits data interactively and returns samples from the best fitting distribution during a simulation. It operates the same as an @RISK distribution function for the best fit that is entered in a cell. It can be correlated, named, or include property functions, just as with standard @RISK distribution functions. RiskFitDistribution automatically updates the fitted distribution when fitted data changes in Excel. Using this capability, you can have fitted distributions automatically update as new data is received or data changes during a simulation.
|
Examples
|
RiskFitDistribution(BatchFit!$B$10:$B$210,1, {"Normal","Weibull"},”AIC") fits the data located in the range BatchFit!$B$10:$B$210 and returns the best fitting Weibull or normal distribution. The best fit is selected using the AIC criterion.
|
Guidelines |
data type is 1=continuous samples, 2=discrete samples, 3=counted disrete samples, 4=unnormalized XY values, 5=normalized XY values or 6=X and P values. These are the equivalent of the Data Set Type options in the Distribution Fit dialog. distribution list lists the names of the distributions to fit, in quotes. If multiple distribution types are desired, curly braces should be used, as in {"Normal","Weibull"}. Only distribution types available in the Distribution Fit dialog may be used. selector specifies the goodness of fit criterion to use in selecting the best fit. Allowable values are “AIC”, “BIC”,"ChiSq",”KS”, and “AD”. lower bound and upper bound specify the limits for the fitted distribution. Use “INF” or “-INF” to indicate infinity. Use “Bounded” to represent the Fitting dialog option Bounded but Unknown. All arguments to RiskFitDistribution except for data range are optional. If omitted, defaults for optional arguments are data type 1 (continuous samples), selector=”AIC”, all distributions will be tried during fitting, and lower and upper bound are unsure. |