calc.par.th: Calculate Lambda_z Parameters

Description Usage Arguments Value Examples

View source: R/calc.par.th.r

Description

Calculates PK parameters that need lambda_z.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
calc.par.th(
  x,
  by = character(0),
  th = th,
  covariates = NA,
  dose = "dose",
  factor = 1,
  reg = "SD",
  ss = "N",
  route = "EV"
)

Arguments

x

result parameter dataset from calc.par

by

column names in x indicating grouping variables

th

result dataset from est.thalf

covariates

covariates dataset (containing at least dose for CL calculation); defaults to unique combinations of by and dose evaluated on x; can be character name of csv file or local object

dose

variable containing the dose amount; default 'dose' set to 1 if not in names(x)

factor

conversion factor for CL and V calculation (e.g. dose in mg, conc in ng/mL, factor=1000); x$factor overrides

reg

regimen, "sd" or "md"; x$reg overrides

ss

is steady state reached (y/n); x$ss overrides

route

of drug administration ("EV","IVB","IVI"); x$route overrides

Value

A dataset containing all parameters calculated in est.thalf and calc.par
with estimates for the following parameters added, one observation per subject:

Parameter Description
clast.pred predicted concentration at tlast
aucinf.obs aucinf based on observed concentration at tlast
aucinf.pred aucinf based on predicted concentration at tlast
aumcinf.obs area under the first moment curve extrapolated to infinity, based on observed concentration at tlast
aumcinf.pred area under the first moment curve extrapolated to infinity, based on predicted concentration at tlast
cl.obs, cl.f.obs clearance based on aucinf.obs, at steady state based on auctau
cl.pred, cl.f.pred clearance based on aucinf.pred
cl.ss, cl.f.ss clearance at steady state, based on auctau
mrt.obs mean residence time based on aumcinf.obs and aucinf.obs
mrt.pred mean residence time based on aumcinf.pred and aucinf.pred
vz.obs, vz.f.obs distribution volume based on cl.f.obs, at steady state based on auctau
vz.pred, vz.f.pred distribution based on cl.pred/cl.f.pred
vss.obs steady-state volume based on cl.obs and mrt.obs
vss.pred steady-state volume based on cl.pred and mrt.pred
pctextr.pred percentage of AUC extrapolated to infinity, based on aucinf.pred
pctextr.obs percentage of AUC extrapolated to infinity, based on aucinf.obs
pctback.pred percentage of AUC extrapolated back to 0, based on aucinf.pred
pctback.obs percentage of AUC extrapolated back to 0, based on aucinf.obs

Note: ctmax must be merged separately as those were calculated from uncorrected data.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
example(calc.par) # creates par
# notice x includes (optional) loqrule, includeCmax, reg, method, route, ss
covs <- Theoph %>%
  select(subject = Subject, Wt, dose = Dose) %>%
  unique %>%
  mutate(dose = dose * Wt, subject=as.numeric(as.character(subject))) # see ?Theoph
y <- x %>% select(subject, reg, ss, loqrule) %>% unique
y %<>% mutate(factor = 1)
par %<>% left_join(y, by = 'subject')
par %<>% calc.par.th(by = 'subject', th = th, covariates = covs)
par %<>% left_join(ctmax, ., by = 'subject')
par %>% head
par %>% data.frame %>% head(2)

qpNCA documentation built on Aug. 16, 2021, 5:08 p.m.