larch.model.troubleshooting.overspecification#

overspecification(model: BaseModel, repair: Literal['?', '!'] = '?', verbose: int = 3)[source]#

Check model for possible over-specification.

Parameters:
  • model (larch.Model) – The model to check.

  • repair ({'?', '!'}) – No automatic repairs are available for this check. A question mark (‘?’) simply emits a warning if a possible over-specification is found. An exclamation mark (‘!’) will raise an error if possible over-specification is found.

  • verbose (int, default 3) – This is ignored for the overspecification check; all possible problems are listed.

Returns:

  • model (larch.Model) – The model with revised dataset attached.

  • diagnosis (pd.DataFrame) – A dataframe of possible over-specification problems in the model. The index of this dataframe is a multi-index with the first level being the problem number, the second level being the eigenvalue, and the third level being the parameter name[s] of the non-zero elements of each problematic eigenvector. The columns are the non-zero eigenvector values.