CB.LockFitParm

This subroutine enables you to enter specific parameters for selected distributions when selecting distributions for fitting. This can be helpful when locking to a specific value for location, shape, degrees of freedom or other parameters can improve accuracy.

Table 145. CB.LockFitParm Parameters with Values

Parameter

VBA Data Type

Value

Description

Dist

Integer

See Table 53 for constant equivalents to the distributions listed in the following table cell (under Description)

Specifies the distribution with parameters to lock. The following distributions from Table 53 can be used:

  • Gamma distribution — Location, Shape parameters

  • Lognormal distribution — Location parameter

  • Student's t distribution — Degrees of Freedom parameter

  • Weibull distribution — Location, Shape parameters

  • Binomial distribution — Trials parameter

  • Hypergeometric distribution — Trials parameter

Use

Boolean

True or False

Indicates if the lock value should be used or not; if set to True, the lock value is used

ParameterIndex (Optional)

Integer

See Table 53 to determine index values for target parameters

The index of the distribution parameter to lock, taken from Table 53

Value

Double

A positive real number

The actual value to be used for the specified parameter. Cell references cannot be used here. To clear the locked value, pass the constant cbParmUndefined.

Locked values are stored as if you had set them using Crystal Ball dialogs. They do not need to be called before every CB.Fit call.