# Perform Pharmacokinetic Non-Compartmental Analysis

## Documentation for package ‘PKNCA’ version 0.10.2

- DESCRIPTION file.
- User guides, package vignettes and other documentation.
- Package NEWS.

## Help Pages

A B C E F G I L M N P R S T U V

## -- A --

add.interval.col | Add columns for calculations within PKNCA intervals
addProvenance | Add a hash and associated information to enable checking object provenance.
adj.r.squared | Calculate the adjusted r-squared value
AIC.list | Assess the AIC for all models in a list of models
any_sparse_dense_in_interval | Determine if there are any sparse or dense calculations requested within an interval
as.data.frame.PKNCAresults | Extract the parameter results from a PKNCAresults and return them as a data frame.
as_sparse_pk | Generate a sparse_pk object

## -- B --

business.cv | Generate functions to do the named function (e.g. mean) applying the business rules.
business.geocv | Generate functions to do the named function (e.g. mean) applying the business rules.
business.geomean | Generate functions to do the named function (e.g. mean) applying the business rules.
business.max | Generate functions to do the named function (e.g. mean) applying the business rules.
business.mean | Generate functions to do the named function (e.g. mean) applying the business rules.
business.median | Generate functions to do the named function (e.g. mean) applying the business rules.
business.min | Generate functions to do the named function (e.g. mean) applying the business rules.
business.range | Generate functions to do the named function (e.g. mean) applying the business rules.
business.sd | Generate functions to do the named function (e.g. mean) applying the business rules.

## -- C --

check.conc.time | Verify that the concentration and time are valid
check.conversion | Check that the conversion to a data type does not change the number of NA values
check.interval.deps | Take in a single row of an interval specification and return that row updated with any additional calculations that must be done to fulfill all dependencies.
check.interval.specification | Check the formatting of a calculation interval specification data frame.
checkProvenance | Check the hash of an object to confirm its provenance.
choose.auc.intervals | Choose intervals to compute AUCs from time and dosing information
choose_interp_extrap_method | Choose a method for calculation in the interval between concentrations
clean.conc.blq | Handle BLQ values in the concentration measurements as requested by the user.
clean.conc.na | Handle NA values in the concentration measurements as requested by the user.
cov_holder | Calculate the covariance for two time points with sparse sampling

## -- E --

exclude | Exclude data points or results from calculations or summarization.
exclude.default | Exclude data points or results from calculations or summarization.
exclude_nca | Exclude NCA parameters based on examining the parameter set.
exclude_nca_max.aucinf.pext | Exclude NCA parameters based on examining the parameter set.
exclude_nca_min.hl.r.squared | Exclude NCA parameters based on examining the parameter set.
exclude_nca_span.ratio | Exclude NCA parameters based on examining the parameter set.
extrapolate.conc | Interpolate concentrations between measurements or extrapolate concentrations after the last measurement.
extrapolate_conc_lambdaz | Interpolate or extrapolate concentrations using the provided method

## -- F --

filter.PKNCAconc | dplyr filtering for PKNCA
filter.PKNCAdose | dplyr filtering for PKNCA
filter.PKNCAresults | dplyr filtering for PKNCA
find.tau | Find the repeating interval within a vector of doses
findOperator | Find the first occurrence of an operator in a formula and return the left, right, or both sides of the operator.
fit_half_life | Perform the half-life fit given the data. The function simply fits the data without any validation. No selection of points or any other components are done.
formula.PKNCAconc | Extract the formula from a PKNCAconc object.
formula.PKNCAdose | Extract the formula from a PKNCAconc object.
full_join.PKNCAconc | dplyr joins for PKNCA
full_join.PKNCAdose | dplyr joins for PKNCA
full_join.PKNCAresults | dplyr joins for PKNCA

## -- G --

