est.thalf {qpNCA}R Documentation

Calculate Lambda_z and Elimination Half-life

Description

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

Usage

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


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


[Package qpNCA version 1.1.6 Index]