res_pred: Residuals or NPDE versus predicted values

View source: R/res_pred.R

res_predR Documentation

Residuals or NPDE versus predicted values

Description

Residuals or NPDE versus predicted values

Usage

res_pred(
  df,
  x = pm_axis_pred(),
  y = pm_axis_res(),
  xname = "value",
  xs = defx(),
  ys = defy(),
  ...
)

wres_pred(df, ..., y = pm_axis_wres())

cwres_pred(df, ..., y = pm_axis_cwres())

cwresi_pred(df, y = pm_axis_cwresi(), ...)

npde_pred(df, ..., y = pm_axis_npde(), hline = npde_ref())

Arguments

df

data frame to plot

x

character name for x-axis data

y

character name for y-axis data

xname

glued into x-axis title

xs

see defx

ys

see defy

...

passed to scatt and layer_hs

hline

a list of parameters to pass to geom_hline specifying where to locate a horizontal reference line aesthetics to use

Details

Since this function creates a scatter plot, both the x and y columns must be numeric.

The y axis name is always the name of the residual (e.g. "Weighted residual"). Use the xname argument to add specific name and or unit to the dependent variable (see the example).

A loess smooth and a horizontal reference line are layered on the plot.

Value

A single plot.

See Also

geom_3s

Examples


df <- pmplots_data_obs()

cwresi_pred(df, xname="MyDrug (ng/mL)")


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