Generate list of footnotes to append to bootstrap parameter tables.

boot_notes(.ci = NULL, .n_run = NULL)

Arguments

.ci

Confidence interval. A value from 1 to 99 denoting the percent confidence interval.

.n_run

Number of runs in the bootstrap

See also

Examples

if (FALSE) { # \dontrun{
model_dir <- system.file("model/nonmem", package = "pmparams")
paramKey <-  file.path(model_dir, "pk-parameter-key-new.yaml")
mod <- bbr::read_model(file.path(model_dir, "106"))
boot_run <- bbr::read_model(file.path(model_dir, "106-boot"))

# Parameter Estimates
param_df <- mod %>%
  define_param_table(paramKey, .ci = 95) %>%
  format_param_table()

# Bootstrap Estimates
boot_est <- bbr::bootstrap_estimates(boot_run)
boot_df <- boot_est %>%
  define_boot_table(paramKey, .ci = 95) %>%
  format_boot_table()

# Combine
combine_df <- dplyr::left_join(param_df, boot_df)

# Make random effects table and add relevant footnotes:
footnotes <- param_notes()
bootnotes <- boot_notes(.ci = 95, .n_run = nrow(boot_est))

combine_df %>%
  make_boot_pmtable(.pmtype = "random") %>%
  pmtables::st_notes(footnotes$ci, footnotes$cv) %>%
  pmtables::st_notes_str() %>%
  pmtables::st_notes(bootnotes$boot_ci)  %>%
  pmtables::st_notes(footnotes$cvOmegaEq, footnotes$cvSigmaEq)  %>%
  pmtables::stable() %>%
  # preview in Rstudio viewer (requires `magick` and `pdftools`)
  pmtables::st_as_image(border = "0.8cm 0.7cm")
} # }