-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Specification of random effects for nested+longitudinal study design #32
Comments
Hi, I have made a suggested setup below. Note use of rL1 = HmscRandomLevel(units = unique(study_design$sampling_plot)) For the subplots, you should first create unique sub-plot IDs, for example: study_design$unique_sub_plot = paste(study_design$sampling_plot, study_design$sub_plot, sep="_") rL2 = HmscRandomLevel(units = unique(study_design$unique_sub_plot)) rL3 = HmscRandomLevel(units = unique(study_design$year)) This implementation allows you to ask e.g. if some species tend to occur in the same years. Alternatively, to make the analysis temporally explicit, see the argument Finally, the complete list of random effects: |
Thanks, @oysteiop! In fact, I do have unique sub-plot IDs already, so it was basically just a matter of wrapping a |
Yes, this sounds reasonable. |
Hi @ChrKoenig , |
Hi!
I'd appreciate your advice regarding the specification of random effects in
Hmsc
. My dataset consists of standardized, annually repeated surveys across an evenly spaced grid of sampling plots. The exact location of individuals within each plot is recorded, allowing me to derive species occurrences at finer grain sizes by subdividing the the entire plot into a number of equally-sized sub-plots. I am mostly interested in the change in species association patterns at different grain sizes, but I'm not quite sure whether my specification of random effects is correct.I need random effects for three reasons: (1) to make
Hmsc
estimate pairwise residual correlations, (2) to account for the fact that sub-plots are nested within sampling plots, and (3) to account for the repeated sampling in different years. From my understanding, the specification of study design and random effects at the coarsest level, i.e. for entire sampling plots, should be as follows:sampling_design
random effects
However, when I want to look at the sub-plot level, I am not quite sure if the following is correct:
sampling_design
random effects
Any thoughts on that?
The text was updated successfully, but these errors were encountered: