View source: R/scatter-model-continuous-x-binary-y-logit.R
scatter_model_continuous_x_binary_y_logit | R Documentation |
Internal function for examining a logit performance
scatter_model_continuous_x_binary_y_logit(
d_plot,
x_name,
y_name = "y",
yhat_name = "yhat",
residual_name = "residual",
alpha_point = 0.05,
alpha_se_band = 0.15,
x_label_format = scales::comma,
color_smooth_observed = "#1b9e77",
color_smooth_predicted = "#d95f02",
color_smooth_residual = "#7570b3",
vertical_limits = c(-0.05, 1.05),
jitter_observed = ggplot2::position_jitter(w = 0, h = 0.2),
jitter_predicted = ggplot2::position_jitter(w = 0, h = 0),
seed_value = NA_real_
)
d_plot |
The |
x_name |
The name of the predictor |
y_name |
The name of the observed response |
yhat_name |
The name of the predicted response |
residual_name |
The name of the model residual. |
alpha_point |
The transparency of each plotted point. A |
alpha_se_band |
The transparency of the standard error bands. A |
x_label_format |
The name of the function used to format the x-axis. |
color_smooth_observed |
The plotted color of the observed values' GAM trend. |
color_smooth_predicted |
The plotted color of the predicted's GAM trend. |
color_smooth_residual |
The plotted color of the residual's GAM trend. |
vertical_limits |
The plotted limits of the response variable. A two-element |
jitter_observed |
A function dictating how the observed values are jittered. |
jitter_predicted |
A function dictating how the predicted values are jittered. |
seed_value |
The value of the RNG seed, which affects jittering. No seed is set if a value of |
ds <-
mtcars |>
dplyr::mutate(
# am = as.logical(am)
) |>
dplyr::select(
mpg,
am,
) |>
tibble::rownames_to_column("model")
# scatter_model_continuous_x_binary_y_logit(
# d_plot = ds,
# x_name = "mpg",
# y_name = "am",
# yhat_name = NULL
# )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.