Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke committed Mar 15, 2024
1 parent b9454a2 commit b128174
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions R/check_normality.R
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ check_normality.default <- function(x, ...) {

if (!insight::model_info(x)$is_linear) {
insight::format_alert(
"Checking normality of residuals is only appropriate for linear models."
"Checking normality of residuals is only appropriate for linear models. It is recommended to use `simulate_residuals()` and `check_residuals()` to check generalized linear (mixed) models for uniformity of residuals." # nolint
)
return(NULL)
}
Expand Down Expand Up @@ -87,7 +87,7 @@ check_normality.glm <- function(x, ...) {

insight::format_alert(
"There's no formal statistical test for normality for generalized linear model.",
"Please use `plot()` on the return value of this function: `plot(check_normality(model))`"
"Instead, please use `simulate_residuals()` and `check_residuals()` to check for uniformity of residuals."
)
invisible(out)
}
Expand Down
1 change: 1 addition & 0 deletions R/check_residuals.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#' @param ... Passed down to [`stats::ks.test()`].
#'
#' @details Uniformity of residuals is checked using a Kolmogorov-Smirnov test.
#' There is a `plot()` method to visualize the distribution of the residuals.
#'
#' @seealso [`simulate_residuals()`]
#'
Expand Down
3 changes: 2 additions & 1 deletion R/simulate_residuals.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
#' @details This function is a small wrapper around [`DHARMa::simulateResiduals()`].
#' It basically only sets `plot = FALSE` and adds an additional class attribute
#' (`"performance_sim_res"`), which allows using the DHARMa object in own plotting
#' functions in the **see** package. See also `vignette("DHARMa")`.
#' functions in the **see** package. See also `vignette("DHARMa")`. There is a
#' `plot()` method to visualize the distribution of the residuals.
#'
#' @references
#'
Expand Down
1 change: 1 addition & 0 deletions man/check_residuals.Rd

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

3 changes: 2 additions & 1 deletion man/simulate_residuals.Rd

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

0 comments on commit b128174

Please sign in to comment.