|
255 | 255 | #' @references
|
256 | 256 | #' - Archimbaud, A., Nordhausen, K., and Ruiz-Gazen, A. (2018). ICS for
|
257 | 257 | #' multivariate outlier detection with application to quality control.
|
258 |
| -#' Computational Statistics and Data Analysis, 128, 184-199. |
| 258 | +#' *Computational Statistics and Data Analysis*, *128*, 184-199. |
259 | 259 | #' \doi{10.1016/j.csda.2018.06.011}
|
260 | 260 | #'
|
261 | 261 | #' - Gnanadesikan, R., and Kettenring, J. R. (1972). Robust estimates, residuals,
|
262 |
| -#' and outlier detection with multiresponse data. Biometrics, 81-124. |
| 262 | +#' and outlier detection with multiresponse data. *Biometrics*, 81-124. |
263 | 263 | #'
|
264 | 264 | #' - Bollen, K. A., and Jackman, R. W. (1985). Regression diagnostics: An
|
265 |
| -#' expository treatment of outliers and influential cases. Sociological Methods |
266 |
| -#' and Research, 13(4), 510-542. |
| 265 | +#' expository treatment of outliers and influential cases. *Sociological Methods |
| 266 | +#' and Research*, *13*(4), 510-542. |
267 | 267 | #'
|
268 | 268 | #' - Cabana, E., Lillo, R. E., and Laniado, H. (2019). Multivariate outlier
|
269 | 269 | #' detection based on a robust Mahalanobis distance with shrinkage estimators.
|
270 | 270 | #' arXiv preprint arXiv:1904.02596.
|
271 | 271 | #'
|
272 | 272 | #' - Cook, R. D. (1977). Detection of influential observation in linear
|
273 |
| -#' regression. Technometrics, 19(1), 15-18. |
| 273 | +#' regression. *Technometrics*, *19*(1), 15-18. |
274 | 274 | #'
|
275 | 275 | #' - Iglewicz, B., and Hoaglin, D. C. (1993). How to detect and handle outliers
|
276 | 276 | #' (Vol. 16). Asq Press.
|
277 | 277 | #'
|
278 | 278 | #' - Leys, C., Klein, O., Dominicy, Y., and Ley, C. (2018). Detecting
|
279 |
| -#' multivariate outliers: Use a robust variant of Mahalanobis distance. Journal |
280 |
| -#' of Experimental Social Psychology, 74, 150-156. |
| 279 | +#' multivariate outliers: Use a robust variant of Mahalanobis distance. *Journal |
| 280 | +#' of Experimental Social Psychology*, 74, 150-156. |
281 | 281 | #'
|
282 | 282 | #' - Liu, F. T., Ting, K. M., and Zhou, Z. H. (2008, December). Isolation forest.
|
283 | 283 | #' In 2008 Eighth IEEE International Conference on Data Mining (pp. 413-422).
|
284 | 284 | #' IEEE.
|
285 | 285 | #'
|
286 | 286 | #' - Lüdecke, D., Ben-Shachar, M. S., Patil, I., Waggoner, P., and Makowski, D.
|
287 | 287 | #' (2021). performance: An R package for assessment, comparison and testing of
|
288 |
| -#' statistical models. Journal of Open Source Software, 6(60), 3139. |
| 288 | +#' statistical models. *Journal of Open Source Software*, *6*(60), 3139. |
289 | 289 | #' \doi{10.21105/joss.03139}
|
290 | 290 | #'
|
291 | 291 | #' - Thériault, R., Ben-Shachar, M. S., Patil, I., Lüdecke, D., Wiernik, B. M.,
|
292 | 292 | #' and Makowski, D. (2023). Check your outliers! An introduction to identifying
|
293 |
| -#' statistical outliers in R with easystats. \doi{10.31234/osf.io/bu6nt} |
| 293 | +#' statistical outliers in R with easystats. *Behavior Research Methods*, 1-11. |
| 294 | +#' \doi{10.3758/s13428-024-02356-w} |
294 | 295 | #'
|
295 | 296 | #' - Rousseeuw, P. J., and Van Zomeren, B. C. (1990). Unmasking multivariate
|
296 |
| -#' outliers and leverage points. Journal of the American Statistical |
297 |
| -#' association, 85(411), 633-639. |
| 297 | +#' outliers and leverage points. *Journal of the American Statistical |
| 298 | +#' association*, *85*(411), 633-639. |
298 | 299 | #'
|
299 | 300 | #' @examples
|
300 | 301 | #' data <- mtcars # Size nrow(data) = 32
|
|
331 | 332 | #' # We can run the function stratified by groups using `{datawizard}` package:
|
332 | 333 | #' group_iris <- datawizard::data_group(iris, "Species")
|
333 | 334 | #' check_outliers(group_iris)
|
334 |
| -#' |
| 335 | +#' # nolint start |
335 | 336 | #' @examplesIf require("see") && require("bigutilsr") && require("loo") && require("MASS") && require("ICSOutlier") && require("ICS") && require("dbscan")
|
| 337 | +#' # nolint end |
336 | 338 | #' \donttest{
|
337 | 339 | #' # You can also run all the methods
|
338 | 340 | #' check_outliers(data, method = "all", verbose = FALSE)
|
@@ -586,7 +588,7 @@ check_outliers.default <- function(x,
|
586 | 588 | attr(outlier, "threshold") <- thresholds
|
587 | 589 | attr(outlier, "method") <- method
|
588 | 590 | attr(outlier, "text_size") <- 3
|
589 |
| - attr(outlier, "influential_obs") <- .influential_obs(x) |
| 591 | + attr(outlier, "influential_obs") <- .influential_obs(x, threshold = unlist(thresholds)) |
590 | 592 | attr(outlier, "variables") <- "(Whole model)"
|
591 | 593 | attr(outlier, "raw_data") <- my_data
|
592 | 594 | attr(outlier, "outlier_var") <- outlier_var
|
|
0 commit comments