11---
22title : " Analysing Longitudinal or Panel Data"
3- output :
3+ output :
44 rmarkdown::html_vignette :
55 toc : true
66 fig_width : 10.08
@@ -9,7 +9,7 @@ vignette: >
99 %\VignetteIndexEntry{Analysing Longitudinal or Panel Data}
1010 \usepackage[utf8]{inputenc}
1111 %\VignetteEngine{knitr::rmarkdown}
12- editor_options :
12+ editor_options :
1313 chunk_output_type : console
1414bibliography : bibliography.bib
1515---
@@ -43,7 +43,7 @@ if (!all(sapply(pkgs, requireNamespace, quietly = TRUE))) {
4343set.seed(333)
4444```
4545
46- This vignette explains the rational behind the ` demean() ` function.
46+ This vignette explains the rational behind the ` demean() ` function.
4747
4848We give recommendations how to analyze multilevel or hierarchical data
4949structures, when macro-indicators (or level-2 predictors, or higher-level units,
@@ -202,7 +202,7 @@ There are several ways how to address this using a mixed models approach:
202202 @gelman_data_2007, Chap. 12.6.] .
203203
204204 * When time-varying predictors are "decomposed" into their time-varying and
205- time-invariant components (demeaning ), then mixed models can model ** both**
205+ time-invariant components (de-meaning ), then mixed models can model ** both**
206206 within- and between-subject effects [ @bell_fixed_2019] - this approach is
207207 essentially a further development of a long-known recommendation by Mundlak
208208 [ @mundlak_pooling_1978] .
@@ -284,7 +284,7 @@ rewb <- suppressWarnings(lmer(
284284
285285** What about time-constant predictors?**
286286
287- After demeaning time-varying predictors, "at the higher level, the mean term is
287+ After de-meaning time-varying predictors, "at the higher level, the mean term is
288288no longer constrained by Level 1 effects, so it is free to account for all the
289289higher-level variance associated with that variable" [ @bell_explaining_2015] .
290290
@@ -537,4 +537,14 @@ m2 <- lmer(y ~ x_between + (1 | grp), data = d)
537537model_parameters(m2)
538538```
539539
540+ # A final note - latent mean centering
541+
542+ It can be even more complicated. The person-mean is only observed, but the
543+ true value is not known. Thus, in certain situations, the coefficients after
544+ de-meaning still might be (more or less) biased, because it doesn't
545+ appropriately account for the uncertainty in the person-means. In this case,
546+ _ latent mean centering_ is recommended, however, there are only few options
547+ to do this. One way is using the great ** brms** package, and this approach
548+ [ is described here] ( https://vuorre.netlify.app/posts/latent-mean-centering/ ) .
549+
540550# References
0 commit comments