jvparidon/lmerMultiMember

README: minor mistake in nested random effects text

Closed this issue · 2 comments

In https://github.com/jvparidon/lmerMultiMember#nested-random-effects-groupings-work-a-little-differently it says

"For example, lmer(citations ~ word_count + (1 | author/journal), memberships = list(author = membership_matrix)) will throw an error, because the multiple membership author variable cannot be nested inside the journal grouping."

But I think that is a mistake (the nesting in the formula is transposed with respect to the nesting described in the text).

Either one of these would have consistent formula and text:

  • lmer(citations ~ word_count + (1 | author/journal), memberships = list(author = membership_matrix)) will throw an error, because the journal grouping cannot be nested inside the multiple membership author variable.

  • lmer(citations ~ word_count + (1 |journal/author), memberships = list(author = membership_matrix)) will throw an error, because the multiple membership author variable cannot be nested inside the journal grouping.

I think, from context, that the second one is the correct one.

Hey, thanks for pointing this out! I'll push a fix shortly.
As a more general note, I'm planning to replace this README with a more complete and hopefully more helpful tutorial/vignette.

Thank you!!