MonolixSuite in R
Auto Light Dark
Auto Light Dark

tableBEResults()

Produces a reporting-ready summary table of bioequivalence (BE) analysis results from a PKanalix project, including geometric mean ratios (GMR), confidence intervals, and BE conclusions for every test vs. reference comparison. Supports per-parameter rounding, (custom) aliases/units, and optional BE acceptance limits and conclusion columns.

Usage

R
tableBEResults(projectFile      = NULL,
               selectParameters = NULL,
               roundDigits      = 3,
               roundMethod      = c("monolixSuiteRounding", "significantFigures", "significantFiguresPreserved", "none"),
               roundByParameter = NULL,
               trailingZeros    = TRUE,
               units            = TRUE,
               aliases          = TRUE,
               customUnits      = NULL,
               customAliases    = NULL,
               BELimits         = FALSE,
               BEConclusion     = TRUE,
               prettyLabels     = TRUE,
               mock             = FALSE)

Arguments

  • projectFile (character) Path to a PKanalix project file (.pkx). If NULL (default), uses the currently loaded project.

  • selectParameters (character vector) Parameter names to include. If NULL (default), all BE parameters are included.

  • roundDigits (integer) Number of decimal places for rounding (default 3).

  • roundMethod (character) How numeric values are rounded:

    • "monolixSuiteRounding" (default) - Mirrors MonolixSuite display. The integer part is kept exactly as-is, and only the fractional part is rounded to roundDigits significant figures (so small values < 1 get more decimal places).

    • "significantFigures" - Standard significant-figures rounding to roundDigits total significant digits, zeroing non-significant digits before the decimal for large numbers.

    • "significantFiguresPreserved" - Like "significantFigures", but never zeroes digits before the decimal: once the integer part already has roundDigits digits, the value is rounded to the nearest whole number.

    • "none" - No rounding.

  • roundByParameter Optional per-parameter rounding overrides on top of the global settings, either a named numeric vector of digits (c(Cmax = 2, AUClast = 4)) or a 3-column data frame (parameter, digits, method). Unlisted parameters keep global settings (default NULL).

  • trailingZeros (logical) Only applies when roundMethod != "none". If TRUE(default), rounded concentration values are shown to the full precision implied by roundDigits/roundMethod, padding with trailing zeros (e.g. 1.20, 0.010); if FALSE, the minimal form is shown. With roundMethod = "none" raw values are shown unchanged.

  • units (logical) If TRUE (default), appends units to parameter names (e.g. "ln(AUClast) (h*ng/mL)"). Units are retrieved from project settings.

  • aliases (logical) If TRUE (default), uses parameter aliases instead of raw parameter names (e.g. "AUC[[sub:0-tlast]]" instead of "AUClast").

  • customUnits (named character vector/ data.frame) Named vector or 2-column data frame mapping parameters → custom unit labels, e.g. c(Cmax = "ng/mL", AUClast = "h*ng/mL"). Overrides units from the PKanalix project.

  • customAliases (named character / data.frame) Named vector or 2-column data frame mapping parameters → custom alias labels, e.g. c(Cmax = "C[[sub:max]]", AUClast = "AUC[[sub:0-tlast]]"). Overrides project aliases. Supports [[sub:…]], [[sup:…]], ~italic~.

  • BELimits (logical) If TRUE, includes a column showing the BE acceptance criteria interval (e.g. "(80;125)"), retrieved from the project's BE settings. Default FALSE.

  • BEConclusion (logical) If TRUE (default), includes a conclusion column indicating "Bioequivalent" or "Not bioequivalent" based on the analysis results.

  • prettyLabels (logical) If TRUE (default), converts column names to report-ready labels (e.g. "Ratio (%)", "Confidence Interval").

  • mock (logical) If TRUE, masks values for documentation/examples: the ratio, confidence-interval, and BE-limits columns become placeholders (e.g. "xx.xx", "(xx.xx;xx.xx)"); Comparison, the parameter name, and Conclusion are relabeled generically per unique value ("Comparison 1", "Parameter 1", "Conclusion 1"…), with the same parameter keeping the same label across all its comparison rows. Default FALSE.

Returns: A data frame of BE results with columns for comparison, parameter, GMR (ratio), and confidence interval, plus optional BE limits and conclusion columns. Parameters analyzed on the log scale are indicated with an ln() prefix.

Examples

Bioequivalence result table with default settings

R
initializeLixoftConnectors(path.software, software = "pkanalix")
loadProject(paste0(getDemoPath(), "/3.bioequivalence/project_crossover_foodeffect.pkx"))
runScenario()
tableBEResults()

#>    Comparison                        Parameter Geometric Mean\nRatio (%) Confidence \nInterval    Conclusion
#> Fed vs.Fasted   ln(AUC[[sub:0-inf]]) (h*mg/mL)                    98.459      (94.753;102.309) Bioequivalent
#> Fed vs.Fasted ln(AUC[[sub:0-tlast]]) (h*mg/mL)                    98.801      (96.358;101.305) Bioequivalent
#> Fed vs.Fasted         ln(C[[sub:max]]) (mg/mL)                    94.442       (90.055;99.041) Bioequivalent

Bioequivalence result table with per parameter rounding and BE limits displayed

R
loadProject(paste0(getDemoPath(), "/3.bioequivalence/project_crossover_foodeffect.pkx"))
runScenario()

roundSpec <- data.frame(
  parameter = c("AUCINF_obs", "AUClast",              "Cmax"),
  digits    = c(5,            2,                       3),
  method    = c("significantFigures", "monolixSuiteRounding", "significantFigures"),
  stringsAsFactors = FALSE
)

tableBEResults(BELimits         = TRUE,
               roundByParameter = roundSpec)

#>   Comparison                        Parameter Geometric Mean\nRatio (%) Confidence \nInterval Criteria\nInterval    Conclusion
#> Fed vs.Fasted   ln(AUC[[sub:0-inf]]) (h*mg/mL)                    98.459       (94.753;102.31)           (80;125) Bioequivalent
#> Fed vs.Fasted ln(AUC[[sub:0-tlast]]) (h*mg/mL)                     98.80        (96.36;101.31)           (80;125) Bioequivalent
#> Fed vs.Fasted         ln(C[[sub:max]]) (mg/mL)                      94.4           (90.1;99.0)           (80;125) Bioequivalent

Bioequivalence result table with multiple comparisons

R
loadProject(paste0(getDemoPath(),"/2.case_studies/project_aPCSK9_SAD.pkx"))

mySettings <- getScenario()
mySettings$nca = TRUE
mySettings$be  = TRUE
runScenario()
tableBEResults(selectParameters = c("AUCINF_D_obs", "AUClast_D"))

#>     Comparison                         Parameter Geometric Mean\nRatio (%) Confidence \nInterval        Conclusion
#> 150mg vs.300mg   ln(AUC[[sub:0-inf]]/Dose) (d/L)                    65.635       (44.576;96.641) Not bioequivalent
#> 150mg vs.300mg ln(AUC[[sub:0-tlast]]/Dose) (d/L)                    65.006       (44.074;95.880) Not bioequivalent
#> 800mg vs.300mg   ln(AUC[[sub:0-inf]]/Dose) (d/L)                   106.462      (76.475;148.207) Not bioequivalent
#> 800mg vs.300mg ln(AUC[[sub:0-tlast]]/Dose) (d/L)                   104.983      (75.001;146.951) Not bioequivalent

Last updated: