plot_abs_cwres_vs_ipred#

pharmpy.modeling.plot_abs_cwres_vs_ipred(model, predictions, residuals, stratify_on=None, bins=8)[source]#

Plot |CWRES| vs IPRED

Parameters:
  • model (Model) – Pharmpy model

  • predictions (pd.DataFrame) – DataFrame containing the predictions

  • residuals (pd.DataFrame) – DataFrame containing the residuals

  • stratify_on (str) – Name of parameter for stratification

  • bins (int) – Number of bins for stratification

Returns:

alt.Chart – Plot

Examples

from pharmpy.modeling import load_example_model, plot_abs_cwres_vs_ipred
from pharmpy.tools import load_example_modelfit_results

model = load_example_model("pheno")
res = load_example_modelfit_results("pheno")
plot_abs_cwres_vs_ipred(model, res.predictions, res.residuals)
from pharmpy.modeling import load_example_model, plot_abs_cwres_vs_ipred
from pharmpy.tools import load_example_modelfit_results

model = load_example_model("pheno")
res = load_example_modelfit_results("pheno")
plot_abs_cwres_vs_ipred(model, res.predictions, res.residuals, 'WGT', bins=4)