Skip to content

Commit

Permalink
Update check_model() defaults to align with easystats/see#299
Browse files Browse the repository at this point in the history
Also change default to `verbose = FALSE`
  • Loading branch information
bwiernik committed Jul 23, 2023
1 parent d60f2eb commit 5040b9b
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 10 deletions.
1 change: 1 addition & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ Suggests:
patchwork,
pscl,
psych,
qqplotr (>= 0.0.6),
randomForest,
rmarkdown,
rstanarm,
Expand Down
9 changes: 5 additions & 4 deletions R/check_model.R
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,14 @@
#' for dots, and third color for outliers or extreme values.
#' @param theme String, indicating the name of the plot-theme. Must be in the
#' format `"package::theme_name"` (e.g. `"ggplot2::theme_minimal"`).
#' @param detrend Should QQ/PP plots be detrended?
#' @param detrend Logical. Should Q-Q/P-P plots be de-trended?
#' Defaults to `TRUE` if the *qqplotr* package is installed and `FALSE` otherwise.
#' @param show_dots Logical, if `TRUE`, will show data points in the plot. Set
#' to `FALSE` for models with many observations, if generating the plot is too
#' time-consuming. By default, `show_dots = NULL`. In this case `check_model()`
#' tries to guess whether performance will be poor due to a very large model
#' and thus automatically shows or hides dots.
#' @param verbose Toggle off warnings.
#' @param verbose If `FALSE` (default), suppress most warning messages.
#' @param ... Currently not used.
#' @inheritParams check_predictions
#'
Expand Down Expand Up @@ -174,11 +175,11 @@ check_model.default <- function(x,
dot_alpha = 0.8,
colors = c("#3aaf85", "#1b6ca8", "#cd201f"),
theme = "see::theme_lucid",
detrend = FALSE,
detrend = requireNamespace("qqplotr", quietly = TRUE),
show_dots = NULL,
bandwidth = "nrd",
type = "density",
verbose = TRUE,
verbose = FALSE,
...) {
# check model formula
if (verbose) {
Expand Down
2 changes: 1 addition & 1 deletion R/check_normality.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#' (e.g. Q-Q plots) are preferable. For generalized linear models, no formal
#' statistical test is carried out. Rather, there's only a `plot()` method for
#' GLMs. This plot shows a half-normal Q-Q plot of the absolute value of the
#' standardized deviance residuals is shown (being in line with changes in
#' standardized deviance residuals is shown (in line with changes in
#' `plot.lm()` for R 4.3+).
#'
#' @examples
Expand Down
9 changes: 5 additions & 4 deletions man/check_model.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/check_normality.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 5040b9b

Please sign in to comment.