check_high_correlations#

pharmpy.modeling.check_high_correlations(model, cor, limit=0.9)[source]#

Check for highly correlated parameter estimates

Parameters:
  • model (Model) – Pharmpy model object

  • cor (pd.DataFrame) – Estimated correlation matrix

  • limit (float) – Lower limit for a high correlation

Returns:

pd.Series – Correlation values indexed on pairs of parameters for (absolute) correlations above limit

Example

>>> from pharmpy.modeling import *
>>> from pharmpy.tools import load_example_modelfit_results
>>> model = load_example_model("pheno")
>>> results = load_example_modelfit_results("pheno")
>>> cor = results.correlation_matrix
>>> check_high_correlations(model, cor, limit=0.3)
POP_CL  IIV_CL    -0.387063
POP_VC  COVAPGR   -0.357003
        IIV_VC     0.356831
dtype: float64