Plots for DV versus population or individual predicted values. dv_preds
makes both plots and returns them as a list (more in details).
dv_pred(
df,
x = pm_axis_pred(),
y = pm_axis_dv(),
yname = "value",
xname = "value",
ys = list(),
xs = ys,
loglog = FALSE,
scales = c("fixed", "free", "null"),
logbr = c("full", "half", "null"),
...
)
dv_ipred(df, x = pm_axis_ipred(), ...)
dv_preds(df, ...)data frame to plot
character name for x-axis data
character name for y-axis data
used to form y-axis label
used to form x-axis label
see defy()
see defx(); note that xs defaults to ys so (by
default) the scale configuration will be identical; pass both xs and ys
to have them independently configured
if TRUE, x- and y-axes will be log-transformed
if TRUE, then the x- and y- axes will be forced
to have the same limits
when using log scale, should the tick marks be at full-log
intervals or half-log intervals? If you pass null, the default scales
will be used (which might be identical to full). Use xs and ys to
pass custom scales.
passed to scatt() and layer_as()
dv_pred and dv_ipred return a single plot; dv_preds returns a list
of plots.
Since this function creates a scatter plot, both the x and y columns
must be numeric.
dv_preds returns a list of two plots, with the result of dv_pred in the
first position and the result of dv_ipred in the second position. In
this case, ... are passed to both functions.
df <- pmplots_data_obs()
dv_pred(df)
#> `geom_smooth()` using formula = 'y ~ x'
dv_ipred(df, yname="MyDrug (ng/mL)")
#> `geom_smooth()` using formula = 'y ~ x'
#> `geom_smooth()` using formula = 'y ~ x'
dv_preds(df, yname = "MyDrug (ng/mL)")
#> [[1]]
#> `geom_smooth()` using formula = 'y ~ x'
#>
#> [[2]]
#> `geom_smooth()` using formula = 'y ~ x'
#> `geom_smooth()` using formula = 'y ~ x'
#>