npde_scatter: Create a display of residuals versus time and predicted...

View source: R/displays.R

npde_scatterR Documentation

Create a display of residuals versus time and predicted values

Description

Get a single graphic of NPDE or CWRES diagnostics versus TIME, TAD and PRED. Output can be in either long or compact format.

Usage

npde_scatter(
  df,
  xname = "value",
  unit_time = "hours",
  unit_tad = "hours",
  xby_time = NULL,
  xby_tad = NULL,
  tag_levels = NULL,
  compact = FALSE
)

cwres_scatter(
  df,
  xname = "value",
  unit_time = "hours",
  unit_tad = "hours",
  xby_time = NULL,
  xby_tad = NULL,
  tag_levels = NULL,
  compact = FALSE
)

Arguments

df

a data frame to plot.

xname

passed to npde_pred().

unit_time

passed to npde_tad() as xunit.

unit_tad

passed to npde_time() as xunit.

xby_time

passed to npde_time() as xby.

xby_tad

passed to npde_tad() as xby.

tag_levels

passed to patchwork::plot_annotation().

compact

use compact = TRUE to get a more compact display; see Examples.

Value

A single graphic with three panels (NPDE or CWRES versus TIME, TAD and PRED) as a patchwork object. The default behavior is to create a graphic with three panels in three rows, filling a portrait page. Use compact = TRUE for a single graphic in two rows, with the TIME plot on the top and the TAD and PRED plots on the bottom.

See Also

npde_panel(), npde_panel_list(), cwres_panel(), cwres_panel_list()

Examples

data <- pmplots_data_obs()
npde_scatter(data)
npde_scatter(data, compact = TRUE)


metrumresearchgroup/pmplots documentation built on Oct. 15, 2024, noon