The main workhorse for computing uncertainty quantiles of covariate effects in different subpopulations.
cov_forest_data(m, covariate_scenarios)
An nm object.
A data.frame
. Need columns cov
, value
and (optional) text
. See details for more information.
dplyr::tibble
with quantile information suitable for
cov_forest_plot()
.
The column cov
in covariate_scenarios
refers to covariate
variables in the dataset. The column value
refers to covariate values of
importance. Typically these will be quantiles of continuous variables and
categories (for categorical covariates). The column text
is option but is
a labelling column for cov_forest_plot()
to adjust how the covariate
scenarios are printed on the axis
## requires NONMEM to be installed
if (FALSE) {
dcov <- input_data(m1, filter = TRUE)
dcov <- dcov[!duplicated(dcov$ID), ]
covariate_scenarios <- dplyr::bind_rows(
dplyr::tibble(cov = "HEALTHGP", value = c(0, 1)),
dplyr::tibble(cov = "HEPATIC", value = unique(dcov$HEPATIC[dcov$HEPATIC > -99])),
dplyr::tibble(cov = "BWTIMP", value = c(50, 80, 120)),
dplyr::tibble(cov = "ECOG", value = c(0, 1, 2, 3)),
dplyr::tibble(cov = "BEGFRIMP", value = quantile(dcov$BEGFR[dcov$BEGFR > -99])),
dplyr::tibble(cov = "RACE", value = c(1, 2), text = c("white", "black")),
dplyr::tibble(cov = "PPI", value = c(0, 1)),
dplyr::tibble(cov = "H2RA", value = c(0, 1))
)
dplot <- cov_forest_data(m1, covariate_scenarios = covariate_scenarios)
cov_forest_plot(dplot)
}