|
1 | | -#' Check model predictor for heterogeneity bias |
| 1 | +#' @title Check model predictor for heterogeneity bias |
| 2 | +#' @name check_heterogeneity_bias |
2 | 3 | #' |
| 4 | +#' @description |
3 | 5 | #' `check_heterogeneity_bias()` checks if model predictors or variables may |
4 | 6 | #' cause a heterogeneity bias, i.e. if variables have any within-group variance |
5 | 7 | #' (_Bell and Jones, 2015_). |
6 | | -#' \cr\cr |
7 | | -#' **We recommend using [check_group_variation()] instead, for a more detailed and flexible examination of group-wise variability.** |
| 8 | +#' |
| 9 | +#' **We recommend using [check_group_variation()] instead, for a more detailed |
| 10 | +#' and flexible examination of group-wise variability.** |
8 | 11 | #' |
9 | 12 | #' @param x A data frame or a mixed model object. |
10 | 13 | #' @param select Character vector (or formula) with names of variables to select |
|
35 | 38 | #' For further details, read the vignette |
36 | 39 | #' <https://easystats.github.io/parameters/articles/demean.html> and also |
37 | 40 | #' see documentation for [`datawizard::demean()`]. |
38 | | -#' \cr\cr |
39 | | -#' For a more detailed and flexible examination of group-wise variability, see [`check_group_variation()`]. |
| 41 | +#' |
| 42 | +#' For a more detailed and flexible examination of group-wise variability, see |
| 43 | +#' [`check_group_variation()`]. |
40 | 44 | #' |
41 | 45 | #' @references |
42 | 46 | #' - Bell A, Jones K. 2015. Explaining Fixed Effects: Random Effects |
|
49 | 53 | #' check_heterogeneity_bias(iris, select = c("Sepal.Length", "Petal.Length"), by = "ID") |
50 | 54 | #' @export |
51 | 55 | check_heterogeneity_bias <- function(x, select = NULL, by = NULL, nested = FALSE) { |
| 56 | + insight::format_alert("`check_heterogeneity_bias()` is deprecated. Please use `check_group_variation()` instead.") |
| 57 | + |
52 | 58 | if (insight::is_model(x)) { |
53 | 59 | by <- insight::find_random(x, split_nested = TRUE, flatten = TRUE) |
54 | 60 | if (is.null(by)) { |
@@ -125,5 +131,3 @@ print.check_heterogeneity_bias <- function(x, ...) { |
125 | 131 | cat("\n") |
126 | 132 | invisible(x) |
127 | 133 | } |
128 | | - |
129 | | - |
|
0 commit comments