Residuals or NPDE versus predicted values
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())
A single plot.
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.
df <- pmplots_data_obs()
cwresi_pred(df, xname="MyDrug (ng/mL)")
#> `geom_smooth()` using formula = 'y ~ x'