TransWikia.com

How to decide between individual versus group level random effect

Cross Validated Asked on December 11, 2021

I have N participants each has inconsistent number of repeated measurements of an outcome Y. Each participant belongs to one of two groups.

My hypothesis is that the levels of Y differ significantly among groups and that the Y rate of change also varies significantly over time.
Should the group be set as fixed or random effect?

One Answer

Since you only have 2 groups and you are interested in the "effect" of the group, then it should be a fixed effect. In R it would look something like:

Y ~ time + group + (1|subject) 

You might also want to fit an interaction between time and group and possibly allow the fixed effects to vary by subject, with random slopes.

Answered by Robert Long on December 11, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP