Plot DV versus predicted values

dv_pred(
  df,
  x = pm_axis_pred(),
  y = pm_axis_dv(),
  yname = "value",
  xname = "value",
  xs = list(),
  ys = list(),
  loglog = FALSE,
  scales = c("fixed", "free"),
  ...
)

dv_ipred(df, x = pm_axis_ipred(), ...)

dv_preds(df, ...)

Arguments

df

data frame to plot

x

character name for x-axis data

y

character name for y-axis data

yname

used to form y-axis label

xname

used to form x-axis label

xs

see defx

ys

see defy

loglog

if TRUE, x- and y-axes will be log-transformed

scales

if TRUE, then the x- and y- axes will be forced to have the same limits

...

passed to scatt and layer_as

Value

A single plot.

Details

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.

Examples

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'
#>