[R-sig-ME] How can I know if I have enough data for a complex random slopes model?
Philip Harrison
pharriso at uwaterloo.ca
Thu Apr 21 17:46:13 CEST 2016
Hi David,
I would suggest using a heirarchical random regression model following
the Araya-Ajoy 2015 method:
Araya‐Ajoy, Yimen G., Kimberley J. Mathot, and Niels J.
Dingemanse. "An approach to estimate short‐term, long‐term
and reaction norm repeatability." Methods in Ecology and Evolution
6.12 (2015): 1462-1473.
By decomposing variance at various temporal scales (days, season,
years for example) you will be able to capture the consistency (in
slopes and intercepts) that occurs due to short term between
individual differences in experience and long term consistency, ie
that which occurs likely as as a function of genetic or permenent
environmental effects. That way you eliminate the need to fit a
correlation structure, which may well be over-fitting. You probably
cant fit a variance weighting structure using this method as it is
based on lme4 not nlme, however if you transform your response that
will likely have the same effect.
In terms of power, precision and bias, if you fit the heirachical
model, you can use the power analysis package (MultiRR) , plug in your
design and generate estimates of power etc. It works for unbalanced
data too. You can also get a rough idea of power by looking at the
plots based on various sample sizes provided within the manuscripts.
If you run a single level random regression, you can run power
analyses based on your sample design, using power analysis packages
associated with thew following papers:
Martin, Julien GA, et al. "Measuring individual differences in
reaction norms in field and experimental studies: a power analysis of
random regression models." Methods in Ecology and Evolution 2.4
(2011): 362-374.
or alterantively:
van de Pol, M. (2012). Quantifying individual variation in reaction
norms: how study design affects the accuracy, precision and power of
random regression models. Methods in Ecology and Evolution, 3(2),
268-280.
Cheers
Philip Harrison PhD
Post-Doc in Cooke and Power Labs
Department of Biology
University of Waterloo
200 University Avenue West
Waterloo, Ontario, Canada
N2L 3G1
Office 519-888-4567 x30166
Email:pharriso at uwaterloo.ca
https://www.researchgate.net/profile/Phil_Harrison4
http://www.fecpl.ca/people/philip-harrison/
Quoting David Villegas Ríos <chirleu at gmail.com>:
> 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
> records.
>
> 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
> thumb?
>
> 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,
>
> David
>
> [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>
Philip Harrison PhD
Post-Doc in Cooke and Power Labs
Department of Biology
University of Waterloo
200 University Avenue West
Waterloo, Ontario, Canada
N2L 3G1
Office 519-888-4567 x30166
Email:pharriso at uwaterloo.ca
https://www.researchgate.net/profile/Phil_Harrison4
http://www.fecpl.ca/people/philip-harrison/
More information about the R-sig-mixed-models
mailing list