# Fits Toxicokinetic Models to In Vivo PK Data Sets

## Documentation for package ‘invivoPKfit’ version 2.0.1

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

## Help Pages

A B C D E F G H I L M N P R S T misc

## -- A --

AAFE | AAFE()
AAFE.default | Default method for AAFE()
AAFE.pk | Calculate absolute average fold error (AAFE)
add_pk | Add various 'pkproto' objects to a 'pk' object
AFE | AFE()
AFE.default | Default method for AFE()
AFE.pk | Calculate average fold error
AIC.pk | Akaike information criterion
auc_1comp | Analytic AUC for 1-compartment model
auc_1comp_cl | Analytic AUC for 1-compartment model with specific clearance
auc_2comp | Analytical AUC for the 2-compartment model
auc_flat | AUC for flat model
auto_units | Automatically select new time units

## -- B --

BIC.pk | Bayesian information criterion

## -- C --

calc_hessian | Calculate Hessian
calc_nca | Non-compartmental analysis
calc_rmse | Calculate RMSE (root mean squared error)
calc_rsq | Calculate r-squared for observed vs. predicted values
calc_sds_alerts | Calculate parameter SDs
check_method | Check methods
check_model | Check models
check_newdata | Check new data
check_params_1comp | Check 1-compartment model parameters
check_params_1comp_cl | Check 1-compartment model parameters
check_params_2comp | Check 2-compartment model parameters
check_params_flat | Check flat model parameters
check_required_status | Check required status
check_required_status.default | Default method for checking required status
check_required_status.pk | Check required status
coef.pk | Get coefficients
coef_sd | Coefficient standard deviations
coef_sd.default | Coefficient standard deviation default
coef_sd.pk | Get coefficient standard deviations
combined_sd | Combined standard deviation
compare_models | Model comparison
compare_models.default | Default method for compare_models()
compare_models.pk | Model comparison for [pk()] objects
conc_scale_use | Get concentration scalings
convert_summary_to_log10 | Convert sample mean and SD to log10-scale
convert_time | Helper function to convert time units
cp_1comp | Analytical 1-compartment model
cp_1comp_cl | Analytical 1-compartment model with specific clearance
cp_2comp | Analytical 2-compartment model
cp_2comp_dt | Time derivative of analytical 2-compartment model
cp_flat | Flat model
cvt | CvTdb data
cvt_date | CvTdb download date

## -- D --

data_summary | data_summary()
data_summary.default | Default method for data_summary()
data_summary.pk | Data summary for a 'pk' object
dlnorm_summary | Log-normal distribution density function for summary data
dnorm_summary | Normal distribution density function for summary data
do_data_info | do_data_info generic
do_data_info.default | do_data_info default method
do_data_info.pk | calculate summary data info
do_fit | Fitting
do_fit.default | do_fit default method
do_fit.pk | Do fitting
do_prefit | Prefitting
do_prefit.default | do_prefit default method
do_prefit.pk | Do pre-fitting
do_preprocess | Preprocess data generic
do_preprocess.default | do_preprocess default method
do_preprocess.pk | Do pre-processing

## -- E --

eval_tkstats | eval_tkstats()
eval_tkstats.default | Default method for eval_tkstats()
eval_tkstats.pk | Evaluate TK statistics

## -- F --

facet_data | Facet a PK fit
fill_params_1comp | Fill parameters for 1-compartment model
fill_params_1comp_cl | Fill parameters for 1-compartment model with specific clearance
fill_params_2comp | Fill parameters for 2-compartment model
fill_params_flat | Fill parameters for flat model
fit_group | Fit a single group of data
fold_error | Fold error
fold_error.default | fold_error default method
fold_error.pk | Fold errors

## -- G --

get_data | get_data()
get_data.default | Default method for get_data()
get_data.pk | Get data
get_data_group | get_data_group()
get_data_group.default | Default method for get_data_group()
get_data_group.pk | Get data grouping
get_data_info | get_data_info()
get_data_info.default | Default method for get_data_info()
get_data_info.pk | Get data_info
get_data_original | get_data_original()
get_data_original.default | Default method for get_data_original()
get_data_original.pk | Get data_original
get_data_sigma_group | get_data_sigma_group()
get_data_sigma_group.default | Default method for get_data_sigma_group()
get_data_sigma_group.pk | Get data_sigma_group
get_data_summary | get_data_summary()
get_data_summary.default | Default method for get_data_summary()
get_elbow | Get an elbow point
get_error_group | get_error_group()
get_error_group.default | Default method for get_error_group()
get_error_group.pk | Get error group
get_fit | get_fit()
get_fit.default | Default method for get_fit()
get_fit.pk | Get fits from a 'pk' object
get_hessian | get_hessian()
get_hessian.default | Default method for get_hessian()
get_hessian.pk | Get Hessian matrixes
get_mapping | get_mapping()
get_mapping.default | Default method for get_mapping()
get_mapping.pk | Get mapping
get_nca | get_nca()
get_nca.default | Default method for get_nca()
get_nca.pk | Get NCA
get_params_1comp | Get parameters for 1-compartment model
get_params_1comp_cl | Get parameters for 1-compartment model with clearance assumption
get_params_1comp_fup | Get parameters for 1-compartment model with clearance assumption
get_params_2comp | Get parameters for 2-compartment model
get_params_flat | Get parameters to be optimized for flat model
get_peak | Find the peak of a data series
get_prefit | get_prefit()
get_prefit.default | Default method for get_prefit()
get_prefit.pk | Get prefit
get_scale_conc | get_scale_conc()
get_scale_conc.default | Default method for get_scale_conc()
get_scale_conc.pk | Get scale_conc
get_scale_time | get_scale_time()
get_scale_time.default | Default method for get_scale_time()
get_scale_time.pk | Get scale_time
get_settings_data_info | get_settings_data_info()
get_settings_data_info.default | Default method for get_settings_data_info()
get_settings_data_info.pk | Get settings_data_info
get_settings_optimx | get_settings_optimx()
get_settings_optimx.default | Default method for get_settings_optimx()
get_settings_optimx.pk | Get settings_optimx
get_settings_preprocess | get_settings_preprocess()
get_settings_preprocess.default | Default method for get_settings_preprocess()
get_settings_preprocess.pk | Get settings_preprocess
get_starts_1comp | Get starting values for 1-compartment model
get_starts_1comp_cl | Get starting values for 1-compartment model with specific clearance
get_starts_1comp_fup | Get starting values for 1-compartment model with specific clearance
get_starts_2comp | Get starting values for 2-compartment model
get_starts_flat | Get starting values for flat model
get_status | Get status
get_status.default | Default method for getting status
get_status.pk | Check status of a 'pk' object
get_stat_error_model | get_stat_error_model()
get_stat_error_model.default | Default method for get_stat_error_model()
get_stat_error_model.pk | Get stat_error_model
get_stat_model | get_stat_model()
get_stat_model.default | Default method for get_stat_model()
get_stat_model.pk | Get stat_model
get_tkstats | Get TK stats
get_tkstats.default | Default method for get_tkstats()
get_tkstats.pk | Get TK stats
get_winning_model | get_winning_model()
get_winning_model.default | Default method for get_winning_model()
get_winning_model.pk | Get winning model

