Learn R Programming

invivoPKfit (version 2.0.1)

get_starts_flat: Get starting values for flat model

Description

Derive starting values for flat model parameters from available data

Usage

get_starts_flat(data, par_DF)

Value

The same `data.frame` as `par_DF`, with an additional variable `starts` containing the derived starting value for each parameter. If a parameter cannot be estimated from the available data, then its starting value will be `NA_real_`

Arguments

data

The data set to be fitted (e.g. the result of [preprocess_data()])

par_DF

A `data.frame` with the following variables (e.g., as produced by [get_params_flat()]) - `param_name`: Character: Names of the model parameters - `param_units`: Character: Units of the model parameters - `optimize_param`: TRUE if each parameter is to be estimated from the data; FALSE otherwise - `use_param`: TRUE if each parameter is to be used in evaluating the model; FALSE otherwise -`lower_bounds`: Numeric: The lower bounds for each parameter - `upper_bounds`: Numeric: The upper bounds for each parameter

Author

Caroline Ring

Details

This function is called internally by [get_params_1comp()] and should generally not be called directly by the user.

The full set of model parameters for the flat model includes `Vdist`,`Fgutabs`, and `Rblood2plasma`. Whether each one can be estimated from the data depends on what routes of administration are included in the data.

The numerical optimizer requires starting guesses for the value of each parameter to be estimated from the data. Default starting guesses are derived from the available data.

These are intended to be *very* rough starting guesses, so the algorithm here is extremely naive. This function is not itself intended to produce valid estimates for any of the model parameters, and it is highly unlikely to do so.

The derivation process is as follows.

First, data are filtered to exclude any non-detects.

Then, data are split by route of administration, into an IV data set and an oral data set. (It is possible that either IV or oral data may not be available for a chemical.)

If IV data exist, then only IV data are used to derive a starting estimate for `Vdist`. Concentrations are dose-normalized (divided by their corresponding dose) and log10-transformed. The mean dose-normalized, log10-transformed concentration is calculated (call it `Cmean_log10`). `Vdist` starting value is then derived as `1/(10^Cmean_log10)` .

If any oral data exist (whether or not IV data also exist), then the oral data are used to derive a starting value for `Fgutabs_Vdist`. Concentrations are dose-normalized (divided by their corresponding dose) and log10-transformed. The mean dose-normalized, log10-transformed concentration is calculated (call it `Cmean_log10`). `Fgutabs_Vdist` starting value is then set equal to `10^Cmean_log10` .

#Starting value for `Rblood2plasma`

If both blood and plasma data are available, then the starting value for `Rblood2plasma` is derived as follows.

If IV data are available for both blood and plasma, then the starting value for `Rblood2plasma` is derived as the ratio of `Vdist` for blood data and `Vdist` for plasma data.

If oral data, but not IV data, are available for both blood and plasma, then the starting value for `Rblood2plasma` is derived as the ratio of `Fgutabs_Vdist` for plasma data and `Fgutabs_Vdist` for blood data.

If only blood data or only plasma data are available, then the starting value for `Rblood2plasma` is set at a constant 1.

See Also

Other flat model functions: auc_flat(), cp_flat(), get_params_flat()

Other get_starts functions: get_starts_1comp(), get_starts_1comp_cl(), get_starts_1comp_fup(), get_starts_2comp()

Other built-in model functions: auc_1comp(), auc_1comp_cl(), auc_2comp(), auc_flat(), cp_1comp(), cp_1comp_cl(), cp_2comp(), cp_2comp_dt(), cp_flat(), get_params_1comp(), get_params_1comp_cl(), get_params_1comp_fup(), get_params_2comp(), get_params_flat(), get_starts_1comp(), get_starts_1comp_cl(), get_starts_1comp_fup(), get_starts_2comp(), tkstats_2comp(), transformed_params_2comp()