larch.numba.Model.lock_value

larch.numba.Model.lock_value

Model.lock_value(self, name, value, note=None, change_check=True)

Set a fixed value for a model parameter.

Parameters with a fixed value (i.e., with “holdfast” set to 1) will not be changed during estimation by the likelihood maximization algorithm.

Parameters
  • name (str) – The name of the parameter to set to a fixed value.

  • value (float) – The numerical value to set for the parameter.

  • note (str, optional) – A note as to why this parameter is set to a fixed value. This will not affect the mathematical treatment of the parameter in any way, but may be useful for reporting.

  • change_check (bool, default True) – Whether to trigger a check to see if any parameter frame values have changed. Can be set to false to skip this check if you know that the values have not changed or want to delay this check for later, but this may result in problems if the check is needed but not triggered before certain other modeling tasks are performed.