reparametrization: list of parameters with definitions that reparametrize the linear PK model to a 1-, 2- o4 3-compartment PK with standardized parametrization.
mixture: for mixture models, provide a list of the parameter associated with the mixture and it's possible values and probabilities (of the first value), e.g. list(CL = list(value = c(10, 20), probability = 0.3).
units: list or vector of parameter units
size: size of state vector for model. Size will be extracted automatically from supplied code, use this argument to override.
lagtime: lag time
obs: list with "scale": character string with definition for scale, e.g. "V" or "V*(WT/70)". If NULL, scale defaults to 1., and "cmt" the observation compartment
dose: specify default dose compartment, e.g. list(cmt = 1)
covariates: specify covariates, either as a character vector or a list. if specified as list, it allows use of timevarying covariates (see new_covariate() function for more info)
declare_variables: declare variables
iiv: inter-individual variability, can optionally be added to library
iov: inter-occasion variability, can optionally be added to library
development: Information about the model development population, can optionally be added to library
omega_matrix: variance-covariance matrix for inter-individual variability, can optionally be added to library
ruv: residual variability, can optionally be added to library
ltbs: log-transform both sides. Not used in simulations, only for fitting (sets attribute ltbs).
misc: a list of miscellaneous model metadata
cmt_mapping: list indicating which administration routes apply to which compartments. Example: list("oral" = 1, "infusion" = 2)
int_step_size: step size for integrator. Can be pre-specified for model, to override default for sim_ode()
default_parameters: population or specific patient values, can optionally be added to library
fixed: parameters that should not have iiv added.
cpp_show_code: show generated C++ code
package: package name when saving as package
test_file: optional test file to be included with package
install: install package after compilation?
folder: base folder name to create package in
lib_location: install into folder (--library argument)
verbose: show more output
as_is: use C-code as-is, don't substitute line-endings or shift indices
nonmem: add NONMEM code as attribute to model object
comments: comments for model
version: number of library
quiet: passed on to system2 as setting for stderr and stdout; how to output cmd line output. Default ("") is R console, NULL or FALSE discards. TRUE captures the output and saves as a file.
definition: optional, filename for the JSON file the full definition for the model. The definition file will be stored as definition.json in the resulting package.
Returns
If package name is NULL, returns the model object. Otherwise has no return value.