geocv | Compute the geometric mean, sd, and CV
geomean | Compute the geometric mean, sd, and CV
geosd | Compute the geometric mean, sd, and CV
get.best.model | Extract the best model from a list of models using AIC.list.
get.first.model | Get the first model from a list of models
get.interval.cols | Get the columns that can be used in an interval specification
get.parameter.deps | Get all columns that depend on a parameter
getAttributeColumn | Retrieve the value of an attribute column.
getColumnValueOrNot | Get the value from a column in a data frame if the value is a column there, otherwise, the value should be a scalar or the length of the data.
getDataName | Get the name of the element containing the data for the current object.
getDataName.default | Get the name of the element containing the data for the current object.
getDataName.PKNCAconc | Get the name of the element containing the data for the current object.
getDataName.PKNCAdose | Get the name of the element containing the data for the current object.
getDataName.PKNCAresults | Get the name of the element containing the data for the current object.
getDepVar | Get the dependent variable (left hand side of the formula) from a PKNCA object.
getGroups.PKNCAconc | Get the groups (right hand side after the '|' from a PKNCA object).
getGroups.PKNCAdose | Get the groups (right hand side after the '|' from a PKNCA object).
getGroups.PKNCAresults | Get the groups (right hand side after the '|' from a PKNCA object).
getIndepVar | Get the independent variable (right hand side of the formula) from a PKNCA object.
group_by.PKNCAconc | dplyr grouping for PKNCA
group_by.PKNCAdose | dplyr grouping for PKNCA
group_by.PKNCAresults | dplyr grouping for PKNCA
group_vars.PKNCAconc | Get grouping variables for a PKNCA object
group_vars.PKNCAdose | Get grouping variables for a PKNCA object

## -- I --

inner_join.PKNCAconc | dplyr joins for PKNCA
inner_join.PKNCAdose | dplyr joins for PKNCA
inner_join.PKNCAresults | dplyr joins for PKNCA
interp.extrap.conc | Interpolate concentrations between measurements or extrapolate concentrations after the last measurement.
interp.extrap.conc.dose | Interpolate concentrations between measurements or extrapolate concentrations after the last measurement.
interpolate.conc | Interpolate concentrations between measurements or extrapolate concentrations after the last measurement.
interpolate_conc_linear | Interpolate or extrapolate concentrations using the provided method
interpolate_conc_log | Interpolate or extrapolate concentrations using the provided method
interp_extrap_conc_method | Interpolate or extrapolate concentrations using the provided method
is_sparse_pk | Is a PKNCA object used for sparse PK?
is_sparse_pk.PKNCAconc | Is a PKNCA object used for sparse PK?
is_sparse_pk.PKNCAdata | Is a PKNCA object used for sparse PK?
is_sparse_pk.PKNCAresults | Is a PKNCA object used for sparse PK?

## -- L --

left_join.PKNCAconc | dplyr joins for PKNCA
left_join.PKNCAdose | dplyr joins for PKNCA
left_join.PKNCAresults | dplyr joins for PKNCA

## -- M --

model.frame.PKNCAconc | Extract the columns used in the formula (in order) from a PKNCAconc or PKNCAdose object.
model.frame.PKNCAdose | Extract the columns used in the formula (in order) from a PKNCAconc or PKNCAdose object.
mutate.PKNCAconc | dplyr mutate-based modification for PKNCA
mutate.PKNCAdose | dplyr mutate-based modification for PKNCA
mutate.PKNCAresults | dplyr mutate-based modification for PKNCA

## -- N --

normalize_exclude | Normalize the exclude column by setting blanks to NA

## -- P --

