plot_parameters_correlations: Plot parameters correlations

View source: R/plot_parameters_correlations.R

plot_parameters_correlationsR Documentation

Plot parameters correlations

Description

Returns selected parameters correlations in the form of either a matrix, a data frame or a plot.

Usage

plot_parameters_correlations(
  run,
  parameters = NULL,
  type = "heatmap",
  correlation_method = NULL,
  baseline_only = TRUE,
  auto_order = TRUE,
  smoothing_method = NULL,
  smoothing_se = TRUE,
  fixed_ratio = TRUE,
  auto_legend = TRUE
)

Arguments

run

pmxploit NONMEM run object.

parameters

character vector of parameters names. Default is NULL, returning all individual parameters (random and post-hoc).

type

character. Type of plot. One of heatmap or scatterplot.

correlation_method

a character string indicating which correlation coefficient (or covariance) is to be computed. One of "pearson" (default), "kendall", or "spearman": can be abbreviated. If type = "scatterplot", "pearson" method will be used.

baseline_only

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

auto_order

logical. If type = "heatmap", auto-orders the matrix with respect to the distances between values. Default is TRUE.

smoothing_method

character. If type = "scatterplot", corresponds to a ggplot2 smoothing method.

smoothing_se

logical. Display confidence interval around smooth?

fixed_ratio

logical. If type = "heatmap", plot scaled to a 1:1 ratio. Default is TRUE.

auto_legend

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

Value

A ggplot2 object.

Examples

EXAMPLERUN %>% plot_parameters_correlations()

EXAMPLERUN %>% plot_parameters_correlations(type = "heatmap")
EXAMPLERUN %>% plot_parameters_correlations(type = "heatmap", auto_order = FALSE)

EXAMPLERUN %>% plot_parameters_correlations(type = "scatterplot")
EXAMPLERUN %>% plot_parameters_correlations(type = "scatterplot", smoothing_method = "lm")
EXAMPLERUN %>% plot_parameters_correlations(type = "scatterplot", smoothing_method = "loess")
EXAMPLERUN %>% group_by(STUD) %>% plot_parameters_correlations(type = "scatterplot")

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