From 71ca921bef2028031339d3e5b8e68f204dd5503b Mon Sep 17 00:00:00 2001 From: Daniel Date: Fri, 22 Nov 2024 16:52:07 +0100 Subject: [PATCH] docs --- R/check_model.R | 7 ++++++- R/check_predictions.R | 8 ++++---- man/check_model.Rd | 6 ++++++ man/check_predictions.Rd | 8 ++++---- 4 files changed, 20 insertions(+), 9 deletions(-) diff --git a/R/check_model.R b/R/check_model.R index f769b95e3..baa224feb 100644 --- a/R/check_model.R +++ b/R/check_model.R @@ -2,11 +2,13 @@ #' @name check_model #' #' @description -#' #' Visual check of various model assumptions (normality of residuals, normality #' of random effects, linear relationship, homogeneity of variance, #' multicollinearity). #' +#' If `check_model()` doesn't work as expected, try setting `verbose = TRUE` to +#' get hints about possible problems. +#' #' @param x A model object. #' @param dot_size,line_size Size of line and dot-geoms. #' @param base_size,title_size,axis_title_size Base font size for axis and plot titles. @@ -161,6 +163,9 @@ #' look at the `check` argument and see if some of the model checks could be #' skipped, which also increases performance. #' +#' If `check_model()` doesn't work as expected, try setting `verbose = TRUE` to +#' get hints about possible problems. +#' #' @family functions to check model assumptions and and assess model quality #' #' @examplesIf require("lme4") diff --git a/R/check_predictions.R b/R/check_predictions.R index 8ce1edd0c..d5b382fd6 100644 --- a/R/check_predictions.R +++ b/R/check_predictions.R @@ -11,8 +11,8 @@ #' of frequentist models (e.g., `lm`, `merMod`, `glmmTMB`, ...). For Bayesian #' models, the model is passed to [`bayesplot::pp_check()`]. #' -#' If `check_model()` doesn't work as expected, try setting `verbose = TRUE` -#' to get hints about possible problems. +#' If `check_predictions()` doesn't work as expected, try setting +#' `verbose = TRUE` to get hints about possible problems. #' #' @param object A statistical model. #' @param iterations The number of draws to simulate/bootstrap. @@ -56,8 +56,8 @@ #' package that imports **bayesplot** such as **rstanarm** or **brms**) #' is loaded, `pp_check()` is also available as an alias for `check_predictions()`. #' -#' If `check_model()` doesn't work as expected, try setting `verbose = TRUE` to -#' get hints about possible problems. +#' If `check_predictions()` doesn't work as expected, try setting `verbose = TRUE` +#' to get hints about possible problems. #' #' @family functions to check model assumptions and and assess model quality #' diff --git a/man/check_model.Rd b/man/check_model.Rd index bb4898df8..c07add5f2 100644 --- a/man/check_model.Rd +++ b/man/check_model.Rd @@ -102,6 +102,9 @@ The data frame that is used for plotting. Visual check of various model assumptions (normality of residuals, normality of random effects, linear relationship, homogeneity of variance, multicollinearity). + +If \code{check_model()} doesn't work as expected, try setting \code{verbose = TRUE} to +get hints about possible problems. } \details{ For Bayesian models from packages \strong{rstanarm} or \strong{brms}, @@ -234,6 +237,9 @@ underlying graphic engine becomes slow for plotting many data points. In such cases, setting the argument \code{show_dots = FALSE} might help. Furthermore, look at the \code{check} argument and see if some of the model checks could be skipped, which also increases performance. + +If \code{check_model()} doesn't work as expected, try setting \code{verbose = TRUE} to +get hints about possible problems. } \examples{ diff --git a/man/check_predictions.Rd b/man/check_predictions.Rd index c4882ca0c..5a0f0042a 100644 --- a/man/check_predictions.Rd +++ b/man/check_predictions.Rd @@ -64,8 +64,8 @@ simulated data" (\emph{Gelman et al. 2014, p. 169}). of frequentist models (e.g., \code{lm}, \code{merMod}, \code{glmmTMB}, ...). For Bayesian models, the model is passed to \code{\link[bayesplot:pp_check]{bayesplot::pp_check()}}. -If \code{check_model()} doesn't work as expected, try setting \code{verbose = TRUE} -to get hints about possible problems. +If \code{check_predictions()} doesn't work as expected, try setting +\code{verbose = TRUE} to get hints about possible problems. } \details{ An example how posterior predictive checks can also be used for model @@ -82,8 +82,8 @@ Every model object that has a \code{simulate()}-method should work with package that imports \strong{bayesplot} such as \strong{rstanarm} or \strong{brms}) is loaded, \code{pp_check()} is also available as an alias for \code{check_predictions()}. -If \code{check_model()} doesn't work as expected, try setting \code{verbose = TRUE} to -get hints about possible problems. +If \code{check_predictions()} doesn't work as expected, try setting \code{verbose = TRUE} +to get hints about possible problems. } \examples{ \dontshow{if (require("see")) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf}