You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't think the / syntax is supported in phyr (am I right on that @daijiang ?), but (1|time/species) is equivalent to (1|time) + (1|time:species). An interaction in the grouping term is also not supported by phyr I don't think (?), but you could easily construct a factor that is equivalent to time:species and use that as your grouping term, e.g (1|time) + (1|time_species), where time_species has a unique value for each combination of time and species. Likewise this could be done for each nesting level that you need, e.g. (1|time) + (1|time_species) + (1|time_species_site) + (1|time_species_site_region). In each case the variable has a single unique factor value for each combination of the grouping terms being nested. Here is a good blog post that shows three ways to code nested random effects (where the method I suggest, which should definitely work with phyr, is the third way: "implicit nesting"): https://www.muscardinus.be/2017/07/lme4-random-effects/
Is there a way to include multi-level nested random effects e.g. (in lme4 syntax) (1|time/species/site/region)?
The text was updated successfully, but these errors were encountered: