plot_dv_vs_ipred#
- pharmpy.modeling.plot_dv_vs_ipred(model, predictions, stratify_on=None, bins=8)[source]#
Plot DV vs IPRED
- 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_ipred from pharmpy.tools import load_example_modelfit_results model = load_example_model("pheno") res = load_example_modelfit_results("pheno") plot_dv_vs_ipred(model, res.predictions)
model <- load_example_model("pheno") res <- load_example_modelfit_results("pheno") plot_dv_vs_ipred(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_ipred(model, res.predictions, 'WGT', bins=4)
model <- load_example_model("pheno") res <- load_example_modelfit_results("pheno") plot_dv_vs_ipred(model, res$predictions, 'WGT', bins=4)