diff --git a/R/demean.R b/R/demean.R index 2122f9a09..fd2722ac7 100644 --- a/R/demean.R +++ b/R/demean.R @@ -167,12 +167,13 @@ #' `demean()` can also handle cross-classified designs, where the data has two #' or more groups at the higher (i.e. second) level. In such cases, the #' `by`-argument can identify two or more variables that represent the -#' group- or cluster-ID. The de-meaned variables for cross-classified designs -#' are simply subtracting all group means from each individual value -#' (see _Guo et al. 2024_ for details). Note that de-meaning for cross-classified -#' designs is *not* equivalent to de-meaning of nested data structures from models -#' with three or more levels, i.e. de-meaning is supposed to work for models -#' like `y ~ x + (1|group1) + (1|group2)`, but *not* for models like +#' cross-classified group- or cluster-IDs. The de-meaned variables for +#' cross-classified designs are simply subtracting all group means from each +#' individual value, i.e. _fully cluster-mean-centering_ (see _Guo et al. 2024_ +#' for details). Note that de-meaning for cross-classified designs is *not* +#' equivalent to de-meaning of nested data structures from models with three or +#' more levels, i.e. de-meaning is supposed to work for models like +#' `y ~ x + (1|group1) + (1|group2)`, but *not* for models like #' `y ~ x + (1|group1/group2)`. #' #' @section Analysing panel data with mixed models using lme4: diff --git a/man/demean.Rd b/man/demean.Rd index 66163876d..4f867260c 100644 --- a/man/demean.Rd +++ b/man/demean.Rd @@ -227,12 +227,13 @@ the term as interaction for the \code{select}-argument, e.g. \code{select = "a*b \code{demean()} can also handle cross-classified designs, where the data has two or more groups at the higher (i.e. second) level. In such cases, the \code{by}-argument can identify two or more variables that represent the -group- or cluster-ID. The de-meaned variables for cross-classified designs -are simply subtracting all group means from each individual value -(see \emph{Guo et al. 2024} for details). Note that de-meaning for cross-classified -designs is \emph{not} equivalent to de-meaning of nested data structures from models -with three or more levels, i.e. de-meaning is supposed to work for models -like \code{y ~ x + (1|group1) + (1|group2)}, but \emph{not} for models like +cross-classified group- or cluster-IDs. The de-meaned variables for +cross-classified designs are simply subtracting all group means from each +individual value, i.e. \emph{fully cluster-mean-centering} (see \emph{Guo et al. 2024} +for details). Note that de-meaning for cross-classified designs is \emph{not} +equivalent to de-meaning of nested data structures from models with three or +more levels, i.e. de-meaning is supposed to work for models like +\code{y ~ x + (1|group1) + (1|group2)}, but \emph{not} for models like \code{y ~ x + (1|group1/group2)}. }