Skip to content
Prev 17109 / 20628 Next

Simulating data with nested random effects

Hi again,


For those who are interested, I figured this out - it's because there is no interaction between time and treatment in my simulated data, so the number of sites only affects the variance of the intercept, and not the treatment variance. Adding interaction random effects for 'time:treatment:site' and 'time:treatment:site:subject' when simulating data, and fitting with y ~ time + time:treatment + (1 + time | site/subject), produces the desired result.


Best,

Pete
Message-ID: <HE1PR01MB2939A7FCF170604F50C3EAB2BFCE0@HE1PR01MB2939.eurprd01.prod.exchangelabs.com>
In-Reply-To: <HE1PR01MB29396165F51F48759E28C5E3BFF70@HE1PR01MB2939.eurprd01.prod.exchangelabs.com>