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

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()
#> Correlations are not computed for parameters(s) with one unique value: KON, V2, ALAG1
EXAMPLERUN %>% plot_parameters_correlations(type = "heatmap")
#> Correlations are not computed for parameters(s) with one unique value: KON, V2, ALAG1
EXAMPLERUN %>% plot_parameters_correlations(type = "heatmap", auto_order = FALSE)
#> Correlations are not computed for parameters(s) with one unique value: KON, V2, ALAG1
EXAMPLERUN %>% plot_parameters_correlations(type = "scatterplot")
#> Correlations are not computed for parameters(s) with one unique value: KON, V2, ALAG1
EXAMPLERUN %>% plot_parameters_correlations(type = "scatterplot", smoothing_method = "lm")
#> Correlations are not computed for parameters(s) with one unique value: KON, V2, ALAG1
#> Warning: Removed 18972 rows containing non-finite values (stat_smooth).
EXAMPLERUN %>% plot_parameters_correlations(type = "scatterplot", smoothing_method = "loess")
#> Correlations are not computed for parameters(s) with one unique value: KON, V2, ALAG1
#> Warning: Removed 18972 rows containing non-finite values (stat_smooth).
EXAMPLERUN %>% group_by(STUD) %>% plot_parameters_correlations(type = "scatterplot")
#> Correlations are not computed for parameters(s) with one unique value: KON, V2, ALAG1
#> Warning: Factor variables are omitted in plot