Skip to contents

Overview

Ratio calculations compare PK parameters between groups — across analytes, dose profiles, specimen types, or routes of administration. In aNCA, ratios are configured in NCA > Setup > Parameter Selection > Ratio Calculations.

Each ratio is defined by:

Field Description
Test Parameter PK parameter for the numerator (e.g. CMAX, AUCLST)
Ref Parameter PK parameter for the denominator (defaults to same as test)
Test Groups Group level for the numerator. (all other levels) uses every level except the reference.
Ref Groups Group level for the denominator (e.g. PARAM: ParentDrug)
Aggregate no = within-subject ratio; yes = mean of reference across subjects; if-needed = falls back to aggregation when within-subject matching is not possible
Adj. Factor Multiplier applied to the ratio (e.g. molecular weight correction)
PPTESTCD Auto-generated CDISC code; editable

The general formula is:

Ratio=Test Parameter[Test Group]Ref Parameter[Ref Group]×Adj. Factor\text{Ratio} = \frac{\text{Test Parameter}[\text{Test Group}]}{\text{Ref Parameter}[\text{Ref Group}]} \times \text{Adj. Factor}

aNCA auto-generates a PPTESTCD based on which grouping variable is used as the reference. The sections below describe each ratio type.

Ratio calculations are implemented in aNCA independently of PKNCA. They operate on the computed NCA results — dividing one parameter value by another across groups — rather than being part of the core NCA engine.

Note: Ratio calculations are only available for parameters selected in the Parameter Selection section. If a parameter is not selected, it will not be available for ratio calculations.


Metabolite Ratio (MR)

When: The reference group column is the analyte column (e.g. PARAM).

PPTESTCD: MR{param} — e.g. MRCMAX

Use case: Compare a metabolite to its parent compound.

Formula

MRCMAX=CMAXmetaboliteCMAXparent×Adj. FactorMR_{CMAX} = \frac{CMAX_{\text{metabolite}}}{CMAX_{\text{parent}}} \times \text{Adj. Factor}

Setup

Field Value
Test Parameter CMAX
Ref Parameter CMAX
Ref Groups PARAM: ParentDrug
Test Groups (all other levels) or PARAM: Metabolite1
Adj. Factor MWparent / MWmetabolite (if units differ)

Notes

  • When test and reference use different molecular weight units, set the adjusting factor to MW_ref / MW_test to normalize.
  • (all other levels) computes a ratio for every analyte except the reference.

Accumulation Ratio (AR)

When: The reference group column is the dose profile column (ATPTREF).

PPTESTCD: AR{param} — e.g. ARCMAX

Use case: Compare steady-state exposure to single-dose exposure.

Formula

ARCMAX=CMAXsteady-stateCMAXsingle doseAR_{CMAX} = \frac{CMAX_{\text{steady-state}}}{CMAX_{\text{single dose}}}

Setup

Field Value
Test Parameter CMAX
Ref Parameter CMAX
Ref Groups ATPTREF: DOSE 1 (single dose profile)
Test Groups (all other levels) or specific e.g. ATPTREF: DOSE 5
Adj. Factor 1

Notes

  • ATPTREF identifies the dose number / profile. The reference is typically the first dose (single dose), and the test is a later dose (e.g. at steady state).
  • Accumulation ratios > 1 indicate drug accumulation.

Renal Clearance (RENALCL)

When: The test specimen is urine, the reference specimen is plasma, the test parameter starts with RCAMINT (recovered amount in interval), and the reference parameter starts with AUC.

PPTESTCD: RENALCL

Use case: Estimate renal clearance from urinary recovery and plasma AUC.

Formula

CLR=Ae0τAUC0τCL_R = \frac{Ae_{0-\tau}}{AUC_{0-\tau}}

Where Ae0τAe_{0-\tau} is the cumulative amount excreted in urine over the interval, and AUC0τAUC_{0-\tau} is the corresponding plasma AUC.

Setup

Field Value
Test Parameter RCAMINT (or interval-specific, e.g. RCAMINT_0-24)
Ref Parameter AUCLST (or matching interval AUC)
Ref Groups PCSPEC: Plasma
Test Groups PCSPEC: URINE
Adj. Factor 1

Notes

  • The time intervals for urine collection and plasma AUC should match.
  • Units: if amount is in mg and AUC is in ng·h/mL, adjust the factor accordingly (e.g. 1000 to convert mg to µg).

Absolute Bioavailability (FABS)

When: The reference group is an intravascular route (e.g. ROUTE: INTRAVASCULAR).

PPTESTCD: FABS

Use case: Compare extravascular (e.g. oral) to intravascular (IV) bioavailability, typically dose-normalized.

Formula

