Evaluate precision dosing

All these functions need a model, see section ‘Models’

Fit population data

These functions perform posthoc and/or proseval on population data

dataTibble()

Utility function to create a data tibble.

posthoc() proseval()

Find the individual parameters for a set of virtual subjects in a population, either based on all available data (posthoc), or including data piece-wise as time progresses (proseval).

Add predictions for the population

These functions can be used to append predictions to each tdmorefit instance in the population

predict(<tdmorefit>)

Predict new data using a model fit

logLik(<tdmorefit>)

Calculate the log-likelihood of the predicted values. If fixed values were used to obtain the tdmorefit, they are considered estimated and are included in the population log-likelihood.

as.population()

Create a typical value subject

as.sample()

Create a tiible of N random tdmorefit instances

Simulate precision dosing

findDose() findDoses() doseSimulation()

Simulate dose adaptation in a population

Models

Tdmore models

Parameter estimation and dose recommendation needs a model. The methods below allow you to construct a model using nlmixr, RxODE, or algebraic equations.

tdmore()

Append TDM functionality to a pharmacometrics structural model.

errorModel()

Instantiate a new error model.

Metadata

Model metadata allows to intelligently guess certain default settings

metadata()

Append metadata to a TDMore model

getDosingInterval()

Get the dosing interval for the given formulation

covariate()

Create a new covariate object.

output()

Create a new output object.

formulation()

Create a new formulation object.

target()

Create a new target.

getMetadataByName()

Get metadata (output, formulation or covariate) by name.

getMetadataByClass()

Get metadata by class.

observed_variables()

Create an 'observed variables' object. This metadata indicates that these variables are interesting outputs of the model, and should be included in a plot.

getObservedVariables()

Get the observed variables from the tdmore model.

Algebraic models

Use an algebraic model in tdmore

algebraic()

Initialize a structural model using algebraic equations.

tdmore(<algebraic>)

Build a tdmore object based on an algebraic model

linCmt()

This function guesses which model should be calculated, based on the available variables in the caller environment

pk1cptiv_() pk1cptinfusion_() pk1cptoral_() pk2cptiv_() pk2cptinfusion_() pk2cptoral_() pk3cptiv_() pk3cptinfusion_() pk3cptoral_()

Algebraic equations for PK models

pk1cptiv() pk1cptinfusion() pk1cptoral() pk2cptiv() pk2cptinfusion() pk2cptoral() pk3cptiv() pk3cptinfusion() pk3cptoral()

Executes the requested PK model, and fetches the arguments from the caller's environment.

pkmodel()

Execute the appropriate PK model, based on the same rules as used by Monolix

Model-predictive control

Replace empirical bayesian estimation with model-predictive control in a tdmore model

mpc()

MPC is a generic function to make a tdmore model compatible with MPC.

Mixture models

A mixture model combines two subpopulations with an a priori probability of belonging to either model A or model B

tdmore_mixture()

Create a TDMore mixture model.

tdmore_mixture_covariates()

Create a TDMore mixture model, based on several options for a discrete covariate.

Example models

Example datasets, with their respective population PK model as estimated by nlmixr.

theopp

Theophylline dataset, as included in the NONMEM distribution.

theopp_nlmixr

NlmixrUI object describing theophylline 1-compartment model with oral absorption

pheno

Phenobarbitol dataset, as included in the NONMEM distribution.

pheno_nlmixr

NlmixrUI object describing Phenobarbitol 1-compartment model with IV administration and allometric scaling on weight

getModel()

This searches for the given model name in a directory

defaultModel()

Get the first available model name in the given directory

Plotting

These functions can be used to plot more detail for predictions

autolayer(<tdmorefit>) autoplot(<tdmore>)

Automatically plot a tdmorefit object

autoplot(<tdmorefit>)

Plot a tdmorefit object.

autolayer(<recommendation>)

Automatically create the required layers for a recommendation object

autoplot(<tdmorefit_mixture>)

Plot a tdmorefit_mixture object.

parameterPlot.tdmorefit()

Generate a plot of the parameters

predictionLayer()

This creates a special type of ggplot2 Layer object. The layer searches for a tdmorefit object in either the plot, or its own arguments. It then calls the `predict()` function and provides this data.frame instead of the original data