Title: | Clinical Pharmacokinetics Toolkit |
---|---|
Description: | Provides equations commonly used in clinical pharmacokinetics and clinical pharmacology, such as equations for dose individualization, compartmental pharmacokinetics, drug exposure, anthropomorphic calculations, clinical chemistry, and conversion of common clinical parameters. Where possible and relevant, it provides multiple published and peer-reviewed equations within the respective R function. |
Authors: | Ron Keizer [aut, cre], Jasmine Hughes [aut], Dominic Tong [aut], Kara Woo [aut], Michael McCarthy [aut], InsightRX [cph, fnd] |
Maintainer: | Ron Keizer <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.13.0 |
Built: | 2025-01-16 18:33:52 UTC |
Source: | https://github.com/insightrx/clinpk |
Often used for eGFR estimates
absolute2relative_bsa(quantity, bsa = NULL, ...)
absolute2relative_bsa(quantity, bsa = NULL, ...)
quantity |
quantity expressed in absolute units |
bsa |
ideal body weight in kg |
... |
arguments passed on to 'calc_bsa', if bsa is NULL |
quantity expressed relative to /1.73m2
absolute2relative_bsa(quantity = 60, bsa = 1.6) absolute2relative_bsa(quantity = 60, weight = 14, height = 90, method = "dubois")
absolute2relative_bsa(quantity = 60, bsa = 1.6) absolute2relative_bsa(quantity = 60, weight = 14, height = 90, method = "dubois")
Calculate accumulation ratio This is the ratio of drug concentration or AUC at steady state over concentrations after single dose
accumulation_ratio(kel = NULL, halflife = NULL, tau = 24)
accumulation_ratio(kel = NULL, halflife = NULL, tau = 24)
kel |
drug elimination rate |
halflife |
halflife. Either 'kel' or 'halflife' is required. |
tau |
dosing interval |
accumulation_ratio(halflife = 24, tau = 24) accumulation_ratio(kel = 0.08, tau = 12)
accumulation_ratio(halflife = 24, tau = 24) accumulation_ratio(kel = 0.08, tau = 12)
Add residual variability to data
add_ruv(x, ruv = list())
add_ruv(x, ruv = list())
x |
data |
ruv |
list with arguments prop, add, exp |
y <- pk_1cmt_inf()$y y + add_ruv(y, list(prop = 0.1, add = 0.05))
y <- pk_1cmt_inf()$y y + add_ruv(y, list(prop = 0.1, add = 0.05))
Convert AUCtau or AUCt to dose (for 1-compartment linear PK model)
auc2dose(auc, CL, V, t_auc = NA)
auc2dose(auc, CL, V, t_auc = NA)
auc |
AUCtau |
CL |
Clearance |
V |
Volume of distribution |
t_auc |
if AUCtau is not known but only AUCt, 't_auc' specifies time until which AUC_t is calculated to be able to calculate dose |
auc2dose(450, CL = 5, V = 50)
auc2dose(450, CL = 5, V = 50)
Often used for chemotherapy calculations when actual weight > 120 Adjusted body weight is returned in units of kg.
calc_abw(weight = NULL, ibw = NULL, factor = 0.4, verbose = TRUE, ...)
calc_abw(weight = NULL, ibw = NULL, factor = 0.4, verbose = TRUE, ...)
weight |
actual body weight in kg |
ibw |
ideal body weight in kg |
factor |
weighting factor, commonly 0.4 or 0.3 |
verbose |
show output? |
... |
parameters passed to ibw function (if 'ibw' not specified) |
adjusted body weight in kg
calc_abw(weight = 80, ibw = 60) calc_abw(weight = 80, height = 160, sex = "male", age = 60)
calc_abw(weight = 80, ibw = 60) calc_abw(weight = 80, height = 160, sex = "male", age = 60)
Calculate AKI class based on serum creatinine values over time, using various methods for children (pRIFLE) and adults (RIFLE, kDIGO)
calc_aki_stage( scr = NULL, times = NULL, method = "kdigo", baseline_scr = "median", baseline_egfr = NULL, first_dose_time = NULL, age = NULL, egfr = NULL, egfr_method = NULL, force_numeric = FALSE, override_prifle_baseline = FALSE, verbose = TRUE, return_object = TRUE, ... )
calc_aki_stage( scr = NULL, times = NULL, method = "kdigo", baseline_scr = "median", baseline_egfr = NULL, first_dose_time = NULL, age = NULL, egfr = NULL, egfr_method = NULL, force_numeric = FALSE, override_prifle_baseline = FALSE, verbose = TRUE, return_object = TRUE, ... )
scr |
serum creatinine in mg/dL. Use 'convert_creat()' to convert from mmol/L. Values below the detection limit ("<0.2") will be converted to numeric (0.2) |
times |
creatinine sample times in hours |
method |
classification method, one of 'KDIGO', 'RIFLE', 'pRIFLE' (case insensitive) |
baseline_scr |
baseline serum creatinine, required for 'RIFLE' classifation. Will use value if numeric. If 'character', can be either 'median', 'median_before_treatment', 'lowest', or 'first'. |
baseline_egfr |
baseline eGFR, required for 'RIFLE' classifations. Will take median of 'egfr' values if 'NULL'. |
first_dose_time |
time in hours of first dose relative to sCr value, used for calculate baseline serum creatinine in 'median_before_treatment' approach. |
age |
age in years, needed when eGFR is used in the classification method |
egfr |
eGFR in ml/min/1.73m^2. Optional, can also be calcualted if 'age', 'weight', 'height', 'sex', 'egfr_method' are specified as arguments. |
egfr_method |
eGFR calculation method, used by 'calc_egfr()'. If NULL, will pick default based on classification system ('cockroft_gault' for RIFLE / kDIGO, 'revised_schwartz' for pRIFLE). |
force_numeric |
keep stage numeric (1, 2, or 3), instead of e.g. "R", "I", "F" as in RIFLE. Default 'FALSE'. |
override_prifle_baseline |
by default, 'pRIFLE' compares eGFR to 120 ml/min. Override by setting to TRUE. |
verbose |
verbose ('TRUE' or 'FALSE') |
return_object |
return object with detailed data (default 'TRUE'). If 'FALSE', will just return maximum stage. |
... |
arguments passed on to 'calc_egfr()' |
pRIFLE: Ackan-Arikan et al. "Modified RIFLE criteria in critically ill children with acute kidney injury." Kidney Int. (2007)
RIFLE: Bellomo et al. "Acute renal failure - definition, outcome measures, animal models, fluid therapy and information technology needs: the Second International Consensus Conference of the Acute Dialysis Quality Initiative (ADQI) Group." Critical Care. (2004)
KDIGO: Khwaja. "KDIGO clinical practice guidelines for acute kidney injury." Nephron Clinical Practice. (2012)
pRIFLE baseline eGFR: Soler et al. "pRIFLE (Pediatric Risk, Injury, Failure, Loss, End Stage Renal Disease) score identifies Acute Kidney Injury and predicts mortality in critically ill children : a prospective study." Pediatric Critical Care Medicine. (2014)
calc_aki_stage( scr = c(0.7, 0.9, 1.8, 1.5), t = c(0, 40, 100, 130), age = 50, weight = 60, height = 170, sex = "female")
calc_aki_stage( scr = c(0.7, 0.9, 1.8, 1.5), t = c(0, 40, 100, 130), age = 50, weight = 60, height = 170, sex = "female")
Calculate the amounts in all compartments in a compartmental PK system based on a given concentration in the central compartment, and assuming steady state.
calc_amts_for_conc(conc = 10, parameters = NULL, n_cmt = 1)
calc_amts_for_conc(conc = 10, parameters = NULL, n_cmt = 1)
conc |
concentration in central compartment |
parameters |
for PK model |
n_cmt |
number of compartments |
calc_amts_for_conc(conc = 10, parameters = list(CL = 5, V = 50), n_cmt = 1) calc_amts_for_conc( conc = 10, parameters = list(CL = 5, V = 50, Q = 20, V2 = 100), n_cmt = 2) calc_amts_for_conc( conc = 10, parameters = list(CL = 5, V = 50, Q = 20, V2 = 100, Q2 = 30, V3 = 200), n_cmt = 3)
calc_amts_for_conc(conc = 10, parameters = list(CL = 5, V = 50), n_cmt = 1) calc_amts_for_conc( conc = 10, parameters = list(CL = 5, V = 50, Q = 20, V2 = 100), n_cmt = 2) calc_amts_for_conc( conc = 10, parameters = list(CL = 5, V = 50, Q = 20, V2 = 100, Q2 = 30, V3 = 200), n_cmt = 3)
Calculate baseline sCr
calc_baseline_scr( baseline_scr, scr, times, method, first_dose_time = NULL, verbose )
calc_baseline_scr( baseline_scr, scr, times, method, first_dose_time = NULL, verbose )
baseline_scr |
baseline serum creatinine method (character). See calc_aki_stage() for availabloptions. |
scr |
serum creatinine in mg/dL. Use 'convert_creat()' to convert from mmol/L. Values below the detection limit ("<0.2") will be converted to numeric (0.2) |
times |
creatinine sample times in hours |
method |
classification method, one of 'KDIGO', 'RIFLE', 'pRIFLE' (case insensitive) |
first_dose_time |
time in hours of first dose relative to sCr value, used for calculate baseline serum creatinine in 'median_before_treatment' approach. |
verbose |
verbose ('TRUE' or 'FALSE') |
Calculate BMI
calc_bmi(weight, height)
calc_bmi(weight, height)
weight |
weight in kg |
height |
height in cm |
value of BMI in kg/m2
calc_bmi(weight = 70, height = 160)
calc_bmi(weight = 70, height = 160)
Get an estimate of body-surface area (in m2) based on weight and height
calc_bsa( weight = NULL, height = NULL, method = c("dubois", "mosteller", "haycock", "gehan_george", "boyd") )
calc_bsa( weight = NULL, height = NULL, method = c("dubois", "mosteller", "haycock", "gehan_george", "boyd") )
weight |
weight |
height |
height |
method |
estimation method, choose from 'dubois', 'mosteller', 'haycock', 'gehan_george', 'boyd' |
Returns a list of the following elements:
value |
Body Surface Area (BSA) in units of m2 |
unit |
Unit describing BSA, (m2) |
calc_bsa(weight = 70, height = 170) calc_bsa(weight = 70, height = 170, method = "gehan_george")
calc_bsa(weight = 70, height = 170) calc_bsa(weight = 70, height = 170, method = "gehan_george")
The Calvert equation calculates a dose expected to bring the patient to the target AUC given their glomerular filtration rate (GFR). The original equation was developed on a data set of 18 individuals with GFR of 33-136 ml/min.
calc_carboplatin_calvert(target_auc, gfr = NULL, ...)
calc_carboplatin_calvert(target_auc, gfr = NULL, ...)
target_auc |
target AUC, in mg/ml-min, typically between 2-8 mg/ml-min |
gfr |
glomerular filtration rate, in ml/min. See also 'clinPK::calc_egfr'. |
... |
arguments passed on to 'calc_egfr' if gfr is not supplied |
Calvert et al., Journal of Clinical Oncology (1976)
calc_carboplatin_calvert(5, 100) calc_carboplatin_calvert(4, 30) calc_carboplatin_calvert(2, sex = "male", age = 50, scr = 1.1, weight = 70)
calc_carboplatin_calvert(5, 100) calc_carboplatin_calvert(4, 30) calc_carboplatin_calvert(2, sex = "male", age = 50, scr = 1.1, weight = 70)
Calculate probability of cefepime-associated neurotoxicity as a function of cefepime plasma trough concentrations. This model was based on a data set of adult patients receiving thrice-daily cefepime and may not correspond to other dosing intervals or patient populations.
calc_cefepime_neurotoxicity(trough_concentration)
calc_cefepime_neurotoxicity(trough_concentration)
trough_concentration |
Cefepime plasma trough concentration (mg/L). |
Probability of cefepime-associated neurotoxicity.
The intercept and slope used in this function match Figure 2 in the cited paper, but differ slightly from the values provided in the text. This interpretation was confirmed via correspondence with the authors.
Boschung-Pasquier et al., Clinical Microbiology and Infection (2020)
calc_cefepime_neurotoxicity(trough_concentration = c(13.7, 17.8))
calc_cefepime_neurotoxicity(trough_concentration = c(13.7, 17.8))
Calculate an estimated serum creatinine. Function takes vectorized input as well.
calc_creat( sex = NULL, age = NULL, weight = NULL, height = NULL, adult_method = c("johanssen", "brooks"), digits = 1 )
calc_creat( sex = NULL, age = NULL, weight = NULL, height = NULL, adult_method = c("johanssen", "brooks"), digits = 1 )
sex |
sex, either 'male' or 'female' |
age |
age in years |
weight |
weight in kg (default 75 kg) |
height |
height in cm (default 165 cm) |
adult_method |
estimation adult method, 'johanssen' (default) or 'brooks', |
digits |
number of digits to round to |
For children and adolescents: Uses equations described in Ceriotti et al. Clin Chem. 2008, and Junge W et al. Clin Chim Acta. 2004. For age 15-18, a linear interpolation is used between equations for <15 Johanssen A et al. Ther Drug Monit 2011. For adults: Two methods are available Johanssen et al. Ther Drug Monit 2011. which describes a flat serum creatinine dependent on sex, and Brooks et al (unpublished) which is a linear regression built on the NHANES open-source data and takes into account sex, age, weight, and height. Equation: 'lm(SCr~Age+Sex+Weight+Height, data=NHANES)'
calc_creat(sex = "male", age = 40) calc_creat(sex = "male", age = 40, weight = 100, height = 175, adult_method = "brooks") calc_creat(sex = "male", age = c(10, 17, 60))
calc_creat(sex = "male", age = 40) calc_creat(sex = "male", age = 40, weight = 100, height = 175, adult_method = "brooks") calc_creat(sex = "male", age = c(10, 17, 60))
Calculate an estimated serum creatinine. Function takes vectorized input as well.
calc_creat_neo(pma = NULL, digits = 1)
calc_creat_neo(pma = NULL, digits = 1)
pma |
post-natal age in weeks |
digits |
number of digits to round to |
Uses equations described in Germovsek E et al. (http://www.ncbi.nlm.nih.gov/pubmed/27270281) based on data from Cuzzolin et al. (http://www.ncbi.nlm.nih.gov/pubmed/16773403) and Rudd et al. (http://www.ncbi.nlm.nih.gov/pubmed/6838252)
cr <- calc_creat_neo(pma = 36) convert_creat_unit(cr$value, unit_in = cr$unit, unit_out = "mg/dL")
cr <- calc_creat_neo(pma = 36) convert_creat_unit(cr$value, unit_in = cr$unit, unit_out = "mg/dL")
Dosing weight is determined based on total (TBW), ideal (IBW), or adjusted (ABW) body weight in kg.
calc_dosing_weight(weight, height, age, sex, verbose = TRUE, ...)
calc_dosing_weight(weight, height, age, sex, verbose = TRUE, ...)
weight |
weight |
height |
height |
age |
age |
sex |
sex |
verbose |
verbosity ('TRUE' or 'FALSE') |
... |
pased to 'calc_abw()' function |
This is derived using following: - In principle, use IBW - If total body weight (TBW) > 1.2*IBW, then use ABW - If TBW < IBW, use TBW
Returns a list of the following elements:
value |
Dosing weight, in units of kg |
unit |
Units of dosing weight (kg) |
type |
Type of dosing weight selected, e.g., total body weight, ideal body weight. |
calc_dosing_weight(weight = 50, height = 170, sex = "female", age = 50)
calc_dosing_weight(weight = 50, height = 170, sex = "female", age = 50)
Calculate the estimated glomerular filtration rate (an indicator of renal function) based on measured serum creatinine using one of the following approaches:
Cockcroft-Gault (using weight, ideal body weight, or adjusted body weight)
C-G spinal cord injury (using correction factor of 0.7, representing median correction point reported in the original publication (parapalegic patients: 0.8; tetrapalegic patients: 0.6))
Revised Lund-Malmo
Modification of Diet in Renal Disease study (MDRD; with or without consideration of race, using either the original equation (published 2001) or the equation updated to reflect serum creatinine assay standardization (2006))
CKD-EPI (with or without consideration of race, or 2021 re-fit without race)
Schwartz
Schwartz revised / bedside
Jelliffe
Jelliffe for unstable renal function. Note that the 15 P_adj recommended for hemodialysis patients is not included in this implementation.
Wright equation for eGFR in cancer patients, with creatinine measured using the Jaffe assay.
Equations for estimation of eGFR from Cystatin C concentrations are available from the 'calc_egfr_cystatin()' function.
calc_egfr( method = "cockcroft_gault", sex = NULL, age = NULL, scr = NULL, scr_unit = NULL, race = "other", weight = NULL, height = NULL, bsa = NULL, preterm = FALSE, ckd = FALSE, times = NULL, bsa_method = "dubois", relative = NULL, unit_out = "mL/min", verbose = TRUE, min_value = NULL, max_value = NULL, fail = TRUE, ... )
calc_egfr( method = "cockcroft_gault", sex = NULL, age = NULL, scr = NULL, scr_unit = NULL, race = "other", weight = NULL, height = NULL, bsa = NULL, preterm = FALSE, ckd = FALSE, times = NULL, bsa_method = "dubois", relative = NULL, unit_out = "mL/min", verbose = TRUE, min_value = NULL, max_value = NULL, fail = TRUE, ... )
method |
eGFR estimation method, choose from 'cockcroft_gault', 'cockcroft_gault_ideal', 'cockcroft_gault_adjusted', 'cockcroft_gault_adaptive', 'mdrd', 'mdrd_ignore_race', 'mdrd_original', 'mdrd_original_ignore_race', 'ckd_epi', 'ckd_epi_ignore_race', 'ckd_epi_as_2021', 'malmo_lund_revised', 'schwartz', 'jelliffe', 'jellife_unstable', 'wright'. |
sex |
sex |
age |
age, in years |
scr |
serum creatinine (mg/dL) |
scr_unit |
'mg/dL' or 'micromol/L' (=='umol/L') |
race |
'black' or 'other', Required for CKD-EPI and MDRD methods for estimating GFR. To use these methods without race, use 'method = "ckd_epi_ignore_race"', 'method = "ckd_epi_as_2021"', 'method = "mdrd_ignore_race"' or 'method = "mdrd_original_ignore_race"'. See Note section below for important considerations when using race as a predictive factor in eGFR. |
weight |
weight, in 'kg' |
height |
height, in 'cm', used for converting to/from BSA-normalized units. |
bsa |
body surface area |
preterm |
is patient preterm? Used for Schwartz method. |
ckd |
chronic kidney disease? Used for Schwartz method. |
times |
vector of sampling times (in days!) for creatinine (only used in Jelliffe equation for unstable patients) |
bsa_method |
BSA estimation method, see 'calc_bsa()' for details |
relative |
'TRUE'/'FALSE'. Report eGFR as per 1.73 m2? Requires BSA if re-calculation required. If 'NULL' (=default), will choose value typical for 'method'. |
unit_out |
'ml/min' (default), 'L/hr', or 'mL/hr' |
verbose |
verbosity, show guidance and warnings. 'TRUE' by default |
min_value |
minimum value ('NULL' by default). The cap is applied in the same unit as the 'unit_out'. |
max_value |
maximum value ('NULL' by default). The cap is applied in the same unit as the 'unit_out'. |
fail |
invoke 'stop()' if not all covariates available? |
... |
arguments passed on to 'calc_abw' or 'calc_dosing_weight' |
The MDRD and CKD-EPI equations use race as a factor in estimation of GFR. Racism has historically been and continues to be a problem in medicine, with racialized patients experiencing poorer outcomes. Given this context, the use of race in clinical algorithms should be considered carefully (Vyas et al., NEJM (2020)). Provided here are versions of the CKD-EPI and MDRD equations that do not consider the race of the patient. Removing race from GFR estimation may lead to worse outcomes for Black patients in some contexts (Casal et al., The Lancet (2021)). On the other hand, including race in GFR estimation may also prevent Black patients from obtaining procedures like kidney transplants (Zelnick, et al. JAMA Netw Open. (2021)). In 2021, the NKF/ASN Task Force on Reassessing the Inclusion of Race in Diagnosing Kidney Diseases published revised versions of the CKD-EPI equations refit on the original data but with race excluded, which may produce less biased estimates (Inker, et al., NEJM (2021)).
Cockcroft-Gault: Cockcroft & Gault, Nephron (1976)
Cockcroft-Gault for spinal cord injury: Mirahmadi et al., Paraplegia (1983)
Revised Lund-Malmo: Nyman et al., Clinical Chemistry and Laboratory Medicine (2014)
MDRD: Manjunath et al., Curr. Opin. Nephrol. Hypertens. (2001) and Levey et al., Clinical Chemistry (2007). (See Note.)
CKD-EPI: Levey et al., Annals of Internal Medicine (2009). (See Note.)
CKD-EPI (2021): Inker, et al., NEJM (2021).
Schwartz: Schwartz et al., Pediatrics (1976)
Schwartz revised / bedside: Schwartz et al., Journal of the American Society of Nephrology (2009)
Jelliffe for unstable renal function: Jelliffe, American Journal of Nephrology (2002)
calc_egfr(sex = "male", age = 50, scr = 1.1, weight = 70) calc_egfr(sex = "male", age = 50, scr = 1.1, weight = 70, unit_out = "L/hr") calc_egfr(sex = "male", age = 50, scr = 1.1, weight = 70, bsa = 1.8, method = "ckd_epi") calc_egfr(sex = "male", age = 50, scr = c(1.1, 0.8), weight = 70, height = 170, method = "jelliffe") calc_egfr(sex = "male", age = 50, scr = c(1.1, 0.8), weight = 70, height = 170, method = "jelliffe_unstable") calc_egfr(sex = "male", age = 50, scr = 1.1, weight = 70, bsa = 1.6, method = "malmo_lund_revised", relative = FALSE)
calc_egfr(sex = "male", age = 50, scr = 1.1, weight = 70) calc_egfr(sex = "male", age = 50, scr = 1.1, weight = 70, unit_out = "L/hr") calc_egfr(sex = "male", age = 50, scr = 1.1, weight = 70, bsa = 1.8, method = "ckd_epi") calc_egfr(sex = "male", age = 50, scr = c(1.1, 0.8), weight = 70, height = 170, method = "jelliffe") calc_egfr(sex = "male", age = 50, scr = c(1.1, 0.8), weight = 70, height = 170, method = "jelliffe_unstable") calc_egfr(sex = "male", age = 50, scr = 1.1, weight = 70, bsa = 1.6, method = "malmo_lund_revised", relative = FALSE)
Calculate eGFR based on Cystatin C measurements
calc_egfr_cystatin( cystatin = NULL, cystatin_unit = "mg/L", method = c("grubb", "larsson", "hoek"), unit_out = c("ml/min", "ml/hr", "l/min", "l/hr", "ml/min/1.73m2") )
calc_egfr_cystatin( cystatin = NULL, cystatin_unit = "mg/L", method = c("grubb", "larsson", "hoek"), unit_out = c("ml/min", "ml/hr", "l/min", "l/hr", "ml/min/1.73m2") )
cystatin |
serum cystatin concentration (mg/L) |
cystatin_unit |
only 'mg/L' available |
method |
eGFR estimation method, choose from 'grubb', 'larsson', 'hoek' |
unit_out |
eGFR output unit, choose from 'ml/min', 'ml/hr', 'l/min', 'l/hr' |
calc_egfr_cystatin(1.0) calc_egfr_cystatin(1.0, method = "larsson") calc_egfr_cystatin(1.0, unit_out = "l/hr")
calc_egfr_cystatin(1.0) calc_egfr_cystatin(1.0, method = "larsson") calc_egfr_cystatin(1.0, unit_out = "l/hr")
Get an estimate of fat-free mass (FFM, in kg) based on weight, height, and sex (and age for Storset equation).
calc_ffm( weight = NULL, bmi = NULL, sex = NULL, height = NULL, age = NULL, method = c("janmahasatian", "green", "al-sallami", "storset", "bucaloiu", "hume", "james", "garrow_webster"), digits = 1 )
calc_ffm( weight = NULL, bmi = NULL, sex = NULL, height = NULL, age = NULL, method = c("janmahasatian", "green", "al-sallami", "storset", "bucaloiu", "hume", "james", "garrow_webster"), digits = 1 )
weight |
total body weight in kg |
bmi |
BMI, only used in 'green' method. If 'weight' and 'height' are both specified, 'bmi' will be calculated on-the-fly. |
sex |
sex, either 'male' of 'female' |
height |
height in cm, only required for 'holford' method, can be used instead of 'bmi' for 'green' method |
age |
age, only used for Storset equation |
method |
estimation method, one of 'janmahasatian' (default), 'green', 'al-sallami', 'storset', 'bucaloiu', 'hume', 'james', or 'garrow_webster'. |
digits |
round to number of digits |
References: 'janmahasatian', 'green': Janmahasatian et al. Clin Pharmacokinet. 2005;44(10):1051-65) 'al-sallami': Al-Sallami et al. Clin Pharmacokinet 2015 'storset': Storset E et al. TDM 2016 'bucaloiu': Bucaloiu ID et al. Int J of Nephrol Renovascular Dis. 2011 (Morbidly obese females) 'hume': Hume R. J Clin Pathol 1966 'james': James WPT et al. Research on obesity: a report of the DHSS/MRC Group 1976 ‘garrow_webster': Garrow JS, Webster J. Quetelet’s index (W/H2) as a measure of fatness. Int J Obesity 1984
Overview: - Sinha J, Duffull1 SB, Al-Sallami HS. Clin Pharmacokinet 2018. https://doi.org/10.1007/s40262-017-0622-5
Returns a list of the following elements:
value |
Fat-free Mass (FFM) in units of kg |
unit |
Unit describing FFM, (kg) |
method |
Method used to calculate FFF |
calc_ffm(weight = 70, bmi = 25, sex = "male") calc_ffm(weight = 70, height = 180, age = 40, sex = "female", method = "storset")
calc_ffm(weight = 70, bmi = 25, sex = "male") calc_ffm(weight = 70, height = 180, age = 40, sex = "female", method = "storset")
Get an estimate of ideal body weight. This function allows several commonly used equations
calc_ibw( weight = NULL, height = NULL, age = NULL, sex = "male", method_children = "standard", method_adults = "devine" ) ibw_standard(age, height = NULL, sex = NULL) ibw_devine(age, height = NULL, sex = NULL)
calc_ibw( weight = NULL, height = NULL, age = NULL, sex = "male", method_children = "standard", method_adults = "devine" ) ibw_standard(age, height = NULL, sex = NULL) ibw_devine(age, height = NULL, sex = NULL)
weight |
weight in kg |
height |
height in cm |
age |
age in years |
sex |
sex |
method_children |
method to use for children >1 and <18 years. Currently '"standard"' is the only method that is supported. |
method_adults |
method to use for >=18 years. Currently '"devine"' is the only method that is supported (Devine BJ. Drug Intell Clin Pharm. 1974;8:650-655). |
Equations:
<1yo Use actual body weight
1-17 years old ('standard'): if height < 5ft: IBW= (height in cm2 x 1.65)/1000 if height > 5ft: IBW (male) = 39 + (2.27 x height in inches over 5 feet) IBW (female) = 42.2 + (2.27 x height in inches over 5 feet)
Methods not implemented yet: McLaren: IBW = - step1: x = 50th percentile height for given age - step2: IBW = 50th percentile weight for x on weight-for-height scale Moore: IBW = weight at percentile x for given age, where x is percentile of height for given age BMI: IBW = 50th percentile of BMI for given age x (height in m)^2 ADA: IBW = 50th percentile of WT for given age
>= 18 years old (Devine equation) IBW (male) = 50 + (2.3 x height in inches over 5 feet) IBW (female) = 45.5 + (2.3 x height in inches over 5 feet)
calc_ibw(weight = 70, height = 170, age = 40, sex = "female") calc_ibw(weight = 30, height = 140, age = 10, sex = "female")
calc_ibw(weight = 70, height = 170, age = 40, sex = "female") calc_ibw(weight = 30, height = 140, age = 10, sex = "female")
Calculate elimination rate when given two TDM samples
calc_kel_double_tdm( dose = 1000, t = c(2, 11.5), dv = c(30, 10), tau = 12, t_inf = 1, V = NULL, steady_state = TRUE, return_parameters = FALSE )
calc_kel_double_tdm( dose = 1000, t = c(2, 11.5), dv = c(30, 10), tau = 12, t_inf = 1, V = NULL, steady_state = TRUE, return_parameters = FALSE )
dose |
dose amount |
t |
time or time after dose, vector of size 2 |
dv |
observed value, vector of size 2 |
tau |
dosing interval |
t_inf |
infusion time |
V |
if specified, use that (empiric) value and don't estimate from data. Default 'NULL'. |
steady_state |
samples taken at steady state? Only influences AUCtau. |
return_parameters |
return all parameters instead of only kel? |
calc_kel_double_tdm(dose = 1000, t = c(3, 18), dv = c(30, 10))
calc_kel_double_tdm(dose = 1000, t = c(3, 18), dv = c(30, 10))
Using iterative k_el calculation, and based on given Volume
calc_kel_single_tdm( dose = 1000, V = 50, t = 10, dv = 10, tau = 12, t_inf = 1, kel_init = 0.1, n_iter = 25, learn_rate = 0.2 )
calc_kel_single_tdm( dose = 1000, V = 50, t = 10, dv = 10, tau = 12, t_inf = 1, kel_init = 0.1, n_iter = 25, learn_rate = 0.2 )
dose |
dose amount |
V |
volume of distribution |
t |
time or time after dose |
dv |
observed value |
tau |
dosing interval |
t_inf |
infusion time |
kel_init |
estimate of elimination rate |
n_iter |
number of iterations to improve estimate of elimination rate |
learn_rate |
default is 0.2 |
calc_kel_single_tdm(dose = 1000, t = 18)
calc_kel_single_tdm(dose = 1000, t = 18)
Calculate the kinetic GFR based on a patients first two serum creatinine measurements. Kinetic GFR may be more predictive of future AKI for patients whose serum creatinine is changing quickly. Briefly, an increase in SCr over the course of a day indicates an effective GFR lower than the most recent SCr measurement may indicate if steadystate is assumed, while a decrease in SCr over a short time indicates a higher effective GFR than the most recent SCr would indicate. There are several ways of approximating maximum theoretical creatinine accumulation rate; here the method used by Pianta et al., (PLoS ONE, 2015) has been implemented.
calc_kgfr( scr1 = NULL, scr2 = NULL, scr_unit = "mg/dl", time_delay = NULL, weight = NULL, vd = NULL, egfr = NULL, egfr_method = NULL, sex = NULL, age = NULL, height = NULL, ... )
calc_kgfr( scr1 = NULL, scr2 = NULL, scr_unit = "mg/dl", time_delay = NULL, weight = NULL, vd = NULL, egfr = NULL, egfr_method = NULL, sex = NULL, age = NULL, height = NULL, ... )
scr1 |
baseline scr |
scr2 |
second scr measurement |
scr_unit |
scr unit, defaults to mg/dl |
time_delay |
time between scr1 and scr2 in hours |
weight |
patient weight in kg |
vd |
volume of distribution in L, defaults to 0.6 * weight |
egfr |
eGFR in ml/min at the time of scr1, or leave blank to call calc_egfr |
egfr_method |
string, only necessary if egfr is not specified. |
sex |
string (male or female), only necessary if egfr is not specified. |
age |
age in years, only necessary if egfr is not specified. |
height |
in m, necessary only for some egfr calculation methods. |
... |
further arguments (optional) to be passed to calc_egfr. |
kGFR, in ml/min
Pianta et al., PLoS ONE (2015)
calc_kgfr(weight = 100, scr1 = 150, scr2 = 200, scr_unit = 'umol/l', time_delay = 24, egfr = 30) calc_kgfr(weight = 70, scr1 = 350, scr2 = 300, scr_unit = 'umol/l', time_delay = 24, egfr_method = 'mdrd', age = 70, sex = 'male')
calc_kgfr(weight = 100, scr1 = 150, scr2 = 200, scr_unit = 'umol/l', time_delay = 24, egfr = 30) calc_kgfr(weight = 70, scr1 = 350, scr2 = 300, scr_unit = 'umol/l', time_delay = 24, egfr_method = 'mdrd', age = 70, sex = 'male')
Get an estimate of lean body weight (LBW, in kg) based on weight, height, and sex.
calc_lbw( weight = NULL, bmi = NULL, sex = NULL, height = NULL, method = "green", digits = 1 )
calc_lbw( weight = NULL, bmi = NULL, sex = NULL, height = NULL, method = "green", digits = 1 )
weight |
total body weight in kg |
bmi |
bmi |
sex |
sex, either 'male' of 'female' |
height |
height in cm |
method |
estimation method, either 'green' (default), 'boer', 'james', 'hume' |
digits |
round to number of digits |
Note: technically not the same as fat-free mass, although difference is small.
References: 'green': Green and Duffull. Clin Pharmacol Ther 2002; 'james': Absalom AR et al. Br J Anaesth 2009; 103:26-37. James W. Research on obesity. London: Her Majesty's Stationary Office, 1976. 'hume' : Hume R et al. J Clin Pathol. 1966 Jul; 19(4):389-91. 'boer' : Boer P et al. Am J Physiol 1984; 247: F632-5
Returns a list of the following elements:
value |
Lean Body Weight (LBW) in units of kg |
unit |
Unit describing LBW, (kg) |
calc_lbw(weight = 80, height = 170, sex = "male") calc_lbw(weight = 80, height = 170, sex = "male", method = "james")
calc_lbw(weight = 80, height = 170, sex = "male") calc_lbw(weight = 80, height = 170, sex = "male", method = "james")
Assigns neutropenia grade based on the National Cancer Institute system. Note that while this system assigns a grade of 1 to an ANC between 1500-2000, the term neutropenia is usually reserved for a grade of 2 or higher (an ANC of <1500)
calc_neutropenia_grade(anc)
calc_neutropenia_grade(anc)
anc |
absolute neutrophil count (ANC), in number per microliter |
Neutropenia: US National Cancer Institute's Common Toxicity Criteria
calc_neutropenia_grade( anc = c(500, 1501) )
calc_neutropenia_grade( anc = c(500, 1501) )
based on two sampling points (in same interval)
calc_t12(t1, t2, y1, y2)
calc_t12(t1, t2, y1, y2)
t1 |
first sampling timepoint |
t2 |
second sampling timepoint |
y1 |
first sample value |
y2 |
second sample value |
calc_t12(3, 24, 30, 10)
calc_t12(3, 24, 30, 10)
returns true if all patient covs specified in required covs are non-null, non-NA and not a 0-character string. See 'is.nil' for missing data types checked. Returns TRUE if no covariates are required.
check_covs_available( cov_reqs = NULL, patient_covs = NULL, verbose = TRUE, fail = TRUE )
check_covs_available( cov_reqs = NULL, patient_covs = NULL, verbose = TRUE, fail = TRUE )
cov_reqs |
vector of covariates required for calculating derived covariatiate |
patient_covs |
named list of covariates |
verbose |
stop and describe missing covariate(s)? |
fail |
invoke 'stop()' if not all covariates available? |
check_covs_available( egfr_cov_reqs('cockcroft_gault_ideal')[[1]], list(creat = 1, weight = 100, height = 160, sex = 'female', age = 90))
check_covs_available( egfr_cov_reqs('cockcroft_gault_ideal')[[1]], list(creat = 1, weight = 100, height = 160, sex = 'female', age = 90))
Convert cm to inch
cm2inch(cm)
cm2inch(cm)
cm |
vector |
cm2inch(2.54)
cm2inch(2.54)
Convert concentration to molar
conc2mol(conc = NULL, unit_conc = NULL, mol_weight = NULL, unit_mol = NULL)
conc2mol(conc = NULL, unit_conc = NULL, mol_weight = NULL, unit_mol = NULL)
conc |
concentration in e.g. g/L |
unit_conc |
one of 'g/l', 'mg/l', 'microg/l', 'mcg/l", 'ng/l', 'mg/ml', 'microg/ml', 'mcg/ml', 'ng/ml' |
mol_weight |
concentration in g/mol |
unit_mol |
one of 'mol/L', 'mmol/mL', 'mmol/L' |
conc2mol(100, unit_conc = "g/l", mol_weight = 180.15588)
conc2mol(100, unit_conc = "g/l", mol_weight = 180.15588)
Accepted units are "g_l", "g_dl", or "micromol_l". Arguments supplied to 'value' and 'unit_in' units must be of the same length. "To" unit must be of length 1. #'
convert_albumin_unit( value, unit_in = valid_units("serum_albumin"), unit_out = valid_units("serum_albumin") )
convert_albumin_unit( value, unit_in = valid_units("serum_albumin"), unit_out = valid_units("serum_albumin") )
value |
albumin measurements |
unit_in |
from unit, e.g. '"g_l"'. |
unit_out |
to flow unit, e.g. '"g_dl"' |
## single values convert_albumin_unit(0.6, "g_dl", "g_l") ## vectorized convert_albumin_unit( c(0.4, 2, 0.3), unit_in = c("g_dl", "g_l", "g_dl"), unit_out = c("g_l") )
## single values convert_albumin_unit(0.6, "g_dl", "g_l") ## vectorized convert_albumin_unit( c(0.4, 2, 0.3), unit_in = c("g_dl", "g_l", "g_dl"), unit_out = c("g_l") )
Accepted units are "mg_dl" and "micromol_l". Arguments supplied to 'value' and 'unit_in' units must be of the same length. "To" unit must be of length 1. #'
convert_bilirubin_unit( value, unit_in = valid_units("bilirubin"), unit_out = valid_units("bilirubin") )
convert_bilirubin_unit( value, unit_in = valid_units("bilirubin"), unit_out = valid_units("bilirubin") )
value |
bilirubin measurements |
unit_in |
from unit, e.g. '"g_l"'. |
unit_out |
to flow unit, e.g. '"g_dl"' |
## single values convert_bilirubin_unit(1, "mg_dl", "micromol_l") ## vectorized convert_bilirubin_unit( c(1, 1.1, 1.2), unit_in = "mg_dl", unit_out = "micromol_l" )
## single values convert_bilirubin_unit(1, "mg_dl", "micromol_l") ## vectorized convert_bilirubin_unit( c(1, 1.1, 1.2), unit_in = "mg_dl", unit_out = "micromol_l" )
Based on equations as reported in Srivastava et al. 2009 (Pediatr Res. 2009 Jan;65(1):113-6. doi: 10.1203/PDR.0b013e318189a6e8)
convert_creat_assay(scr, from = "idms", to = "jaffe")
convert_creat_assay(scr, from = "idms", to = "jaffe")
scr |
vector of serum creatinine values |
from |
assay type, either 'jaffe', 'enzymatic' or 'idms' |
to |
assay type, either 'jaffe', 'enzymatic' or 'idms' |
convert_creat_assay(scr = c(1.1, 0.8, 0.7), from = "enzymatic", to = "jaffe")
convert_creat_assay(scr = c(1.1, 0.8, 0.7), from = "enzymatic", to = "jaffe")
Convert creatinine to different unit
convert_creat_unit( value, unit_in = valid_units("scr"), unit_out = valid_units("scr") )
convert_creat_unit( value, unit_in = valid_units("scr"), unit_out = valid_units("scr") )
value |
serum creatinine in either mg/dL or micromol/L |
unit_in , unit_out
|
unit, either 'mg/dL' or 'micromol/L' |
convert_creat_unit(1, "mg/dL", "micromol/l") convert_creat_unit(88.42, "micromol/l", "mg/dL")
convert_creat_unit(1, "mg/dL", "micromol/l") convert_creat_unit(88.42, "micromol/l", "mg/dL")
Flow units are expected to be specified as a combination of volume per time units, potentially specified per kg body weight, e.g. "mL/min", or "L/hr/kg".
convert_flow_unit(value = NULL, from = "l", to = "ml", weight = NULL)
convert_flow_unit(value = NULL, from = "l", to = "ml", weight = NULL)
value |
flow value |
from |
from flow unit, e.g. 'L/hr'. |
to |
to flow unit, e.g. 'mL/min' |
weight |
for performing per weight (kg) conversion |
Accepted volume units are "L", "dL", and "mL". Accepted time units are "min", "hr", and "day". The only accepted weight unit is "kg".
The function is not case-sensitive.
## single values convert_flow_unit(60, "L/hr", "ml/min") convert_flow_unit(1, "L/hr/kg", "ml/min", weight = 80) ## vectorized convert_flow_unit( c(10, 20, 30), from = c("L/hr", "mL/min", "L/hr"), to = c("ml/min/kg", "L/hr", "L/hr/kg"), weight = c(70, 80, 90))
## single values convert_flow_unit(60, "L/hr", "ml/min") convert_flow_unit(1, "L/hr/kg", "ml/min", weight = 80) ## vectorized convert_flow_unit( c(10, 20, 30), from = c("L/hr", "mL/min", "L/hr"), to = c("ml/min/kg", "L/hr", "L/hr/kg"), weight = c(70, 80, 90))
Convert dose to expected AUCinf or AUCt for 1 compartment linear PK model
dose2auc(dose, CL, V, t_auc = NULL)
dose2auc(dose, CL, V, t_auc = NULL)
dose |
dose amount |
CL |
Clearance |
V |
Volume of distribution |
t_auc |
if AUC_t is desired, 't_auc' specifies time until which AUC_t is calculated |
dose2auc(dose = 1000, CL = 5, V = 50) dose2auc(dose = 1000, CL = 5, V = 50, t_auc = c(12, 24, 48, 72))
dose2auc(dose = 1000, CL = 5, V = 50) dose2auc(dose = 1000, CL = 5, V = 50, t_auc = c(12, 24, 48, 72))
returns a named list, with the name being the eGFR method after being checked for certain typos or misspecifications, and the values being the required covariates.
egfr_cov_reqs(method, relative = NULL)
egfr_cov_reqs(method, relative = NULL)
method |
egfr calculation method |
relative |
if egfr calculations should be relative or not |
egfr_cov_reqs('schwartz_revised')
egfr_cov_reqs('schwartz_revised')
Generic function to calculate the dose nearest to a specific dose unit increment
find_nearest_dose(dose = NULL, increment = 250, type = "round")
find_nearest_dose(dose = NULL, increment = 250, type = "round")
dose |
dose value |
increment |
available increments of dose |
type |
how to round, one of 'round', 'floor', or 'ceiling' |
find_nearest_dose(573) find_nearest_dose(573, increment = 50)
find_nearest_dose(573) find_nearest_dose(573, increment = 50)
Generic function to calculate the interval nearest to a possible dosing interval
find_nearest_interval( interval = NULL, possible = c(4, 6, 8, 12, 24, 36, 48), type = "absolute" )
find_nearest_interval( interval = NULL, possible = c(4, 6, 8, 12, 24, 36, 48), type = "absolute" )
interval |
dose value |
possible |
available increments of dose |
type |
pick either 'nearest' absolute interval, or nearest 'lower', or nearest 'higher' interval. |
find_nearest_interval(19.7) find_nearest_interval(19.7, c(6, 8, 12))
find_nearest_interval(19.7) find_nearest_interval(19.7, c(6, 8, 12))
Calculate fraction of steady state at particular time after start of dosing
fraction_of_ss(kel = NULL, halflife = NULL, t = NULL, n = NULL, tau = NULL)
fraction_of_ss(kel = NULL, halflife = NULL, t = NULL, n = NULL, tau = NULL)
kel |
drug elimination rate |
halflife |
halflife. Either 'kel' or 'halflife' is required. |
t |
time at which to calculate fraction of steady state |
n |
number of dosing intervals after which to calculate fraction of steady state. Requires 'tau' as well, cannot be used together with 't' argument. |
tau |
dosing interval |
fraction_of_ss(halflife = 24, t = 72) fraction_of_ss(halflife = 36, n = 3, tau = 24)
fraction_of_ss(halflife = 24, t = 72) fraction_of_ss(halflife = 36, n = 3, tau = 24)
Convert inch to cm
inch2cm(inch)
inch2cm(inch)
inch |
vector |
inch2cm(1)
inch2cm(1)
Convert kg to lbs
kg2lbs(kg)
kg2lbs(kg)
kg |
vector |
kg2lbs(1)
kg2lbs(1)
Convert kg to oz
kg2oz(kg)
kg2oz(kg)
kg |
vector |
kg2oz(1)
kg2oz(1)
Convert lbs to kg
lbs2kg(lbs)
lbs2kg(lbs)
lbs |
vector |
lbs2kg(2.20462)
lbs2kg(2.20462)
Convert molar to concentration
mol2conc(mol = NULL, unit_mol = NULL, unit_conc = NULL, mol_weight = NULL)
mol2conc(mol = NULL, unit_mol = NULL, unit_conc = NULL, mol_weight = NULL)
mol |
concentration in molars |
unit_mol |
unit of input concentration (molar), one of 'mol/L', 'mmol/mL', 'mmol/L' |
unit_conc |
output unit, one of 'g/l', 'mg/l', 'microg/l', 'mcg/l", 'ng/l', 'mg/ml', 'microg/ml', 'mcg/ml', 'ng/ml' |
mol_weight |
concentration in g/mol |
mol2conc(1, unit_mol = "mmol/l", mol_weight = 180)
mol2conc(1, unit_mol = "mmol/l", mol_weight = 180)
Perform an NCA based on a NONMEM-style dataset
nca( data = NULL, dose = 100, tau = 24, method = c("log_linear", "log_log", "linear"), scale = list(auc = 1, conc = 1), dv_min = 0.001, t_inf = NULL, fit_samples = NULL, weights = NULL, extend = TRUE, has_baseline = TRUE, route = c("iv", "oral", "im", "sc") )
nca( data = NULL, dose = 100, tau = 24, method = c("log_linear", "log_log", "linear"), scale = list(auc = 1, conc = 1), dv_min = 0.001, t_inf = NULL, fit_samples = NULL, weights = NULL, extend = TRUE, has_baseline = TRUE, route = c("iv", "oral", "im", "sc") )
data |
data.frame with time and dv columns |
dose |
dose amount |
tau |
dosing frequency, default is 24. |
method |
'linear', 'log_linear' (default), or 'log_log' |
scale |
list with scaling for auc and concentration ('conc') |
dv_min |
minimum concentrations, lower observations will be set to this value |
t_inf |
infusion time, defaults to 0 |
fit_samples |
vector of sample indexes used in fit to calculate elimination rate, e.g. 'c(3,4,5)'. If not specified (default), it will evaluate which of the last n samples shows the largest adjusted R^2 when log-transformed data is fitted using linear regression, and use those samples in the estimation of the elimination rate. |
weights |
vector of weights to be used in linear regression (same size as specified concentration data), or function with concentration as argument. |
extend |
perform an 'extended' NCA, i.e. for the calculation of the AUCs, back-extend to the expected true Cmax to also include that area. |
has_baseline |
does the included data include a baseline? If 'FALSE', baseline is set to zero. |
route |
administration route, 'iv' (intravenous, default), 'oral', 'sc' (sub-cutaneous), or 'im' (intra-muscular). |
Returns a list of three lists:
pk
Lists pk parameters.
kel
: elimination constant
t_12
: half-life
v
: distribution volume
cl
: clearance
descriptive
Lists exposure parameters.
cav_t
: the average concentration between the first observation and the last observation without extrapolating to tau
cav_tau
: the average concentration from 0 to tau
cmin
: the extrapolated concentration at time = tau
c_max_true
: only available if extend = TRUE
, the extrapolated peak concentration
c_max
: only available if extend = FALSE
, the observed maximum concentration
auc_inf
: the extrapolated AUC as time goes to infinity
auc_24
: the extrapolated AUC after 24 hours, provided no further doses are administered
auc_tau
: the extrapolated AUC at the end of the dosing interval
auc_t
: the AUC at the time of the last observation
settings
Lists dosing information.
dose
: dose quantity
tau
: dosing interval
data <- data.frame(time = c(0, 2, 4, 6, 8, 12, 16), dv = c(0, 10, 14, 11, 9, 5, 1.5)) nca(data, t_inf = 2)
data <- data.frame(time = c(0, 2, 4, 6, 8, 12, 16), dv = c(0, 10, 14, 11, 9, 5, 1.5)) nca(data, t_inf = 2)
Convert oz to kg
oz2kg(oz)
oz2kg(oz)
oz |
vector |
oz2kg(2.20462)
oz2kg(2.20462)
Based on tables from WHO: http://www.who.int/growthref/who2007_bmi_for_age/en/
pct_bmi_for_age( age = NULL, bmi = NULL, sex = NULL, height = NULL, return_median = FALSE, ... )
pct_bmi_for_age( age = NULL, bmi = NULL, sex = NULL, height = NULL, return_median = FALSE, ... )
age |
age in years |
bmi |
bmi Optional, if specified, will calculate closest percentile and return in list as 'percentile' |
sex |
either 'male' or 'female' |
height |
height |
return_median |
just return the median expected value |
... |
parameters passed to 'read_who_table()' |
pct_bmi_for_age(age = 8, sex = "male") pct_bmi_for_age(age = 8, bmi = 15, sex = "male")
pct_bmi_for_age(age = 8, sex = "male") pct_bmi_for_age(age = 8, bmi = 15, sex = "male")
Based on tables from WHO: http://www.who.int/childgrowth/standards/height_for_age/en/
pct_height_for_age( age = NULL, height = NULL, sex = NULL, return_median = FALSE, ... )
pct_height_for_age( age = NULL, height = NULL, sex = NULL, return_median = FALSE, ... )
age |
age in years |
height |
height in kg. Optional, if specified, will calculate closest percentile and return in list as 'percentile' |
sex |
either 'male' or 'female' |
return_median |
just return the median expected value |
... |
parameters passed to 'read_who_table()' |
pct_height_for_age(age = 5, sex = "female") pct_height_for_age(age = 5, height = 112, sex = "female")
pct_height_for_age(age = 5, sex = "female") pct_height_for_age(age = 5, height = 112, sex = "female")
Based on tables from WHO: http://www.who.int/childgrowth/standards/weight_for_age/en/
pct_weight_for_age( age = NULL, weight = NULL, sex = NULL, return_median = FALSE, ... )
pct_weight_for_age( age = NULL, weight = NULL, sex = NULL, return_median = FALSE, ... )
age |
age in years |
weight |
weight in kg. Optional, if specified, will calculate closest percentile and return in list as 'percentile' |
sex |
either 'male' or 'female' |
return_median |
just return the median expected value |
... |
parameters passed to 'read_who_table()' |
pct_weight_for_age(age = 5, sex = "female") pct_weight_for_age(age = 5, weight = 20, sex = "female")
pct_weight_for_age(age = 5, sex = "female") pct_weight_for_age(age = 5, weight = 20, sex = "female")
Concentration predictions for 1-compartmental PK model after single or multiple bolus doses
pk_1cmt_bolus(t = c(0:24), dose = 100, tau = 12, CL = 3, V = 30, ruv = NULL)
pk_1cmt_bolus(t = c(0:24), dose = 100, tau = 12, CL = 3, V = 30, ruv = NULL)
t |
vector of time |
dose |
dose |
tau |
dosing interval |
CL |
clearance |
V |
volume of distribution |
ruv |
residual error (list) |
pk_1cmt_bolus(dose = 500, tau = 12, CL = 5, V = 50) pk_1cmt_bolus(dose = 500, tau = 12, CL = 5, V = 50, t = 24) pk_1cmt_bolus( dose = 500, tau = 12, CL = 5, V = 50, ruv = list(prop = 0.1, add = 0.1))
pk_1cmt_bolus(dose = 500, tau = 12, CL = 5, V = 50) pk_1cmt_bolus(dose = 500, tau = 12, CL = 5, V = 50, t = 24) pk_1cmt_bolus( dose = 500, tau = 12, CL = 5, V = 50, ruv = list(prop = 0.1, add = 0.1))
Takes single values for dose or model parameters, or vector of either dose or parameters (but not both).
pk_1cmt_bolus_cmax_ss(dose = 100, tau = 12, CL = 3, V = 30, ruv = NULL)
pk_1cmt_bolus_cmax_ss(dose = 100, tau = 12, CL = 3, V = 30, ruv = NULL)
dose |
dose |
tau |
dosing interval |
CL |
clearance |
V |
volume of distrubition |
ruv |
residual variability, specified as list with optional arguments for proportional, additive, or exponential components, e.g. 'list(prop=0.1, add=1, exp=0)' |
pk_1cmt_bolus_cmax_ss( dose = 500, tau = 12, CL = 5, V = 50)
pk_1cmt_bolus_cmax_ss( dose = 500, tau = 12, CL = 5, V = 50)
Takes single values for dose or model parameters, or vector of either dose or parameters (but not both).
pk_1cmt_bolus_cmin_ss(dose = 100, tau = 12, CL = 3, V = 30, ruv = NULL)
pk_1cmt_bolus_cmin_ss(dose = 100, tau = 12, CL = 3, V = 30, ruv = NULL)
dose |
dose |
tau |
dosing interval |
CL |
clearance |
V |
volume of distrubition |
ruv |
residual variability, specified as list with optional arguments for proportional, additive, or exponential components, e.g. 'list(prop=0.1, add=1, exp=0)' |
pk_1cmt_bolus_cmin_ss( dose = 500, tau = 12, CL = 5, V = 50)
pk_1cmt_bolus_cmin_ss( dose = 500, tau = 12, CL = 5, V = 50)
Calculate dose to achieve steady state Cmax for 1-compartmental PK model bolus dosing at steady state
pk_1cmt_bolus_dose_from_cmax(cmax = 1, tau = 12, CL = 3, V = 30)
pk_1cmt_bolus_dose_from_cmax(cmax = 1, tau = 12, CL = 3, V = 30)
cmax |
desired trough concentration |
tau |
dosing interval |
CL |
clearance |
V |
volume of distribution |
dos <- pk_1cmt_bolus_dose_from_cmax( cmax = 10, tau = 12, CL = 5, V = 50) find_nearest_dose(dos, 100)
dos <- pk_1cmt_bolus_dose_from_cmax( cmax = 10, tau = 12, CL = 5, V = 50) find_nearest_dose(dos, 100)
Calculate dose to achieve steady state trough for 1-compartmental PK model bolus dosing at steady state
pk_1cmt_bolus_dose_from_cmin(cmin = 1, tau = 12, CL = 3, V = 30)
pk_1cmt_bolus_dose_from_cmin(cmin = 1, tau = 12, CL = 3, V = 30)
cmin |
desired trough concentration |
tau |
dosing interval |
CL |
clearance |
V |
volume of distribution |
dos <- pk_1cmt_bolus_dose_from_cmin( cmin = 5, tau = 12, CL = 5, V = 50) find_nearest_dose(dos, 100)
dos <- pk_1cmt_bolus_dose_from_cmin( cmin = 5, tau = 12, CL = 5, V = 50) find_nearest_dose(dos, 100)
Concentration predictions for 1-compartmental PK model with bolus dosing at steady state
pk_1cmt_bolus_ss(t = c(0:24), dose = 100, tau = 12, CL = 3, V = 30, ruv = NULL)
pk_1cmt_bolus_ss(t = c(0:24), dose = 100, tau = 12, CL = 3, V = 30, ruv = NULL)
t |
vector of time |
dose |
dose |
tau |
dosing interval |
CL |
clearance |
V |
volume of distribution |
ruv |
residual variability, specified as list with optional arguments for proportional, additive, or exponential components, e.g. 'list(prop=0.1, add=1, exp=0)' |
pk_1cmt_bolus_ss(dose = 500, tau = 12, CL = 5, V = 50) pk_1cmt_bolus_ss( dose = 500, tau = 12, CL = 5, V = 50, ruv = list(prop = 0.1, add = 0.1))
pk_1cmt_bolus_ss(dose = 500, tau = 12, CL = 5, V = 50) pk_1cmt_bolus_ss( dose = 500, tau = 12, CL = 5, V = 50, ruv = list(prop = 0.1, add = 0.1))
Concentration predictions for 1-compartmental PK model after single or multiple bolus doses
pk_1cmt_inf( t = c(0:24), dose = 100, tau = 12, t_inf = 2, CL = 3, V = 30, ruv = NULL )
pk_1cmt_inf( t = c(0:24), dose = 100, tau = 12, t_inf = 2, CL = 3, V = 30, ruv = NULL )
t |
vector of time |
dose |
dose |
tau |
dosing interval |
t_inf |
infusion time |
CL |
clearance |
V |
volume of distribution |
ruv |
residual error (list) |
pk_1cmt_inf(dose = 500, tau = 12, t_inf = 2, CL = 5, V = 50) pk_1cmt_inf( dose = 500, tau = 12, t_inf = 2, CL = 5, V = 50, ruv = list(prop = 0.1, add = 0.1))
pk_1cmt_inf(dose = 500, tau = 12, t_inf = 2, CL = 5, V = 50) pk_1cmt_inf( dose = 500, tau = 12, t_inf = 2, CL = 5, V = 50, ruv = list(prop = 0.1, add = 0.1))
Takes single values for dose or model parameters, or vector of either dose or parameters (but not both).
pk_1cmt_inf_cmax_ss(dose, tau, CL, V, t_inf, ruv = NULL)
pk_1cmt_inf_cmax_ss(dose, tau, CL, V, t_inf, ruv = NULL)
dose |
dose |
tau |
dosing interval |
CL |
clearance |
V |
volume of distrubition |
t_inf |
infusion time |
ruv |
residual variability, specified as list with optional arguments for proportional, additive, or exponential components, e.g. 'list(prop=0.1, add=1, exp=0)' |
pk_1cmt_inf_cmax_ss(dose = 500, tau = 12, t_inf = 2, CL = 5, V = 50)
pk_1cmt_inf_cmax_ss(dose = 500, tau = 12, t_inf = 2, CL = 5, V = 50)
Takes single values for dose or model parameters, or vector of either dose or parameters (but not both).
pk_1cmt_inf_cmin_ss( dose = 100, tau = 12, CL = 3, V = 30, t_inf = 2, ruv = NULL )
pk_1cmt_inf_cmin_ss( dose = 100, tau = 12, CL = 3, V = 30, t_inf = 2, ruv = NULL )
dose |
dose |
tau |
dosing interval |
CL |
clearance |
V |
volume of distrubition |
t_inf |
infusion time |
ruv |
residual variability, specified as list with optional arguments for proportional, additive, or exponential components, e.g. 'list(prop=0.1, add=1, exp=0)' |
pk_1cmt_inf_cmin_ss(dose = 500, tau = 12, t_inf = 2, CL = 5, V = 50)
pk_1cmt_inf_cmin_ss(dose = 500, tau = 12, t_inf = 2, CL = 5, V = 50)
Calculate dose based on a given AUC24, Cmax, and Cmin, assuming 1-compartment model
pk_1cmt_inf_dose_for_range( target = 500, type = "auc", conc_range = c(10, 40), parameters = list(), interval = 24, t_inf = 1, optimize_interval = TRUE, round_interval = TRUE )
pk_1cmt_inf_dose_for_range( target = 500, type = "auc", conc_range = c(10, 40), parameters = list(), interval = 24, t_inf = 1, optimize_interval = TRUE, round_interval = TRUE )
target |
numeric value of target |
type |
target type, one of 'auc', 'auc24', 'ctrough', 'cmin' |
conc_range |
concentration range to stay within, vector of length 2 |
parameters |
list of 'CL' and 'V', or 'KEL' and 'CL' |
interval |
dosing interval |
t_inf |
infusion time |
optimize_interval |
find optimal interval (to stay within 'conc_range'? |
round_interval |
round interval to nearest nominal interval? |
Calculate dose to achieve steady state Cmax for 1-compartmental PK model with infusion dosing at steady state
pk_1cmt_inf_dose_from_cmax(cmax = 1, tau = 12, t_inf = 1, CL = 3, V = 30)
pk_1cmt_inf_dose_from_cmax(cmax = 1, tau = 12, t_inf = 1, CL = 3, V = 30)
cmax |
desired trough concentration |
tau |
dosing interval |
t_inf |
infusion time |
CL |
clearance |
V |
volume of distribution |
pk_1cmt_inf_dose_from_cmax(cmax = 20, tau = 12, t_inf = 2, CL = 5, V = 50)
pk_1cmt_inf_dose_from_cmax(cmax = 20, tau = 12, t_inf = 2, CL = 5, V = 50)
Calculate dose to achieve steady state trough for 1-compartmental PK model with infusion dosing at steady state
pk_1cmt_inf_dose_from_cmin(cmin = 1, tau = 12, t_inf = 1, CL = 3, V = 30)
pk_1cmt_inf_dose_from_cmin(cmin = 1, tau = 12, t_inf = 1, CL = 3, V = 30)
cmin |
desired trough concentration |
tau |
dosing interval |
t_inf |
infusion time |
CL |
clearance |
V |
volume of distribution |
dos <- pk_1cmt_inf_dose_from_cmin( cmin = 20, tau = 12, t_inf = 2, CL = 5, V = 50) find_nearest_dose(dos, 100)
dos <- pk_1cmt_inf_dose_from_cmin( cmin = 20, tau = 12, t_inf = 2, CL = 5, V = 50) find_nearest_dose(dos, 100)
Concentration predictions for 2-compartmental PK model with infusion dosing at steady state
pk_1cmt_inf_ss( t = c(0:24), dose = 100, t_inf = 1, tau = 12, CL = 3, V = 30, ruv = NULL )
pk_1cmt_inf_ss( t = c(0:24), dose = 100, t_inf = 1, tau = 12, CL = 3, V = 30, ruv = NULL )
t |
vector of time |
dose |
dose |
t_inf |
infusion time |
tau |
dosing interval |
CL |
clearance |
V |
volume of distribution |
ruv |
residual variability, specified as list with optional arguments for proportional, additive, or exponential components, e.g. 'list(prop=0.1, add=1, exp=0)' |
pk_1cmt_inf_ss(dose = 500, tau = 12, t_inf = 2, CL = 5, V = 50) pk_1cmt_inf_ss( dose = 500, tau = 12, t_inf = 2, CL = 5, V = 50, ruv = list(prop = 0.1, add = 0.1))
pk_1cmt_inf_ss(dose = 500, tau = 12, t_inf = 2, CL = 5, V = 50) pk_1cmt_inf_ss( dose = 500, tau = 12, t_inf = 2, CL = 5, V = 50, ruv = list(prop = 0.1, add = 0.1))
Concentration predictions for 1-compartmental oral PK model after single or multiple bolus doses
pk_1cmt_oral( t = c(0:24), dose = 100, tau = 12, KA = 1, CL = 3, V = 30, F = 1, ruv = NULL )
pk_1cmt_oral( t = c(0:24), dose = 100, tau = 12, KA = 1, CL = 3, V = 30, F = 1, ruv = NULL )
t |
vector of time |
dose |
dose |
tau |
dosing interval |
KA |
absorption rate |
CL |
clearance |
V |
volume of distribution |
F |
bioavailability, commonly between 0 an 1. |
ruv |
residual error (list) |
Garrett ER. The Bateman function revisited: a critical reevaluation of the quantitative expressions to characterize concentrations in the one compartment body model as a function of time with first-order invasion and first-order elimination. J Pharmacokinet Biopharm (1994) 22(2):103-128.
Bialer M. A simple method for determining whether absorption and elimination rate constants are equal in the one-compartment open model with first-order processes. J Pharmacokinet Biopharm (1980) 8(1):111-113
Nielsen JC, Hutmacher MM et al. J Pharmacokinet Pharmacodyn. 2012 Dec;39(6):619-34. doi: 10.1007/s10928-012-9274-0. Epub 2012 Sep 23.
https://static-content.springer.com/esm/art
pk_1cmt_oral(dose = 500, tau = 12, CL = 5, V = 50, KA = 1)
pk_1cmt_oral(dose = 500, tau = 12, CL = 5, V = 50, KA = 1)
Calculate terminal half-life for 1-compartment model
pk_1cmt_t12(CL = 3, V = 30)
pk_1cmt_t12(CL = 3, V = 30)
CL |
clearance |
V |
volume of central compartment |
pk_1cmt_t12(CL = 5, V = 50)
pk_1cmt_t12(CL = 5, V = 50)
Concentration predictions for 2-compartmental PK model, single or multiple bolus doses
pk_2cmt_bolus( t = c(0:24), dose = 100, tau = 12, CL = 3, V = 30, Q = 2, V2 = 20, ruv = NULL )
pk_2cmt_bolus( t = c(0:24), dose = 100, tau = 12, CL = 3, V = 30, Q = 2, V2 = 20, ruv = NULL )
t |
vector of time |
dose |
dose |
tau |
dosing interval |
CL |
clearance |
V |
volume of central compartment |
Q |
inter-compartimental clearance |
V2 |
volume of peripheral compartment |
ruv |
residual error (list) |
pk_2cmt_bolus(dose = 1000, tau = 24, CL = 5, V = 50, Q = 15, V2 = 200)
pk_2cmt_bolus(dose = 1000, tau = 24, CL = 5, V = 50, Q = 15, V2 = 200)
Cmax for 2-compartmental PK model, bolus dosing at steady state
pk_2cmt_bolus_cmax_ss( dose = 100, tau = 12, CL = 3, V = 30, Q = 2, V2 = 20, ruv = NULL )
pk_2cmt_bolus_cmax_ss( dose = 100, tau = 12, CL = 3, V = 30, Q = 2, V2 = 20, ruv = NULL )
dose |
dose |
tau |
dosing interval |
CL |
clearance |
V |
volume of central compartment |
Q |
inter-compartimental clearance |
V2 |
volume of peripheral compartment |
ruv |
residual error (list) |
pk_2cmt_bolus_cmax_ss(dose = 1000, tau = 12, CL = 5, V = 50, Q = 20, V2 = 200)
pk_2cmt_bolus_cmax_ss(dose = 1000, tau = 12, CL = 5, V = 50, Q = 20, V2 = 200)
Cmin (trough) for 2-compartmental PK model, bolus dosing at steady state
pk_2cmt_bolus_cmin_ss( dose = 100, tau = 12, CL = 3, V = 30, Q = 2, V2 = 20, ruv = NULL )
pk_2cmt_bolus_cmin_ss( dose = 100, tau = 12, CL = 3, V = 30, Q = 2, V2 = 20, ruv = NULL )
dose |
dose |
tau |
dosing interval |
CL |
clearance |
V |
volume of central compartment |
Q |
inter-compartimental clearance |
V2 |
volume of peripheral compartment |
ruv |
residual error (list) |
pk_2cmt_bolus_cmin_ss(dose = 1000, tau = 12, CL = 5, V = 50, Q = 20, V2 = 200)
pk_2cmt_bolus_cmin_ss(dose = 1000, tau = 12, CL = 5, V = 50, Q = 20, V2 = 200)
Calculate dose to achieve steady state Cmax for 2-compartmental PK model bolus dosing at steady state
pk_2cmt_bolus_dose_from_cmax( cmax = 1, tau = 12, CL = 3, V = 30, Q = 2, V2 = 20 )
pk_2cmt_bolus_dose_from_cmax( cmax = 1, tau = 12, CL = 3, V = 30, Q = 2, V2 = 20 )
cmax |
desired trough concentration |
tau |
dosing interval |
CL |
clearance |
V |
volume of distribution |
Q |
inter-compartimental clearance |
V2 |
volume of peripheral compartment |
dos <- pk_2cmt_bolus_dose_from_cmax( cmax = 10, tau = 12, CL = 5, V = 50, Q = 20, V2 = 200) find_nearest_dose(dos, 100)
dos <- pk_2cmt_bolus_dose_from_cmax( cmax = 10, tau = 12, CL = 5, V = 50, Q = 20, V2 = 200) find_nearest_dose(dos, 100)
Calculate dose to achieve steady state trough for 2-compartmental PK model bolus dosing at steady state
pk_2cmt_bolus_dose_from_cmin( cmin = 1, tau = 12, CL = 3, V = 30, Q = 2, V2 = 20 )
pk_2cmt_bolus_dose_from_cmin( cmin = 1, tau = 12, CL = 3, V = 30, Q = 2, V2 = 20 )
cmin |
desired trough concentration |
tau |
dosing interval |
CL |
clearance |
V |
volume of distribution |
Q |
inter-compartimental clearance |
V2 |
volume of peripheral compartment |
dos <- pk_2cmt_bolus_dose_from_cmin( cmin = 5, tau = 12, CL = 5, V = 50, Q = 20, V2 = 200) find_nearest_dose(dos, 100)
dos <- pk_2cmt_bolus_dose_from_cmin( cmin = 5, tau = 12, CL = 5, V = 50, Q = 20, V2 = 200) find_nearest_dose(dos, 100)
Concentration predictions for 2-compartmental PK model, bolus dosing at steady state
pk_2cmt_bolus_ss( t = c(0:24), dose = 100, tau = 12, CL = 3, V = 30, Q = 2, V2 = 20, ruv = NULL )
pk_2cmt_bolus_ss( t = c(0:24), dose = 100, tau = 12, CL = 3, V = 30, Q = 2, V2 = 20, ruv = NULL )
t |
vector of time |
dose |
dose |
tau |
dosing interval |
CL |
clearance |
V |
volume of central compartment |
Q |
inter-compartimental clearance |
V2 |
volume of peripheral compartment |
ruv |
residual error (list) |
pk_2cmt_bolus_ss(dose = 1000, tau = 12, CL = 5, V = 50, Q = 20, V2 = 200)
pk_2cmt_bolus_ss(dose = 1000, tau = 12, CL = 5, V = 50, Q = 20, V2 = 200)
Concentration predictions for 2-compartmental PK model, single or multiple infusions
pk_2cmt_inf( t = c(0:24), dose = 100, tau = 12, t_inf = 1, CL = 3, V = 30, Q = 2, V2 = 20, ruv = NULL )
pk_2cmt_inf( t = c(0:24), dose = 100, tau = 12, t_inf = 1, CL = 3, V = 30, Q = 2, V2 = 20, ruv = NULL )
t |
vector of time |
dose |
dose |
tau |
dosing interval |
t_inf |
infusion time |
CL |
clearance |
V |
volume of central compartment |
Q |
inter-compartimental clearance |
V2 |
volume of peripheral compartment |
ruv |
residual error (list) |
Cmax (trough) for 2-compartmental PK model, bolus dosing at steady state
pk_2cmt_inf_cmax_ss( dose = 100, tau = 12, t_inf = 1, CL = 3, V = 30, Q = 2, V2 = 20, ruv = NULL )
pk_2cmt_inf_cmax_ss( dose = 100, tau = 12, t_inf = 1, CL = 3, V = 30, Q = 2, V2 = 20, ruv = NULL )
dose |
dose |
tau |
dosing interval |
t_inf |
infusion time |
CL |
clearance |
V |
volume of central compartment |
Q |
inter-compartimental clearance |
V2 |
volume of peripheral compartment |
ruv |
residual error (list) |
pk_2cmt_inf_cmax_ss( dose = 1000, tau = 12, t_inf = 2, CL = 5, V = 50, Q = 20, V2 = 200)
pk_2cmt_inf_cmax_ss( dose = 1000, tau = 12, t_inf = 2, CL = 5, V = 50, Q = 20, V2 = 200)
Cmin (trough) for 2-compartmental PK model, bolus dosing at steady state
pk_2cmt_inf_cmin_ss( dose = 100, tau = 12, t_inf = 1, CL = 3, V = 30, Q = 2, V2 = 20, ruv = NULL )
pk_2cmt_inf_cmin_ss( dose = 100, tau = 12, t_inf = 1, CL = 3, V = 30, Q = 2, V2 = 20, ruv = NULL )
dose |
dose |
tau |
dosing interval |
t_inf |
infusion time |
CL |
clearance |
V |
volume of central compartment |
Q |
inter-compartimental clearance |
V2 |
volume of peripheral compartment |
ruv |
residual error (list) |
pk_2cmt_inf_cmin_ss( dose = 1000, tau = 12, t_inf = 2, CL = 5, V = 50, Q = 20, V2 = 200)
pk_2cmt_inf_cmin_ss( dose = 1000, tau = 12, t_inf = 2, CL = 5, V = 50, Q = 20, V2 = 200)
Calculate dose to achieve steady state Cmax for 2-compartmental PK model with infusion dosing at steady state
pk_2cmt_inf_dose_from_cmax( cmax = 1, tau = 12, t_inf = 1, CL = 3, V = 30, Q = 2, V2 = 20 )
pk_2cmt_inf_dose_from_cmax( cmax = 1, tau = 12, t_inf = 1, CL = 3, V = 30, Q = 2, V2 = 20 )
cmax |
desired trough concentration |
tau |
dosing interval |
t_inf |
infusion time |
CL |
clearance |
V |
volume of distribution |
Q |
inter-compartimental clearance |
V2 |
volume of peripheral compartment |
dos <- pk_2cmt_inf_dose_from_cmax( cmax = 25, tau = 12, t_inf = 2, CL = 5, V = 50, Q = 20, V2 = 200) find_nearest_dose(dos, 100)
dos <- pk_2cmt_inf_dose_from_cmax( cmax = 25, tau = 12, t_inf = 2, CL = 5, V = 50, Q = 20, V2 = 200) find_nearest_dose(dos, 100)
Calculate dose to achieve steady state trough for 2-compartmental PK model with infusion dosing at steady state
pk_2cmt_inf_dose_from_cmin( cmin = 1, tau = 12, t_inf = 1, CL = 3, V = 30, Q = 2, V2 = 20 )
pk_2cmt_inf_dose_from_cmin( cmin = 1, tau = 12, t_inf = 1, CL = 3, V = 30, Q = 2, V2 = 20 )
cmin |
desired trough concentration |
tau |
dosing interval |
t_inf |
infusion time |
CL |
clearance |
V |
volume of distribution |
Q |
inter-compartimental clearance |
V2 |
volume of peripheral compartment |
dos <- pk_2cmt_inf_dose_from_cmin( cmin = 10, tau = 12, t_inf = 2, CL = 5, V = 50, Q = 20, V2 = 200) find_nearest_dose(dos, 100)
dos <- pk_2cmt_inf_dose_from_cmin( cmin = 10, tau = 12, t_inf = 2, CL = 5, V = 50, Q = 20, V2 = 200) find_nearest_dose(dos, 100)
Concentration predictions for 2-compartmental PK model with infusion dosing at steady state
pk_2cmt_inf_ss( t = c(0:24), dose = 100, t_inf = 1, tau = 12, CL = 3, V = 30, Q = 2, V2 = 20, ruv = NULL )
pk_2cmt_inf_ss( t = c(0:24), dose = 100, t_inf = 1, tau = 12, CL = 3, V = 30, Q = 2, V2 = 20, ruv = NULL )
t |
vector of time |
dose |
dose |
t_inf |
infusion time |
tau |
dosing interval |
CL |
clearance |
V |
volume of distribution |
Q |
inter-compartimental clearance |
V2 |
volume of peripheral compartment |
ruv |
residual variability, specified as list with optional arguments for proportional, additive, or exponential components, e.g. 'list(prop=0.1, add=1, exp=0)' |
pk_2cmt_inf_ss( dose = 1000, tau = 12, t_inf = 2, CL = 5, V = 50, Q = 20, V2 = 200)
pk_2cmt_inf_ss( dose = 1000, tau = 12, t_inf = 2, CL = 5, V = 50, Q = 20, V2 = 200)
Calculate half-life(s) for 2-compartment model
pk_2cmt_t12(CL = 3, V = 30, Q = 2, V2 = 20, phase = c("both", "alpha", "beta"))
pk_2cmt_t12(CL = 3, V = 30, Q = 2, V2 = 20, phase = c("both", "alpha", "beta"))
CL |
clearance |
V |
volume of central compartment |
Q |
inter-compartimental clearance |
V2 |
volume of peripheral compartment |
phase |
'alpha', 'beta' (default) or 'both' to indicate initial (distribution) or terminal (elimination) phase. |
pk_2cmt_t12(CL = 5, V = 50, Q = 20, V2 = 200)
pk_2cmt_t12(CL = 5, V = 50, Q = 20, V2 = 200)
Calculate average half-life for 2-compartment model during a specific interval
pk_2cmt_t12_interval(CL = 3, V = 30, Q = 2, V2 = 20, tau = 12, t_inf = NULL)
pk_2cmt_t12_interval(CL = 3, V = 30, Q = 2, V2 = 20, tau = 12, t_inf = NULL)
CL |
clearance |
V |
volume of central compartment |
Q |
inter-compartimental clearance |
V2 |
volume of peripheral compartment |
tau |
interval (hours) |
t_inf |
infusion time (hours) |
pk_2cmt_t12_interval(CL = 5, V = 50, Q = 20, V2 = 200, tau = 12, t_inf = 2)
pk_2cmt_t12_interval(CL = 5, V = 50, Q = 20, V2 = 200, tau = 12, t_inf = 2)
Provides a data frame of the WHO growth table for a given age, sex, and type of measurement.
read_who_table(sex = NULL, age = NULL, type = "wfa")
read_who_table(sex = NULL, age = NULL, type = "wfa")
sex |
either |
age |
age in years |
type |
table type, choose from |
This function uses files included in system.file(package = "clinPK")
.
Previously this function also gave the option to download the tables from
WHO, but the original URL ("http://www.who.int/entity/childgrowth/standards")
no longer exists as of 2021-05-19.
Often used for eGFR estimates
relative2absolute_bsa(quantity, bsa = NULL, ...)
relative2absolute_bsa(quantity, bsa = NULL, ...)
quantity |
quantity expressed in units /1.73m2 |
bsa |
ideal body weight in kg |
... |
arguments passed on to 'calc_bsa', if bsa is NULL |
quantity expressed in absolute units
relative2absolute_bsa(quantity = 60, bsa = 1.6) relative2absolute_bsa(quantity = 60, weight = 14, height = 90, method = "dubois")
relative2absolute_bsa(quantity = 60, bsa = 1.6) relative2absolute_bsa(quantity = 60, weight = 14, height = 90, method = "dubois")
Time to steady state In either time units or number of doses
time_to_ss(kel = NULL, halflife = NULL, ss = 0.9, in_doses = FALSE, tau = NULL)
time_to_ss(kel = NULL, halflife = NULL, ss = 0.9, in_doses = FALSE, tau = NULL)
kel |
drug elimination rate |
halflife |
halflife. Either 'kel' or 'halflife' is required. |
ss |
level considered "steady state", e.g. '0.9' is 90% of true steady state. |
in_doses |
return the number of doses instead of time unit? Default 'FALSE'. Requires 'tau' as well. |
tau |
dosing interval |
time_to_ss(halflife = 12, ss = 0.9) time_to_ss(halflife = 16, ss = 0.95, in_doses = TRUE, tau = 12)
time_to_ss(halflife = 12, ss = 0.9) time_to_ss(halflife = 16, ss = 0.95, in_doses = TRUE, tau = 12)
Return recognized units for height, weight, age, scr, serum_albumin.
valid_units( covariate = c("height", "weight", "age", "scr", "serum_albumin", "bilirubin") )
valid_units( covariate = c("height", "weight", "age", "scr", "serum_albumin", "bilirubin") )
covariate |
Covariate (one of "height", "weight", "age", "scr", "bilirubin", "serum_albumin") |
Vector of valid units for the given covariate
valid_units("height") valid_units("weight")
valid_units("height") valid_units("weight")
Convert any weight unit to kg
weight2kg(value = NULL, unit = NULL)
weight2kg(value = NULL, unit = NULL)
value |
weight in any allowed unit |
unit |
unit of weight, one of "lb", "lbs", "pound", "pounds", "oz", "ounce", "ounces", "g", "gram", "grams" |
weight2kg(250, unit = "oz") weight2kg(250, unit = "pounds") weight2kg(250, unit = "lbs")
weight2kg(250, unit = "oz") weight2kg(250, unit = "pounds") weight2kg(250, unit = "lbs")