[R-sig-ME] How can I know if I have enough data for a complex random slopes model?

David Villegas Ríos chirleu at gmail.com
Thu Apr 21 16:19:32 CEST 2016

Dear list,

I am investigating the effect of the interaction between two continuous
variables (A and B) on a behavioral trait. I have repeated measures from 64
individuals. The number of measures per individual varies a lot with a
minimum of 3 and a maximum of 68 (mean=36). That makes a total of 2300

After some initial exploration and plotting of the data, I have realized
that the effect of A on my response variable varies a lot among
individuals, both in the intercept and the slope.

So I would like to fit a random slopes model to allow each individual to
have a different intercept and slope. My replicates have some temporal
autocorrelation that I want to model using corAR1 (in nlme). And finally,
it seems that using "weights" to model the variance (varExp(form=~A)) also
improves the model.

In summary there is a quite complex random structure + modeling of variance.

Question: How can I be confident that the results are robust and that I
have enough power in my data to fit such a model? Is there any rule of

So far the model runs, although I haven't found a correlation structure
that removes all the temporal autocorrelation (tried corAR1 and several
corARMA options)

Thanks in advance,


	[[alternative HTML version deleted]]

More information about the R-sig-mixed-models mailing list