Model Parameters

class larch.ModelParameter(model, index)

A ModelParameter is a reference object, referring to a Model and a parameter index. Unlike a roles.ParameterRef, a ModelParameter is explicitly bound to a specific Model, and edits to attributes of a ModelParameter automatically pass through to the underlying Model. These attributes support both reading and writing:


the current value for the parameter


the null value for the parameter (used for null models and t-stats)


the initial value of the parameter


the min bound for the parameter during estimation


the max bound for the parameter during estimation


a flag indicating if the parameter value should be held fast (constrained to keep its value) during estimation

These attributes are read-only:


the parameter name (read-only)


the parameter index within the model (read-only)


the t-statistic for the estimator (read-only)


the standard error of the estimator (read-only)


the robust standard error of the estimator via bhhh sandwich (read-only)


the covariance of the estimator (read-only)


the robust covariance of the estimator via bhhh sandwich (read-only)

class larch.ParameterManager

The ParameterManager class provides the interface to interact with various model parameters. You can call a ParameterManager like a mathod, to add a new parameter to the model or to access an existing parameter. You can also use it with square brackets, to get and set ModelParameter items.

When called as a method, in addition to the required parameter name, you can specify other ModelParameter attributes as keyword arguments.

When getting or setting items (with square brackets) you can give the parameter name or integer index.

See the Model section for examples.