plot_dv_vs_pred#

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

Plot DV vs PRED

Parameters:
  • model (Model) – Pharmpy model

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

  • 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_dv_vs_pred
from pharmpy.tools import load_example_modelfit_results

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

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