[R-sig-ME] nlme issue with multiple random effects and autoregression

Anne-Christine Auge @chr@@uge @end|ng |rom gm@||@com
Mon Nov 9 23:54:52 CET 2020


I am trying to analyse the effect of temperature range (T.range) on turtle
animal activity (odba_mean).
I have multiple daily measurements for multiple individuals (name_ID) from
two species. I have data for 3 years (no turtle repeats over the years). A
datafile is attached.
Activity (mean_ODBA) measures appear to be temporally autocorrelated, so
this needs to be accounted for).

I am fairly new to mixed models, so I am very unsure about my code. I am
using the nlme package because this seems to one that can more easily
account for autoregression.
This is the code I have so far:

Mlme <- lme(odba_mean ~ T.range + species + T.range*species,
             random = ~ T.range|species/name_ID,
             data = df3,
             correlation = corAR1(form = ~date|species/name_ID))


I have a couple issues that I cannot seem to solve:
1. I get the warning: "Warning message: In pt(-abs(tVal), fDF) : NaNs
produced" which appears to be due to the nesting structure, but I just do
not know how to fix it.
2. I cannot figure out how to include year as another random effect. I read
that it is very difficult in nlme to include multiple random effects that
are not nested. I suppose technically name_ID is nested in years, but it is
already nested in species, and species is not nested in years (but
crossed). How do I incorporate this?

Thank you.
Regards,
Anni

-- 
*_________________________________________*


*Anne-Christine Auge*


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