exmodel() reads and compiles code, and returns a (mrgmod) model object. exdata() returns a data.frame.
Arguments
num
model number (see details)
add_exdata
should data be automatically loaded with the model
cache
read the model with mrgsolve::mread_cache()
quiet
don't print messages when compiling
...
passed to mrgsolve::mread() or mrgsolve::mread_cache()
ID
individual number to include in the data (from 1 to 8)
clean_data
remove useless columns and rows from the original data
Details
Available models are:
1: Base model. A simple monocompartmental PK model with inter-individual variability on absorption constant (KA), volume of distribution (VC) and clearance (CL). The residual error model is proportional.
301: Time-varying covariates. A continuous covariate (body weight "BW") and a categorical one (sex "SEX") influence the clearance parameter. In the corresponding dataset, the values randomly changes from one record to another within a single individual.
401: Metabolite. The PK model of both a parent drug and its metabolite.
An example dataset of eight (simulated) individuals is available for each model. Individuals differ in terms of sampling times (sparse or rich) and dosing regimen (single or multiple dosing).
Model code and data files are stored at the location given by system.file("exmodel", package = "mapbayr").
# Models can be loaded with data (the default), ready for parameter estimationest <- mapbayest(exmodel())
# Number of subjects in dataset can be chosen up to 8 individualsexdata(301, ID = c(5,8))