Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke committed Mar 18, 2024
1 parent 276a847 commit 7b7ba1c
Show file tree
Hide file tree
Showing 8 changed files with 38 additions and 4 deletions.
11 changes: 11 additions & 0 deletions R/check_outliers.R
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,17 @@
#' observations located at `qnorm(1-0.025) * SD)` of the log-transformed
#' LOF distance. Requires the **dbscan** package.
#'
#' @section Methods for simulated residuals:
#'
#' The approach for detecting outliers based on simulated residuals differs
#' from the traditional methods and may not be detecting outliers as expected.
#' Literally, this approach compares observed to simulated values. However, we
#' do not know the deviation of the observed data to the model expectation, and
#' thus, the term "outlier" should be taken with a grain of salt. Basically, the
#' comparison tests whether on observed data point is outside the simulated range.
#' It is strongly recommended to read the related documentations in the **DHARMa**
#' package, e.g. `?DHARMa::testOutliers`.
#'
#' @section Threshold specification:
#'
#' Default thresholds are currently specified as follows:
Expand Down
2 changes: 2 additions & 0 deletions R/check_predictions.R
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
#'
#' @return A data frame of simulated responses and the original response vector.
#'
#' @seealso [`simulate_residuals()`] and [`check_residuals()`].
#'
#' @details An example how posterior predictive checks can also be used for model
#' comparison is Figure 6 from _Gabry et al. 2019, Figure 6_.
#'
Expand Down
5 changes: 4 additions & 1 deletion R/check_residuals.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,13 @@
#'
#' @details Uniformity of residuals is checked using a Kolmogorov-Smirnov test.
#' There is a `plot()` method to visualize the distribution of the residuals.
#' The test fpr uniformity basically tests to which extent the observed values
#' deviate from the model expectations (i.e. simulated values). In this sense,
#' the `check_residuals()` function has similar goals like [`check_predictions()`].
#'
#' @inheritSection simulate_residuals Tests based on simulated residuals
#'
#' @seealso [`simulate_residuals()`]
#' @seealso [`simulate_residuals()`] and [`check_predictions()`].
#'
#' @return The p-value of the test statistics.
#'
Expand Down
2 changes: 1 addition & 1 deletion R/simulate_residuals.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#' [`check_residuals()`]. The returned object is of class `DHARMa` and
#' `performance_simres`.
#'
#' @seealso [`check_residuals()`]
#' @seealso [`check_residuals()`] and [`check_predictions()`].
#'
#' @details This function is a small wrapper around [`DHARMa::simulateResiduals()`].
#' It basically only sets `plot = FALSE` and adds an additional class attribute
Expand Down
13 changes: 13 additions & 0 deletions man/check_outliers.Rd

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

2 changes: 2 additions & 0 deletions man/check_predictions.Rd

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

5 changes: 4 additions & 1 deletion man/check_residuals.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/simulate_residuals.Rd

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

0 comments on commit 7b7ba1c

Please sign in to comment.