plot_parameters_vs_continuous_covariates: Parameters vs continuous covariates correlations

View source: R/plot_parameters_vs_continuous_covariates.R

plot_parameters_vs_continuous_covariatesR Documentation

Parameters vs continuous covariates correlations

Description

Returns a plot of the selected parameters and continuous covariates correlations.

Usage

plot_parameters_vs_continuous_covariates(
  run,
  parameters = NULL,
  covariates = NULL,
  type = "heatmap",
  correlation_method = NULL,
  auto_order = TRUE,
  baseline_only = 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).

covariates

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

type

character. Type of distribution representation. One of histogram, density, boxplot and qq (Q-Q plot of the Normal distribution). Default is histogram.

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.

auto_order

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

baseline_only

logical. Consider only the baseline (= first) values of the subjects. 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


params <- c("ETCL", "ETV1", "KINT", "KDEG")
covs <- c("AGE", "WT", "BSLDLC", "FBSPCSK")

EXAMPLERUN %>%
  plot_parameters_vs_continuous_covariates(parameters = params, covariates = covs, type = "heatmap")+
  ggplot2::theme(legend.position = "bottom")

EXAMPLERUN %>%
  plot_parameters_vs_continuous_covariates(parameters = params, covariates = covs, type = "scatterplot", smoothing_method = "lm")
EXAMPLERUN %>%
  plot_parameters_vs_continuous_covariates(parameters = params, covariates = covs, type = "scatterplot", smoothing_method = "loess")
EXAMPLERUN %>%
  group_by(SEX) %>%
  plot_parameters_vs_continuous_covariates(parameters = params, covariates = covs, type = "scatterplot")

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