## -- H --

hess_sd1 | Inverse diagonal, method 1
hess_sd2 | Inverse diagonal, method 2

## -- I --

ignore_unused_imports | Ignore unused imports
is.pk | Check whether an object is of class 'pk'
is.pkproto | Is an object pkproto?
is.pk_faceted | Check whether an object is of class 'pk_faceted'
is.pk_scales | Is an object class 'pk_scales'?

## -- L --

logLik.pk | Log-likelihood
log_likelihood | Log-likelihood

## -- M --

mapping | New mapping
midpt_log10 | Log10-scaled midpoint
model_1comp | 1-compartment model
model_1comp_cl_nonrest | 1-compartment model that assumes non-restrictive clearance
model_1comp_cl_rest | 1-compartment model that assumes restrictive clearance
model_1comp_fup | 1-compartment model that assumes restrictive clearance optimizes Fup
model_2comp | 2-compartment model
model_flat | Flat model

## -- N --

nca | nca()
nca.default | Default method for nca()
nca.pk | NCA for a 'pk' object

## -- P --

pk | Create a new 'pk' object
pkdataset_nheerlcleaned | Toxicokinetic data from the "Concentration vs. Time Database"
pk_add | Add a 'pkproto' object to a 'pk' object
pk_add.default | Add pkproto object default method
pk_add.pk_facet_data | Add facet_data()
pk_add.pk_scales | Add a 'pk_scales' object to a 'pk' object.
pk_add.pk_settings_data_info | Add a 'pk_settings_data_info' object.
pk_add.pk_settings_optimx | Add a 'pk_settings_optimx' object.
pk_add.pk_settings_preprocess | Add a 'pk_settings_preprocess' object.
pk_add.pk_stat_error_model | Add a 'pk_stat_error_model' object.
pk_add.pk_stat_model | Add a 'pk_stat_model' object.
pk_add.uneval | Add an 'uneval' object
pk_model | Create a new 'pk_model' object
pk_subtract | Subtract a 'pkproto' object from a 'pk' object
pk_subtract.default | Subtract pkproto object default method
pk_subtract.pk_stat_model | Subtract a 'pk_stat_model' object.
plot.pk | Plot a [pk()] object.
predict.pk | Get predictions
print.pk | Print a user-friendly version of a 'pk' object

## -- R --

rename2_cvt | Convert invivoPKfit output table names to the CvTdb names
residuals.pk | Get residuals
rmse | Root mean squared error (RMSE)
rmse.default | Root mean squared error (RMSE) default method
rmse.pk | Root mean squared error
rowwise_calc_percentages | Helper function for calculating percentages of count data, by row
rsq | rsq()
rsq.default | Default method for rsq()
rsq.pk | Calculate R-squared for observed vs. predicted values

## -- S --

scale_conc | Scale concentrations
scale_time | Scale times
settings_data_info | Data info settings
settings_optimx | 'optimx' optimizer settings
settings_preprocess | Data preprocessing settings
status_data_info | Status ID for data summary info
status_fit | Status ID for fitting
status_init | Status ID for initialization
status_prefit | Status ID for pre-fitting
status_preprocess | Status ID for preprocessing
stat_error_model | Error model
stat_model | Add PK model(s) to be fitted
subtract_pk | Subtract various 'pkproto' objects from a 'pk' object
summary.pk | Print summary of a 'pk' object

## -- T --

time_conversions | Time conversion table
time_units | Allowable time units
tkstats_1comp | Toxicokinetic statistics for 1-compartment model
tkstats_1comp_cl | Toxicokinetic statistics for 1-compartment model with specific clearance
tkstats_2comp | Toxicokinetic statistics for 1-compartment model
tkstats_flat | TK stats for flat model
transformed_params_2comp | Transformed parameters for 2-compartment model
twofold_test | twofold_test()
twofold_test.default | Default method for twofold_test()
twofold_test.pk | Evaluate whether data and predictions are within two-fold of mean or concentration, respectively

## -- misc --

+.pk | Add a 'pkproto' object to a 'pk' object
-.pk | Subtract a pkproto object from a pk object