plot_individual_profiles: Individual profiles (observations, predictions) versus...

View source: R/plot_individual_profiles.R

plot_individual_profilesR Documentation

Individual profiles (observations, predictions) versus independent variable

Description

Individual profiles (observations, predictions) versus independent variable

Usage

plot_individual_profiles(
  run,
  ids = NULL,
  compartment,
  predictions = "PRED",
  idv = "TIME",
  log_dv = FALSE,
  predictions_dots = TRUE,
  show_observations = TRUE,
  categorical_covariate = NULL,
  x_scale = "linear",
  y_scale = "linear",
  logticks_annotation = TRUE,
  facetted = TRUE,
  facet_scales = "free",
  n_row = NULL,
  n_col = NULL,
  keep_time_zero = FALSE,
  auto_legend = TRUE
)

Arguments

run

pmxploit NONMEM run object.

ids

integer vector of the IDs of the individuals to plot. Default is NULL, plotting all the individuals.

compartment

integer. Number of the compartment of the dependent variable.

predictions

character vector. Name of the predictions column(s) in the dataset. Default is "PRED" for both population predictions and individual predictions.

idv

character. Name of the independent variable column to plot on the x-axis. Default is "TIME".

log_dv

logical. Set it to TRUE if the source dependent variable are in log_scale.

predictions_dots

logical. If TRUE plot predictions as dots on top of the profile lines.

show_observations

logical. If TRUE plot observations.

categorical_covariate

character. A categorical covariate to split the data. May be useful for covariates that vary within an individual.

x_scale

character. X-axis scale, one of "linear" or "log". Default is "linear".

y_scale

character. Y-axis scale, one of "linear" or "log". Default is "linear".

logticks_annotation

logical. If x_scale and/or y_scale are "log", adds ticks annotation on the axis.

facetted

logical. If TRUE (default), plots each individual inside a separate facet.

facet_scales

character. ggplot2 facet scales. Default is "free".

n_row

integer. Number of rows of facets.

n_col

integer. Number of columns of facets.

keep_time_zero

logical. If TRUE, does not ignore values at initiation (when TIME = 0). Default is FALSE.

auto_legend

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

Value

A ggplot2 object.

Examples

EXAMPLERUN %>% plot_individual_profiles(ids = 1:4, compartment = 2, predictions = "PRED")

EXAMPLERUN %>% plot_individual_profiles(compartment = 2, predictions = "PRED", facetted = FALSE)

pnolain/pmxploit documentation built on Jan. 31, 2024, 1:16 p.m.