Calculates lambda_z and thalf for each PK curve identified using by.
est.thalf(
x,
by = character(0),
timevar = "time",
depvar = "dv",
includeCmax = "Y",
exclvar = NA
)a dataset
column names in x indicating grouping variables
variable name containing the actual sampling time after dose
variable name containing the dependent variable (e.g., concentration)
include results of regression including Cmax in selection? (y/n); x$includeCmax overrides if provided
a variable name containing information about points to be excluded (these should have exclvar = 1)
a dataset with estimates for each regression analysis in one observation. The following parameters are available.
no.points number of data points used in the regression analysis
intercept estimated intercept
lambda_z -1*estimated slope
r.squared square of the correlation coefficient
adj.r.squared adjusted square of the correlation coefficient
thalf elimination half-life
start_th time of first sample included in the thalf estimation
end_th time of last sample included in the thalf estimation
includeCmax include results of regression including Cmax in selection? (y/n)
points_excluded are time points excluded from the half-life estimation? (y/n)
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.
# NOT RUN {
example(correct.loq)
x %<>% mutate(includeCmax = 'Y')
th <- x %>% est.thalf(by='subject',exclvar=)
th %>% head
# }
Run the code above in your browser using DataLab