[R] Multilevel models

Fox, John j|ox @end|ng |rom mcm@@ter@c@
Mon Mar 4 14:45:47 CET 2019


Dear Saul,

The most commonly used mixed-effect models software in R, in the lme4 and nlme packages, use the Laird-Ware form of the model, which isn't explicitly hierarchical. That is, higher-level variables are simply invariant within groups and appear in the model formula in the same manner as individual-level variables. So there's no problem -- just specify the model as you normally would.

By the way, you're more likely to get responses about mixed models if you post to the R-sig-mixed-models list <https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models> rather than to the more general R-help list.

I hope this helps,
 John

  -------------------------------------------------
  John Fox, Professor Emeritus
  McMaster University
  Hamilton, Ontario, Canada
  Web: http::/socserv.mcmaster.ca/jfox

> On Mar 3, 2019, at 5:19 AM, Saul Weaver <saul.weaver.70 using gmail.com> wrote:
> 
> Hello,
> 
> I have data with workers within departments. I am interested in testing the
> effects of peers' satisfaction on employees' productivity. To assess peer
> satisfaction, I calculate, for each employee, the average satisfaction of
> the employees' peers within the department. In other words, I calculate the
> average satisfaction in the department, while excluding the focal employee.
> I'm not sure about the level of this variable, because on the one hand, it
> is unique for each employee, but on the other hand, the values of this
> variable across employees are not independent of each other. How would I
> account for this issue in R?
> 
> Thank you,
> 
> S Weaver
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list