parse_formula_to_cols | Convert a formula representation to the columns for input data
pk.business | Run any function with a maximum missing fraction of X and 0s possibly counting as missing. The maximum fraction missing comes from 'PKNCA.options("max.missing")'.
pk.calc.ae | Calculate amount excreted (typically in urine or feces)
pk.calc.auc | A compute the Area Under the (Moment) Curve
pk.calc.auc.all | A compute the Area Under the (Moment) Curve
pk.calc.auc.inf | A compute the Area Under the (Moment) Curve
pk.calc.auc.inf.obs | A compute the Area Under the (Moment) Curve
pk.calc.auc.inf.pred | A compute the Area Under the (Moment) Curve
pk.calc.auc.last | A compute the Area Under the (Moment) Curve
pk.calc.aucabove | Calculate the AUC above a given concentration
pk.calc.aucint | Calculate the AUC over an interval with interpolation and/or extrapolation of concentrations for the beginning and end of the interval.
pk.calc.aucint.all | Calculate the AUC over an interval with interpolation and/or extrapolation of concentrations for the beginning and end of the interval.
pk.calc.aucint.inf.obs | Calculate the AUC over an interval with interpolation and/or extrapolation of concentrations for the beginning and end of the interval.
pk.calc.aucint.inf.pred | Calculate the AUC over an interval with interpolation and/or extrapolation of concentrations for the beginning and end of the interval.
pk.calc.aucint.last | Calculate the AUC over an interval with interpolation and/or extrapolation of concentrations for the beginning and end of the interval.
pk.calc.auciv | Calculate AUC for intravenous dosing
pk.calc.auciv_pbext | Calculate AUC for intravenous dosing
pk.calc.aucpext | Calculate the AUC percent extrapolated
pk.calc.aumc | A compute the Area Under the (Moment) Curve
pk.calc.aumc.all | A compute the Area Under the (Moment) Curve
pk.calc.aumc.inf | A compute the Area Under the (Moment) Curve
pk.calc.aumc.inf.obs | A compute the Area Under the (Moment) Curve
pk.calc.aumc.inf.pred | A compute the Area Under the (Moment) Curve
pk.calc.aumc.last | A compute the Area Under the (Moment) Curve
pk.calc.auxc | A compute the Area Under the (Moment) Curve
pk.calc.c0 | Estimate the concentration at dosing time for an IV bolus dose.
pk.calc.c0.method.c0 | Estimate the concentration at dosing time for an IV bolus dose.
pk.calc.c0.method.c1 | Estimate the concentration at dosing time for an IV bolus dose.
pk.calc.c0.method.cmin | Estimate the concentration at dosing time for an IV bolus dose.
pk.calc.c0.method.logslope | Estimate the concentration at dosing time for an IV bolus dose.
pk.calc.c0.method.set0 | Estimate the concentration at dosing time for an IV bolus dose.
pk.calc.cav | Calculate the average concentration during an interval.
pk.calc.ceoi | Determine the concentration at the end of infusion
pk.calc.cl | Calculate the (observed oral) clearance
pk.calc.clast.obs | Determine the last observed concentration above the limit of quantification (LOQ).
pk.calc.clr | Calculate renal clearance
pk.calc.cmax | Determine maximum observed PK concentration
pk.calc.cmin | Determine maximum observed PK concentration
pk.calc.cstart | Determine the concentration at the beginning of the interval
pk.calc.ctrough | Determine the trough (end of interval) concentration
pk.calc.deg.fluc | Determine the degree of fluctuation
pk.calc.dn | Determine dose normalized NCA parameter
pk.calc.f | Calculate the absolute (or relative) bioavailability
pk.calc.fe | Calculate fraction excreted (typically in urine or feces)
pk.calc.half.life | Compute the half-life and associated parameters
pk.calc.kel | Calculate the elimination rate (Kel)
pk.calc.mrt | Calculate the mean residence time (MRT) for single-dose data or linear multiple-dose data.
pk.calc.mrt.iv | Calculate the mean residence time (MRT) for single-dose data or linear multiple-dose data.
pk.calc.mrt.md | Calculate the mean residence time (MRT) for multiple-dose data with nonlinear kinetics.
pk.calc.ptr | Determine the peak-to-trough ratio
pk.calc.sparse_auc | Calculate AUC and related parameters using sparse NCA methods
pk.calc.sparse_auclast | Calculate AUC and related parameters using sparse NCA methods
pk.calc.swing | Determine the PK swing
pk.calc.tfirst | Determine time of last observed concentration above the limit of quantification.
pk.calc.thalf.eff | Calculate the effective half-life
pk.calc.time_above | Determine time at or above a set value
pk.calc.tlag | Determine the observed lag time (time before the first concentration above the limit of quantification or above the first concentration in the interval)
pk.calc.tlast | Determine time of last observed concentration above the limit of quantification.
pk.calc.tmax | Determine time of maximum observed PK concentration
pk.calc.vd | Calculate the volume of distribution (Vd) or observed volume of distribution (Vd/F)
pk.calc.vss | Calculate the steady-state volume of distribution (Vss)
pk.calc.vz | Calculate the terminal volume of distribution (Vz)
pk.nca | Compute NCA parameters for each interval for each subject.
pk.nca.interval | Compute all PK parameters for a single concentration-time data set
pk.nca.intervals | Compute NCA for multiple intervals
pk.tss | Compute the time to steady-state (tss)
pk.tss.data.prep | Clean up the time to steady-state parameters and return a data frame for use by the tss calculators.
pk.tss.monoexponential | Compute the time to steady state using nonlinear, mixed-effects modeling of trough concentrations.
pk.tss.monoexponential.individual | A helper function to estimate individual and single outputs for monoexponential time to steady-state.
pk.tss.monoexponential.population | A helper function to estimate population and popind outputs for monoexponential time to steady-state.
pk.tss.stepwise.linear | Compute the time to steady state using stepwise test of linear trend
PKNCA | Compute noncompartmental pharmacokinetics
PKNCA.choose.option | Choose either the value from an option list or the current set value for an option.
PKNCA.options | Set default options for PKNCA functions
PKNCA.options.describe | Describe a PKNCA.options option by name.
PKNCA.set.summary | Define how NCA parameters are summarized.
PKNCAconc | Create a PKNCAconc object
PKNCAconc.data.frame | Create a PKNCAconc object
PKNCAconc.default | Create a PKNCAconc object
PKNCAconc.tbl_df | Create a PKNCAconc object
PKNCAdata | Create a PKNCAdata object.
PKNCAdata.default | Create a PKNCAdata object.
PKNCAdata.PKNCAconc | Create a PKNCAdata object.
PKNCAdata.PKNCAdose | Create a PKNCAdata object.
PKNCAdose | Create a PKNCAdose object
PKNCAdose.data.frame | Create a PKNCAdose object
PKNCAdose.default | Create a PKNCAdose object
PKNCAdose.tbl_df | Create a PKNCAdose object
PKNCAresults | Generate a PKNCAresults object
pknca_find_units_param | Find NCA parameters with a given unit type
PKNCA_impute_fun_list | Separate out a vector of PKNCA imputation methods into a list of functions
PKNCA_impute_method | Methods for imputation of data with PKNCA
PKNCA_impute_method_start_cmin | Methods for imputation of data with PKNCA
PKNCA_impute_method_start_conc0 | Methods for imputation of data with PKNCA
PKNCA_impute_method_start_predose | Methods for imputation of data with PKNCA
pknca_units_add_paren | Add parentheses to a unit value, if needed
pknca_units_table | Create a unit assignment and conversion table
pknca_unit_conversion | Perform unit conversion (if possible) on PKNCA results
pk_nca_result_to_df | Convert the grouping info and list of results for each group into a results data.frame
print.PKNCAconc | Print and/or summarize a PKNCAconc or PKNCAdose object.
print.PKNCAdata | Print a PKNCAdata object
print.PKNCAdose | Print and/or summarize a PKNCAconc or PKNCAdose object.
print.provenance | Print the summary of a provenance object
print.summary_PKNCAresults | Print the results summary

