est.thalf: Calculate Lambda_z and Elimination Half-life

Description Usage Arguments Details Value Examples

View source: R/est.thalf.r

Description

Calculates lambda_z and thalf for each PK curve identified using by.

Usage

1
2
3
4
5
6
7
8
est.thalf(
  x,
  by = character(0),
  timevar = "time",
  depvar = "dv",
  includeCmax = "Y",
  exclvar = NA
)

Arguments

x

a dataset

by

column names in x indicating grouping variables

timevar

variable name containing the actual sampling time after dose

depvar

variable name containing the dependent variable (e.g., concentration)

includeCmax

include results of regression including Cmax in selection? (y/n); x$includeCmax overrides if provided

exclvar

a variable name containing information about points to be excluded (these should have exclvar = 1)

Details

The function starts with the last three sample points and performs log-linear regression on it. It then adds one sampling point at a time (including and ending at tmax) and performs the regression again. The results of the regression with the highest adjusted R-squared are returned.

Visual outliers can be excluded from the regression analysis.

Value

a dataset with estimates for each regression analysis in one observation. The following parameters are available.

Examples

1
2
3
4
example(correct.loq)
x %<>% mutate(includeCmax = 'Y')
th <- x %>% est.thalf(by='subject',exclvar=)
th %>%  head

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