| Title: | External Evaluation of Population Pharmacokinetic-Pharmacodynamic (popPKPD) Models |
|---|---|
| Description: | Provides tools to automate external pharmacokinetic model evaluation workflows, including Bayesian forecasting, predictive performance metrics, diagnostic plotting, and automated reporting. |
| Authors: | Manuel Ibarra [aut], Martin Umpierrez [aut, cre], Ignacio Alvarez Castro [aut] (ORCID: <https://orcid.org/0000-0003-1633-2432>), Nicolas Schmidt [aut] (ORCID: <https://orcid.org/0000-0001-5083-5792>) |
| Maintainer: | Martin Umpierrez <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.0.1 |
| Built: | 2026-06-11 09:19:28 UTC |
| Source: | https://github.com/martin-umpierrez/exeval |
Generates comparative visualizations of evaluation metrics across multiple
externally evaluated models combined with combine_metrics().
combine_metric_plot( cmetrics, type = c("bias_barplot", "MAIPE_barplot", "IF20_plot", "IF30_plot") )combine_metric_plot( cmetrics, type = c("bias_barplot", "MAIPE_barplot", "IF20_plot", "IF30_plot") )
cmetrics |
Named list returned by |
type |
Character string specifying the plot type to generate. Available options are:
|
This function is intended for model comparison workflows, allowing visual inspection of predictive performance across evaluation occasions..
Metrics are displayed separately for each evaluation occasion
(OCC) using faceted plots, enabling direct visual comparison
between candidate models.
A ggplot2 object.
combine_metrics(), plot.EvalPPK()
# Fake metrics generate_fake_metrics <- function(n_occasions = 3) { data.frame( OCC = rep(1:n_occasions), # Simula varias ocasiones rBIAS = stats::rnorm(n_occasions, mean = 0, sd = 10), rBIAS_lower = stats::rnorm(n_occasions, mean = -5, sd = 5), rBIAS_upper = stats::rnorm(n_occasions, mean = 5, sd = 5), MAIPE = stats::runif(n_occasions, min = 10, max = 50), IF20 = stats::runif(n_occasions, min = 20, max = 80), IF30 = stats::runif(n_occasions, min = 30, max = 90) ) } simulation1 <- list(metrics_means = generate_fake_metrics()) simulation2 <- list(metrics_means = generate_fake_metrics()) # List of models models_list <- list( list(model_name = "Test_Model1", metrics_list = simulation1), list(model_name = "Test_Model2", metrics_list = simulation2) ) combined_results <- combine_metrics(models_list) # plot results combine_metric_plot(combined_results, type = 'bias_barplot')# Fake metrics generate_fake_metrics <- function(n_occasions = 3) { data.frame( OCC = rep(1:n_occasions), # Simula varias ocasiones rBIAS = stats::rnorm(n_occasions, mean = 0, sd = 10), rBIAS_lower = stats::rnorm(n_occasions, mean = -5, sd = 5), rBIAS_upper = stats::rnorm(n_occasions, mean = 5, sd = 5), MAIPE = stats::runif(n_occasions, min = 10, max = 50), IF20 = stats::runif(n_occasions, min = 20, max = 80), IF30 = stats::runif(n_occasions, min = 30, max = 90) ) } simulation1 <- list(metrics_means = generate_fake_metrics()) simulation2 <- list(metrics_means = generate_fake_metrics()) # List of models models_list <- list( list(model_name = "Test_Model1", metrics_list = simulation1), list(model_name = "Test_Model2", metrics_list = simulation2) ) combined_results <- combine_metrics(models_list) # plot results combine_metric_plot(combined_results, type = 'bias_barplot')
Combines model performance metrics from multiple externally evaluated models into a single data frame and identifies the top-performing models according to a selected metric and ranking criterion.
combine_metrics( models, metric = "MAIPE", top_n = 2, occ_eval = 2, rank_criteria = "min" )combine_metrics( models, metric = "MAIPE", top_n = 2, occ_eval = 2, rank_criteria = "min" )
models |
A list of model evaluation results. Each element must be a named list containing:
|
metric |
Character string specifying the metric used for ranking
models (e.g., |
top_n |
Integer. Number of top-performing models to retain. |
occ_eval |
Numeric or character value specifying the evaluation
occasion ( |
rank_criteria |
Character string specifying the ranking rule:
|
All models must have been evaluated using the same external evaluation
strategy (eval_type), otherwise the function stops with an error.
Top-performing models are identified internally according to the selected metric and ranking criterion.
A named list containing:
Combined data frame containing metrics for all input
models, with an additional Model column.
Data frame containing the top-performing models according to the selected ranking criteria.
#' # Fake metrics generate_fake_metrics <- function(n_occasions = 3) { data.frame( OCC = rep(1:n_occasions), # Simula varias ocasiones rBIAS = stats::rnorm(n_occasions, mean = 0, sd = 10), rBIAS_lower = stats::rnorm(n_occasions, mean = -5, sd = 5), rBIAS_upper = stats::rnorm(n_occasions, mean = 5, sd = 5), MAIPE = stats::runif(n_occasions, min = 10, max = 50), IF20 = stats::runif(n_occasions, min = 20, max = 80), IF30 = stats::runif(n_occasions, min = 30, max = 90) ) } simulation1 <- list(metrics_means = generate_fake_metrics()) simulation2 <- list(metrics_means = generate_fake_metrics()) # List of models models_list <- list( list(model_name = "Test_Model1", metrics_list = simulation1), list(model_name = "Test_Model2", metrics_list = simulation2) ) combined_results <- combine_metrics(models_list) print(combined_results)#' # Fake metrics generate_fake_metrics <- function(n_occasions = 3) { data.frame( OCC = rep(1:n_occasions), # Simula varias ocasiones rBIAS = stats::rnorm(n_occasions, mean = 0, sd = 10), rBIAS_lower = stats::rnorm(n_occasions, mean = -5, sd = 5), rBIAS_upper = stats::rnorm(n_occasions, mean = 5, sd = 5), MAIPE = stats::runif(n_occasions, min = 10, max = 50), IF20 = stats::runif(n_occasions, min = 20, max = 80), IF30 = stats::runif(n_occasions, min = 30, max = 90) ) } simulation1 <- list(metrics_means = generate_fake_metrics()) simulation2 <- list(metrics_means = generate_fake_metrics()) # List of models models_list <- list( list(model_name = "Test_Model1", metrics_list = simulation1), list(model_name = "Test_Model2", metrics_list = simulation2) ) combined_results <- combine_metrics(models_list) print(combined_results)
Curated population pharmacokinetic (PK) and pharmacokinetic-pharmacodynamic (PKPD) models included in the package for external evaluation workflows.
exeval_modelsexeval_models
A data frame with 6 variables:
Unique model identifier used to reference the model within the package.
Drug associated with the model.
First author of the original publication.
Publication year.
Reference title or citation for the original model publication.
Model code stored as a character string in mrgsolve format.
These models can be used directly in exeval_ppk() by supplying the
corresponding Label as the model argument.
Runs the complete external evaluation workflow for population pharmacokinetic (popPK) or pharmacokinetic-pharmacodynamic (PKPD) models, including MAP estimation, posterior model updating, simulation, and prediction error metric calculation.
Prints a formatted representation of an EvalPPK object, including
dataset characteristics, evaluation settings, and performance metrics.
Prints a formatted representation of a summary generated from an
EvalPPK object, including metadata, applied summary settings,
global performance metrics, fit distribution, and poorly fitted
individuals.
Generates a structured summary of an EvalPPK object, including
global performance metrics, fit quality classification, and identification
of poorly fitted individuals.
Generates visualization plots for external evaluation results stored in an
EvalPPK object, including prediction error metrics, fit quality
distributions, and forecasting performance summaries.
exeval_ppk( model, data, model_name = NULL, drug_name = NULL, tool = "mapbayr", check_compile = TRUE, num_occ = NULL, num_ids = NULL, sampling = TRUE, occ_ref = NULL, evaluation_type = c("sequential_updating", "stepwise_updating", "sequential_reference_updating", "backward_reference_updating"), method = c("L-BFGS-B", "newuoa"), assessment = c("a_priori", "Bayesian_forecasting", "Complete"), verbose = FALSE ) ## S3 method for class 'EvalPPK' print(x, ...) ## S3 method for class 'summary.EvalPPK' print(x, ...) ## S3 method for class 'EvalPPK' summary( object, occ = NULL, by_occ = TRUE, poor_threshold = 50, top_n = 10, ... ) ## S3 method for class 'EvalPPK' plot( x, type = c("bias_barplot", "bias_pointrange", "MAIPE_barplot", "bias_boxplot", "bias_violin", "bias_dotplot", "bias_density", "IF20_plot", "IF30_plot", "IF_plot", "error_plot", "fit_class", "fit_histogram"), occ = NULL, signed = FALSE, ... )exeval_ppk( model, data, model_name = NULL, drug_name = NULL, tool = "mapbayr", check_compile = TRUE, num_occ = NULL, num_ids = NULL, sampling = TRUE, occ_ref = NULL, evaluation_type = c("sequential_updating", "stepwise_updating", "sequential_reference_updating", "backward_reference_updating"), method = c("L-BFGS-B", "newuoa"), assessment = c("a_priori", "Bayesian_forecasting", "Complete"), verbose = FALSE ) ## S3 method for class 'EvalPPK' print(x, ...) ## S3 method for class 'summary.EvalPPK' print(x, ...) ## S3 method for class 'EvalPPK' summary( object, occ = NULL, by_occ = TRUE, poor_threshold = 50, top_n = 10, ... ) ## S3 method for class 'EvalPPK' plot( x, type = c("bias_barplot", "bias_pointrange", "MAIPE_barplot", "bias_boxplot", "bias_violin", "bias_dotplot", "bias_density", "IF20_plot", "IF30_plot", "IF_plot", "error_plot", "fit_class", "fit_histogram"), occ = NULL, signed = FALSE, ... )
model |
Population PK model provided as one of the following:
If model code is supplied as a character string, |
data |
Data frame containing the external evaluation dataset.
Must include at least |
model_name |
Character string. Name used when compiling the model
with |
drug_name |
Character string used for reporting purposes only. |
tool |
Character string specifying the estimation backend.
Currently only |
check_compile |
Logical. If |
num_occ |
Integer. Maximum number of occasions to include in the
evaluation. If |
num_ids |
Integer. Number of subjects to include.
If |
sampling |
Logical. If |
occ_ref |
Integer. Reference occasion used for
|
evaluation_type |
Character string specifying the evaluation strategy:
|
method |
Character string specifying the optimization algorithm passed
to |
assessment |
Character string specifying the simulation strategy. Available options are:
|
verbose |
Logical. If |
x |
An object of class |
... |
Additional arguments passed to or from other methods. |
object |
An object of class |
occ |
Optional numeric occasion ( |
by_occ |
Logical. If |
poor_threshold |
Numeric threshold defining poor fit based on
absolute individual prediction error ( |
top_n |
Integer. Number of poorly fitted individuals to report.
Default is |
type |
Character string specifying the type of plot to generate. Available options are:
|
signed |
Logical. Only used when
|
This function serves as the main high-level interface for the exeval workflow.
This function executes the complete external evaluation workflow:
MAP estimation via run_MAP_estimations()
posterior model updating via update_map_models()
PK simulations via run_pk_simulations()
prediction error metric calculation via metrics_occ()
The returned object is an EvalPPK object containing all intermediate
results and summary metadata.
Summary outputs can be generated across all occasions, for a specific occasion, or stratified by occasion.
This method provides visualization tools for assessing predictive performance of external model evaluations, including bias, precision, forecasting success, and fit quality classification.
An object of class EvalPPK containing:
Prediction error metrics returned by metrics_occ().
MAP estimation results returned by
run_MAP_estimations().
Posterior individualized models returned by
update_map_models().
Simulation outputs returned by
run_pk_simulations().
Additional workflow metadata are stored as object attributes.
An object of class summary.EvalPPK containing:
Evaluation metadata inherited from the original
EvalPPK object.
Summary performance metrics across all observations or stratified by occasion.
Distribution of fit quality categories based on absolute prediction error.
Table of individuals exceeding the selected poor-fit threshold.
A ggplot2 object, except for "IF_plot", which
returns a combined plot object generated with ggpubr.
run_MAP_estimations(), update_map_models(),
run_pk_simulations(), metrics_occ()
data("tacrolimus_pk1_kidney", package = "exeval") data("model_tacHAN2011", package = "exeval") dd <- tacrolimus_pk1_kidney |> subset(ID < 6) res <- exeval_ppk(model="TAC_Han2011", data = dd, evaluation_type= "sequential_updating", assessment='Bayesian_forecasting' ) print(res) # Print the resultsdata("tacrolimus_pk1_kidney", package = "exeval") data("model_tacHAN2011", package = "exeval") dd <- tacrolimus_pk1_kidney |> subset(ID < 6) res <- exeval_ppk(model="TAC_Han2011", data = dd, evaluation_type= "sequential_updating", assessment='Bayesian_forecasting' ) print(res) # Print the results
Computes predictive performance metrics from simulation outputs generated during external model evaluation.
metrics_occ( simulations, assessment = c("a_priori", "Bayesian_forecasting", "Complete"), tool = "mapbayr", ... )metrics_occ( simulations, assessment = c("a_priori", "Bayesian_forecasting", "Complete"), tool = "mapbayr", ... )
simulations |
Named list returned by |
assessment |
Character string specifying the prediction strategy used to generate the simulations. Available options are:
|
tool |
Character string specifying the simulation backend.
Currently only |
... |
Additional arguments (currently unused). |
This function compares simulated predictions with observed concentrations and calculates individual- and occasion-level prediction error metrics.
Individual predictions are matched with observed concentrations using
subject identifier (ID), occasion (OCC), and observation
time (TIME).
The following metrics are calculated:
IPE: individual prediction error (%)
APE: absolute prediction error (%)
rRMSE: relative root mean squared error (%)
rBIAS: relative bias (%)
MAIPE: mean absolute individual prediction error (%)
IF20: percentage of predictions within 20\
IF30: percentage of predictions within 30\
Individual observations are additionally classified into fit quality
categories (Excellent, Acceptable, Poor,
Very Poor) based on absolute prediction error.
A named list containing:
Data frame containing individual prediction errors and fit classifications for each subject, occasion, and observation time.
Data frame containing summary performance metrics aggregated by occasion.
run_pk_simulations(), plot.EvalPPK(), summary.EvalPPK()
data("exeval_models", package = "exeval") data("tacrolimus_pk1_kidney", package = "exeval") dd <- tacrolimus_pk1_kidney |> subset(ID < 6) fit <- run_MAP_estimations( model = exeval_models$Model_code[[2]], model_name = "TAC_Zuo2013", data = dd, evaluation_type = "sequential_updating" ) post <- update_map_models( map_results = fit, evaluation_type = "sequential_updating" ) sim <- run_pk_simulations( individual_model = post, map_results = fit, assessment = "Complete" ) mm <- metrics_occ( simulations = sim, assessment = "Complete" )data("exeval_models", package = "exeval") data("tacrolimus_pk1_kidney", package = "exeval") dd <- tacrolimus_pk1_kidney |> subset(ID < 6) fit <- run_MAP_estimations( model = exeval_models$Model_code[[2]], model_name = "TAC_Zuo2013", data = dd, evaluation_type = "sequential_updating" ) post <- update_map_models( map_results = fit, evaluation_type = "sequential_updating" ) sim <- run_pk_simulations( individual_model = post, map_results = fit, assessment = "Complete" ) mm <- metrics_occ( simulations = sim, assessment = "Complete" )
Renames user-defined dataset columns to the standardized naming convention used internally by exeval.
prepare_data( data, name_id = NULL, name_time = NULL, name_occ = NULL, name_date = NULL, name_cmt = NULL, name_dv = NULL, name_mdv = NULL, name_amt = NULL, name_evid = NULL, name_ss = NULL, name_dur = NULL, name_lag = NULL, name_rate = NULL, name_ii = NULL, name_addl = NULL )prepare_data( data, name_id = NULL, name_time = NULL, name_occ = NULL, name_date = NULL, name_cmt = NULL, name_dv = NULL, name_mdv = NULL, name_amt = NULL, name_evid = NULL, name_ss = NULL, name_dur = NULL, name_lag = NULL, name_rate = NULL, name_ii = NULL, name_addl = NULL )
data |
A data frame containing the input dataset. |
name_id |
Character. Name of the column containing subject IDs. |
name_time |
Character string. Name of the sampling or event time column. |
name_occ |
Optional character. Name of the occasion column. |
name_date |
Optional character. Name of the date column. |
name_cmt |
Optional character. Name of the compartment column. |
name_dv |
Optional character string. Name of the dependent variable (observed concentration/response) column. |
name_mdv |
Optional character string. Name of the missing dependent variable indicator column. |
name_amt |
Optional character. Name of the dose amount column. |
name_evid |
Optional character. Name of the event ID column. |
name_ss |
Optional character string. Name of the steady-state indicator column. |
name_dur |
Optional character string. Name of the infusion duration column.' |
name_lag |
Optional character string. Name of the lag time column. |
name_rate |
Optional character string. Name of the infusion rate column. |
name_ii |
Optional character string. Name of the interdose interval column. |
name_addl |
Optional character string. Name of the additional doses column. |
This helper function allows external datasets with arbitrary column names to be reformatted for compatibility with the external evaluation workflow.
At minimum, ID and TIME mappings must be provided.
Additional columns can be optionally mapped depending on the analysis workflow and model requirements.
A data frame with standardized column names compatible with exeval.
df <- data.frame( patient = c(1, 1, 2), time = c(0, 12, 24), conc = c(NA, 8.4, 6.1), visit = c(1, 1, 2) ) df_std <- prepare_data( data = df, name_id = "patient", name_time = "time", name_dv = "conc", name_occ = "visit" ) head(df_std)df <- data.frame( patient = c(1, 1, 2), time = c(0, 12, 24), conc = c(NA, 8.4, 6.1), visit = c(1, 1, 2) ) df_std <- prepare_data( data = df, name_id = "patient", name_time = "time", name_dv = "conc", name_occ = "visit" ) head(df_std)
Performs Maximum A Posteriori (MAP) Bayesian estimation using mapbayr for external evaluation of pharmacokinetic models across multiple dosing occasions.
run_MAP_estimations( model, model_name = NULL, tool = "mapbayr", check_compile = TRUE, data, num_occ = NULL, num_ids = NULL, sampling = TRUE, occ_ref = NULL, evaluation_type = c("sequential_updating", "stepwise_updating", "sequential_reference_updating", "backward_reference_updating"), method = c("L-BFGS-B", "newuoa") )run_MAP_estimations( model, model_name = NULL, tool = "mapbayr", check_compile = TRUE, data, num_occ = NULL, num_ids = NULL, sampling = TRUE, occ_ref = NULL, evaluation_type = c("sequential_updating", "stepwise_updating", "sequential_reference_updating", "backward_reference_updating"), method = c("L-BFGS-B", "newuoa") )
model |
Population PK model, provided either as:
If a character string is provided, |
model_name |
Character string. Name used when compiling the model
with |
tool |
Character string. Estimation engine to use.
Currently only |
check_compile |
Logical. If |
data |
Data frame containing external evaluation data.
Must include at least |
num_occ |
Integer. Maximum number of occasions to include in the analysis.
If |
num_ids |
Integer. Number of subjects to include.
If |
sampling |
Logical. If |
occ_ref |
Integer. Reference occasion used for reference-based
evaluation strategies. Required when |
evaluation_type |
Character string specifying the evaluation strategy. Available options are:
|
method |
Character string specifying the optimization algorithm
passed to |
The population model can be provided either as:
a compiled mrgsolve::mrgmod object, or
a character string containing mrgsolve model code.
When model code is supplied as a character string, the model is compiled
internally using mrgsolve::mcode(). In this case, a model name
must be provided via model_name.
The evaluation strategy defines which observations are used to inform each MAP estimation:
"sequential_updating": cumulative observations up to each
occasion (e.g., OCC1, OCC1+2, OCC1+2+3).
"stepwise_updating": observations from each occasion treated
independently.
"sequential_reference_updating": cumulative observations up to
the reference occasion occ_ref.
"backward_reference_updating": sequential backward updating
from occ_ref.
A named list containing:
List of input datasets partitioned according to the selected evaluation strategy, where each element contains the observations used for a specific MAP estimation.
List of treatment/event datasets grouped by occasion and subject, used for posterior predictive simulations.
List of treatment/event datasets used for a priori predictive simulations.
List of MAP estimation objects returned by
mapbayr::mapbayest() for each evaluation subset.
Character string indicating the selected evaluation strategy.
Compiled population model (mrgmod) used for
estimation.
mapbayr::mapbayest(), mrgsolve::mcode()
data("exeval_models", package = "exeval") data("tacrolimus_pk1_kidney", package = "exeval") dd <- tacrolimus_pk1_kidney |> subset(ID < 6) fit <- run_MAP_estimations( model = exeval_models$Model_code[[2]], model_name = "TAC_Zuo2013", data = dd, evaluation_type = "sequential_updating" )data("exeval_models", package = "exeval") data("tacrolimus_pk1_kidney", package = "exeval") dd <- tacrolimus_pk1_kidney |> subset(ID < 6) fit <- run_MAP_estimations( model = exeval_models$Model_code[[2]], model_name = "TAC_Zuo2013", data = dd, evaluation_type = "sequential_updating" )
Simulates concentration-time profiles for external model evaluation using population predictions (a priori), individualized posterior predictions (Bayesian forecasting), or both, depending on the selected simulation strategy.
run_pk_simulations( individual_model, map_results, assessment = c("a_priori", "Bayesian_forecasting", "Complete"), seed = NULL, verbose = FALSE )run_pk_simulations( individual_model, map_results, assessment = c("a_priori", "Bayesian_forecasting", "Complete"), seed = NULL, verbose = FALSE )
individual_model |
Named list returned by |
map_results |
Named list returned by |
assessment |
Character string specifying the simulation strategy. Available options are:
|
seed |
Optional integer used to set the random number generator seed
for reproducible a priori simulations. If |
verbose |
Logical. If |
This function performs pharmacokinetic simulations at the observation times available in the external evaluation dataset.
Depending on the selected assessment, simulations are performed using:
the population model for a priori predictions,
individualized posterior models for Bayesian forecasting,
or both approaches for complete external evaluation.
This function represents the final simulation step in the external
evaluation workflow following run_MAP_estimations() and, when posterior
predictions are required, update_map_models().
Reproducibility of stochastic a priori simulations can be controlled using
the seed argument.
A named list containing:
List of simulated concentration-time profiles for each individual and evaluation occasion.
Treatment/event datasets grouped by occasion and used as simulation inputs.
Character string indicating the evaluation strategy
inherited from run_MAP_estimations().
Event datasets used for each simulation.
Character string indicating the selected simulation strategy.
run_MAP_estimations(), update_map_models()
data("exeval_models", package = "exeval") data("tacrolimus_pk1_kidney", package = "exeval") dd <- tacrolimus_pk1_kidney |> subset(ID < 6) fit <- run_MAP_estimations( model = exeval_models$Model_code[[2]], model_name = "TAC_Zuo2013", data = dd, evaluation_type = "sequential_updating" ) post <- update_map_models( map_results = fit, evaluation_type = "sequential_updating" ) sim <- run_pk_simulations( individual_model = post, map_results = fit, assessment = "Complete", seed = 123 )data("exeval_models", package = "exeval") data("tacrolimus_pk1_kidney", package = "exeval") dd <- tacrolimus_pk1_kidney |> subset(ID < 6) fit <- run_MAP_estimations( model = exeval_models$Model_code[[2]], model_name = "TAC_Zuo2013", data = dd, evaluation_type = "sequential_updating" ) post <- update_map_models( map_results = fit, evaluation_type = "sequential_updating" ) sim <- run_pk_simulations( individual_model = post, map_results = fit, assessment = "Complete", seed = 123 )
Pharmacokinetic and clinical data from adult kidney transplant recipients treated with tacrolimus, used for population pharmacokinetic model development, external evaluation, and methodological package examples.
tacrolimus_pk1_kidneytacrolimus_pk1_kidney
A data.frame with 739 rows and 30 variables:
Patient identifier
Number of the occasion
Tacrolimus daily dose (mg)
Dose amount (mg)
Sequential time (hours)
Post-operative days
Observed tacrolimus concentration (ng/mL)
Event identifier
Compartment identifier
Missing dependent variable flag
Dosing interval (hours)
Steady-state indicator
Creatinine (mg/dL)
Serum creatinine ()
Estimated glomerular filtration rate (mL/min/1.73 m)
Creatinine clearance (Cockcroft-Gault, mL/min)
Age (years)
Sex
Body weight (kg)
Hematocrit
CYP3A5 polymorphism
CYP3A5 expresser status
Prednisone dose (mg)
Prednisone dose normalized by body weight (mg/kg)
Height (cm)
Height (m)
Body surface area (m)
Body mass index (kg/m)
Lean body weight (kg)
Diabetes mellitus indicator
This dataset corresponds to a Uruguayan kidney transplant cohort.
De-identified clinical dataset adapted for methodological research and package examples.
Umpierrez M, et al. (2025). Accelerating Tacrolimus Model-Informed Precision Dosing in Kidney Transplant Recipients: Model Evaluation and Refinement Strategies.
Converts MAP estimation results obtained with run_MAP_estimations()
into individualized posterior models using mapbayr. Depending on the
selected evaluation strategy, posterior information is propagated across
occasions to support posterior predictive simulations.
update_map_models( map_results, evaluation_type = c("sequential_updating", "stepwise_updating", "sequential_reference_updating", "backward_reference_updating") )update_map_models( map_results, evaluation_type = c("sequential_updating", "stepwise_updating", "sequential_reference_updating", "backward_reference_updating") )
map_results |
Named list returned by |
evaluation_type |
Character string specifying the evaluation strategy.
Must match the strategy used when generating
|
This function applies mapbayr::use_posterior() to each MAP estimation
object and returns a list of updated individual models that can be used
for posterior predictive simulations.
The evaluation strategy must match the one originally used in
run_MAP_estimations().
This function applies mapbayr::use_posterior() to each MAP
estimation object contained in map_results, generating individualized
posterior models for subsequent simulation.
Posterior information is propagated across occasions according to the
selected evaluation_type, which must match the strategy originally
used in run_MAP_estimations().
Posterior model objects are dynamically named following the pattern
a.posteriori_occX_Y, where X and Y indicate the
occasions linked by the posterior update.
The resulting objects are intended for use with run_pk_simulations().
A named list containing:
List of posterior individualized model objects created
using mapbayr::use_posterior().
Character string indicating the evaluation strategy used.
data("exeval_models", package = "exeval") data("tacrolimus_pk1_kidney", package = "exeval") dd <- tacrolimus_pk1_kidney |> subset(ID < 6) fit <- run_MAP_estimations( model = exeval_models$Model_code[[2]], model_name = "TAC_Zuo2013", data = dd, evaluation_type = "sequential_updating" ) post <- update_map_models( map_results = fit, evaluation_type = "sequential_updating" )data("exeval_models", package = "exeval") data("tacrolimus_pk1_kidney", package = "exeval") dd <- tacrolimus_pk1_kidney |> subset(ID < 6) fit <- run_MAP_estimations( model = exeval_models$Model_code[[2]], model_name = "TAC_Zuo2013", data = dd, evaluation_type = "sequential_updating" ) post <- update_map_models( map_results = fit, evaluation_type = "sequential_updating" )