Learn R Programming

pharmr (version 0.96.0)

add_allometry: add_allometry

Description

Add allometric scaling of parameters

Add an allometric function to each listed parameter. The function will be P=P*(X/Z)**T where P is the parameter, X the allometric_variable, Z the reference_value and T is a theta. Default is to automatically use clearance and volume parameters.

Usage

add_allometry(
  model,
  allometric_variable = "WT",
  reference_value = 70,
  parameters = NULL,
  initials = NULL,
  lower_bounds = NULL,
  upper_bounds = NULL,
  fixed = TRUE
)

Value

(Model) Pharmpy model object

Arguments

model

(Model) Pharmpy model

allometric_variable

(str) Value to use for allometry (X above)

reference_value

(str or numeric) Reference value (Z above)

parameters

(array(str) (optional)) Parameters to use or NULL (default) for all available CL, Q and V parameters

initials

(array(numeric) (optional)) Initial estimates for the exponents. Default is to use 0.75 for CL and Qs and 1 for Vs

lower_bounds

(array(numeric) (optional)) Lower bounds for the exponents. Default is 0 for all parameters

upper_bounds

(array(numeric) (optional)) Upper bounds for the exponents. Default is 2 for all parameters

fixed

(logical) Whether the exponents should be fixed

Examples

Run this code
if (FALSE) {
model <- load_example_model("pheno")
model <- add_allometry(model, allometric_variable='WGT')
model$statements$before_odes
}

Run the code above in your browser using DataLab