Fabs=AUCoral/DoseoralAUCIV/DoseIVF_{abs} = \frac{AUC_{\text{oral}} / Dose_{\text{oral}}}{AUC_{\text{IV}} / Dose_{\text{IV}}}

Setup

Field Value
Test Parameter AUCLST (or AUCIFO)
Ref Parameter AUCLST (or AUCIFO)
Ref Groups ROUTE: INTRAVASCULAR
Test Groups (all other levels)
Adj. Factor DoseIV / Doseoral (if not already dose-normalized)

Notes

  • If the parameters are already dose-normalized (e.g. AUCLSTD) or with the same dose, set the adjusting factor to 1.
  • FABS values close to 1 indicate complete absorption.
  • The auto-detection matches both the mapped ROUTE column and the raw ROUTE column, looking for values starting with INTRA.

Relative Bioavailability (FREL)

When: The reference group is a route column but NOT intravascular.

PPTESTCD: FREL

Use case: Compare bioavailability between two extravascular formulations or routes (e.g. tablet vs. capsule, oral vs. subcutaneous).

Formula

Frel=AUCtest formulationAUCref formulation×DoserefDosetestF_{rel} = \frac{AUC_{\text{test formulation}}}{AUC_{\text{ref formulation}}} \times \frac{Dose_{\text{ref}}}{Dose_{\text{test}}}

Setup

Field Value
Test Parameter AUCLST
Ref Parameter AUCLST
Ref Groups ROUTE: EXTRAVASCULAR (reference formulation)
Test Groups (all other levels) or specific route
Adj. Factor Doseref / Dosetest (if not dose-normalized)

Notes

  • The distinction between FABS and FREL is automatic: if the reference route is intravascular, aNCA assigns FABS; otherwise FREL.
  • For crossover studies, use Aggregate: no to compute within-subject ratios.

Generic Ratio (RA)

When: The reference group column does not match any of the specific patterns above (not analyte, not dose profile, not specimen, not route).

PPTESTCD: RA{param} — e.g. RACMAX

Use case: Any other grouping variable — cohort, treatment arm, dose level, period, etc.

Formula

RACMAX=CMAXtest groupCMAXref group×Adj. FactorRA_{CMAX} = \frac{CMAX_{\text{test group}}}{CMAX_{\text{ref group}}} \times \text{Adj. Factor}

Setup

Field Value
Test Parameter Any PK parameter
Ref Parameter Any PK parameter (usually same as test)
Ref Groups Any grouping variable and level (e.g. COHORT: Low Dose)
Test Groups (all other levels) or specific level
Adj. Factor 1 (or as needed)

Notes

  • This is the fallback category. If aNCA cannot determine a more specific ratio type from the reference group column, it assigns RA{param}.
  • Common uses: dose proportionality (across DOSEA or COHORT), food effect (across FASTED/FED groups), period comparisons.

Aggregation Modes

The Aggregate setting controls how reference values are handled when subjects differ between test and reference groups:

Mode Behavior
no Strict within-subject matching. Fails if a subject is missing from the reference group.
yes Computes the arithmetic mean of reference values across all subjects, then divides each test subject’s value by that mean.
if-needed Tries within-subject first. For subjects without a matching reference, falls back to the aggregated mean.

Recommendation: Use no for crossover designs where every subject has both test and reference. Use if-needed for parallel designs or when some subjects lack reference data.


PPTESTCD Auto-Generation

aNCA auto-generates PPTESTCD codes based on the reference group column:

Reference column matches PPTESTCD pattern Example
Analyte column (PARAM) MR{param} MRCMAX
Dose profile (ATPTREF) AR{param} ARAUCLST
Specimen + urine/plasma + RCAMINT/AUC RENALCL RENALCL
Route = intravascular FABS FABS
Route (other) FREL FREL
Anything else RA{param} RACMAX

When multiple ratios produce the same code, a numeric suffix is appended (e.g. MRCMAX, MRCMAX1).

The PPTESTCD field is editable — you can override the auto-generated code with any custom name.


Using the R Script

Ratio calculations can also be run outside the Shiny app using calculate_ratios():

library(aNCA)

# Assuming `nca_results` is a PKNCAresults object
ratios <- calculate_ratios(
  data = nca_results,
  test_parameter = "CMAX",
  ref_parameter = "CMAX",
  match_cols = c("USUBJID", "start", "end"),
  ref_groups = data.frame(PARAM = "ParentDrug"),
  adjusting_factor = 1,
  custom_pptestcd = "MRCMAX"
)

For the app-level wrapper that processes a full ratio table:

# ratio_table is a data.frame with columns:
# TestParameter, RefParameter, RefGroups, TestGroups,
# AggregateSubject, AdjustingFactor, PPTESTCD
results <- calculate_table_ratios(nca_results, ratio_table)