choose_interp_extrap_method: Choose a method for calculation in the interval between...

View source: R/interp_extrap_helpers.R

choose_interp_extrap_methodR Documentation

Choose a method for calculation in the interval between concentrations

Description

This function should be used for any interpolation/extrapolation function. It will standardize the method of choosing which method to use for interpolation and extrapolation.

Usage

choose_interp_extrap_method(conc, time, interp_method, extrap_method, tmax)

Arguments

conc

A vector of concentrations (NA values are not allowed)

time

A vector of times (NA values are not allowed)

interp_method

Method to use for interpolation between time points

extrap_method

Method to use for extrapolation after the last time point above (an AUC calculation method)

tmax

Time of maximum concentration

Value

A character vector of extrapolation methods to use between each conc and after the last conc. Values will be one or more of "linear" (use linear interpolation), "log" (use log interpolation), "zero" (the value is zero), and the last value may be "clastpred", "clastobs", or "zero" indicating extrapolation from tlast using lambda.z and clast,pred or clast,obs, or zero.

Examples

PKNCA:::choose_interp_extrap_method(
  conc=c(1, 2, 4, 2, 1, 0, 0),
  time=0:6,
  interp_method="lin up/log down",
  extrap_method="aucinf.obs"
)

PKNCA documentation built on April 30, 2023, 1:08 a.m.