## -- R --

right_join.PKNCAconc | dplyr joins for PKNCA
right_join.PKNCAdose | dplyr joins for PKNCA
right_join.PKNCAresults | dplyr joins for PKNCA
roundingSummarize | During the summarization of PKNCAresults, do the rounding of values based on the instructions given.
roundString | Round a value to a defined number of digits printing out trailing zeros, if applicable.

## -- S --

setAttributeColumn | Add an attribute to an object where the attribute is added as a name to the names of the object.
setDuration | Set the duration of dosing or measurement
setDuration.PKNCAconc | Set the duration of dosing or measurement
setDuration.PKNCAdose | Set the duration of dosing or measurement
setExcludeColumn | Set the exclude parameter on an object
setRoute | Set the dosing route
setRoute.PKNCAdose | Set the dosing route
signifString | Round a value to a defined number of significant digits printing out trailing zeros, if applicable.
signifString.data.frame | Round a value to a defined number of significant digits printing out trailing zeros, if applicable.
signifString.default | Round a value to a defined number of significant digits printing out trailing zeros, if applicable.
sort.interval.cols | Sort the interval columns by dependencies.
sparse_auc_weight_linear | Calculate the weight for sparse AUC calculation with the linear-trapezoidal rule
sparse_mean | Calculate the mean concentration at all time points for use in sparse NCA calculations
sparse_pk_attribute | Set or get a sparse_pk object attribute
sparse_to_dense_pk | Extract the mean concentration-time profile as a data.frame
summary.PKNCAconc | Print and/or summarize a PKNCAconc or PKNCAdose object.
summary.PKNCAdata | Summarize a PKNCAdata object showing important details about the concentration, dosing, and interval information.
summary.PKNCAdose | Print and/or summarize a PKNCAconc or PKNCAdose object.
summary.PKNCAresults | Summarize PKNCA results
superposition | Compute noncompartmental superposition for repeated dosing
superposition.numeric | Compute noncompartmental superposition for repeated dosing
superposition.PKNCAconc | Compute noncompartmental superposition for repeated dosing

## -- T --

time_calc | Times relative to an event (typically dosing)
tss.monoexponential.generate.formula | A helper function to generate the formula and starting values for the parameters in monoexponential models.

## -- U --

ungroup.PKNCAconc | dplyr grouping for PKNCA
ungroup.PKNCAdose | dplyr grouping for PKNCA
ungroup.PKNCAresults | dplyr grouping for PKNCA

## -- V --

var_sparse_auc | Calculate the variance for the AUC of sparsely sampled PK