Learn R Programming

invivoPKfit (version 2.0.1)

twofold_test.pk: Evaluate whether data and predictions are within two-fold of mean or concentration, respectively

Description

At each timepoint across CvT experimental data, there are three ways that data may be presented. These can be found as either: - multiple individual observations - single individual observation - summarized group of observations (mean concentration and standard deviation)

Usage

# S3 method for pk
twofold_test(
  obj,
  sub_pLOQ = TRUE,
  suppress.messages = NULL,
  model = NULL,
  method = NULL,
  ...
)

Value

A list of data frames.

Arguments

obj

A pk object.

sub_pLOQ

TRUE (default): Substitute all predictions below the LOQ with the LOQ before computing fold errors. FALSE: do not. Only used if `obj` has been fitted and predictions are possible.

suppress.messages

Logical: whether to suppress message printing. If NULL (default), uses the setting in `obj$settings_preprocess$suppress.messages`.

model

Optional: Specify one or more of the fitted models for which to make predictions. If NULL (the default), predictions will be returned for all of the models in `object$stat_model`.

method

Optional: Specify one or more of the [optimx::optimx()] methods for which to make predictions. If NULL (the default), predictions will be returned for all of the models in `object$settings_optimx$method`.

...

Additional arguments. Currently unused.

Author

Gilberto Padilla Mercado

Details

For the purposes of this calculations we largely divide the data into two groups, those with individual observations, where N_Subjects == 1, and the summarized group of observations.

First this creates mean-normalized concentrations for individual data. Then it summarizes data (individual & summarized) by `mean` and `sd`. It tests whether predictions are within two-fold of mean, in the latter case whether the 95

Furthermore if `pk` object `status == 5` then it calculates the model error by evaluating _prediction/concentration_ at each timepoint for all data. Each test is done for data from individual subject observations and for all data by summarizing the observations.

Only non-excluded detects are included in this analysis.