ModelGroup#

ModelGroup(models[, title])

A group of models that can be treated as a single model for estimation.

Attributes#

Parameters#

ModelGroup.pf

A DataFrame of the model parameters.

ModelGroup.pvals

An array of the current parameter values.

ModelGroup.pnames

An array of the current parameter names.

ModelGroup.pholdfast

An array indicating which parameters are marked as holdfast.

ModelGroup.pnullvals

An array of the current parameter null values.

ModelGroup.pmaximum

An array of the current parameter maximum values.

ModelGroup.pminimum

An array of the current parameter minimum values.

ModelGroup.pbounds

A copy of the current min-max bounds of the parameters.

ModelGroup.pstderr

An array of the current parameter standard errors.

ModelGroup.mixtures

Estimation Results#

ModelGroup.most_recent_estimation_result

A copy of the result dict from most recent likelihood maximization.

ModelGroup.possible_overspecification

Possible overspecification of the model.

Methods#

Setting Parameters#

ModelGroup.set_values([values])

Set the parameter values for one or more parameters.

ModelGroup.lock_value([name, value])

Set a fixed value for a model parameter.

ModelGroup.set_cap([cap])

Set limiting values for one or more parameters.

Parameter Estimation#

ModelGroup.estimate(*args, **kwargs)

Maximize loglike, and then calculate parameter covariance.

ModelGroup.maximize_loglike(*args, **kwargs)

Maximize the log likelihood.

ModelGroup.calculate_parameter_covariance([...])

Calculate the parameter covariance matrix.

Model Fitness#

ModelGroup.loglike_null([use_cache])

Compute the log likelihood at null values.

Reporting#

ModelGroup.parameter_summary()

Create a tabular summary of parameter values.

ModelGroup.to_xlsx(filename[, save_now, ...])

Write the estimation results to an Excel file.

Ancillary Computation#

ModelGroup.total_weight()

Compute the total weight across all models in the group.

ModelGroup.loglike([x, check_if_best])

Compute the log likelihood of the group of models.

ModelGroup.logloss([x, start_case, ...])

ModelGroup.d_loglike([x, return_series])

Compute the gradient of the log likelihood of the group of models.

ModelGroup.d_logloss([x, start_case, ...])

ModelGroup.loglike_casewise([x])

Compute the log likelihood case-by-case for the group of models.

Troubleshooting#

ModelGroup.doctor(**kwargs)

Run diagnostics, checking for common problems and inconsistencies.