plot_individual_predictions: plot_individual_predictions

View source: R/functions_wrapper.R

plot_individual_predictionsR Documentation

plot_individual_predictions

Description

Plot DV and predictions grouped on individuals

The predictions would normally be taken from the modelfit results, but any data frame of appropriate format can be used. It should have one column per type of prediction where the column name is the type (e.g. "PRED" or "IPRED"), one row for each record of the dataset in the model. A predictions table containing only some of the individuals is ok to use, but then care needs to be taken to get match the row index of the original dataset.

Usage

plot_individual_predictions(model, predictions, individuals = NULL)

Arguments

model

(Model) Pharmpy model

predictions

(data.frame) One column for each type of prediction

individuals

(array(numeric) (optional)) A vector of individuals to include. NULL for all individuals

Value

(alt.Chart) Plot

Examples

## Not run: 
model <- load_example_model("pheno")
res <- load_example_modelfit_results("pheno")
plot_individual_predictions(model, res$predictions, individuals=c(1, 2, 3, 4, 5))

## End(Not run)


pharmr documentation built on May 28, 2026, 5:08 p.m.