Plots the distributions of the selected categorical covariates.

plot_categorical_covariates_distributions(run, covariates = NULL,
  frequency = FALSE, order = TRUE, drop = FALSE,
  bar_adjustment = "dodge", baseline_only = TRUE, auto_legend = TRUE)

Arguments

run

pmxploit NONMEM run object.

covariates

character vector of categorical covariates names. Default is NULL, returning all categorical covariates.

frequency

logical. Plot frequency instead of count on the y-axis.

bar_adjustment

character. ggplot2 position argument. One of identity, dodge, jitterdodge, jitter, nudge and stack. (see ggplot2 documentation). Default is dodge.

baseline_only

logical. Consider only the baseline (= first) values of the subjects. Default is TRUE.

auto_legend

logical. When TRUE (default), default pmxploit plotting options are applied (title, labels, axis...).

split_by

character. Name of a categorical covariate used to split the distributions.

Value

A ggplot2 object.

Examples

EXAMPLERUN %>% plot_categorical_covariates_distributions(covariates = c("SEX", "STUD"))
EXAMPLERUN %>% group_by(SEX) %>% plot_categorical_covariates_distributions(covariates = "STUD", frequency = TRUE)
#> Warning: argument is not an atomic vector; coercing